functionSource
stringlengths
20
97.4k
CWE-119
bool
2 classes
CWE-120
bool
2 classes
CWE-469
bool
2 classes
CWE-476
bool
2 classes
CWE-other
bool
2 classes
combine
int64
0
1
addConstructor(const QByteArray& signature) { int index = d->constructors.size(); d->constructors.append(QMetaMethodBuilderPrivate(QMetaMethod::Constructor, signature)); return QMetaMethodBuilder(this, -(index + 1)); }
false
false
false
false
false
0
_pattern_add_rsvg_color_stops (cairo_pattern_t * pattern, GPtrArray * stops, guint32 current_color_rgb, guint8 opacity) { gsize i; RsvgGradientStop *stop; RsvgNode *node; guint32 rgba; for (i = 0; i < stops->len; i++) { node = (RsvgNode *) g_ptr_array_index (s...
false
false
false
false
false
0
ttm_mem_global_free_zone(struct ttm_mem_global *glob, struct ttm_mem_zone *single_zone, uint64_t amount) { unsigned int i; struct ttm_mem_zone *zone; spin_lock(&glob->lock); for (i = 0; i < glob->num_zones; ++i) { zone = glob->zones[i]; if (single_zone && zone != single_zone) continue; z...
false
false
false
false
true
1
createJPEGFileMap() { DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examing JPEG file and creating map of JPEG markers"); // clear any old data clearMap(); E_JPGMARKER marker; JPEGFileMapEntry *entry = NULL; OFBool lastWasSOSMarker = OFFalse; OFCondition cond; /* Expect SOI at start of file */ E_JPGMARKER fir...
false
false
false
false
false
0
BBHasFallthrough(MachineBasicBlock *MBB) { // Get the next machine basic block in the function. MachineFunction::iterator MBBI = MBB; // Can't fall off end of function. if (llvm::next(MBBI) == MBB->getParent()->end()) return false; MachineBasicBlock *NextBB = llvm::next(MBBI); for (MachineBasicBlock::s...
false
false
false
false
false
0
enable_action(byte action, byte ch) { byte res[1]; if( (action < 0) || (action > 8) || (ch < 1) || (ch > 11) ) { fprintf(stderr, "Invalid actions or source specified\n"); return INVARG; } sendByte(SETACTION); sendByte(action); sendByte(ch); *res = COMERR; sread(1,res); if(*res != 'D') return *res; re...
false
false
false
false
false
0
_euc2shift(unsigned char *str, unsigned char *str2) { int p1,p2; while ((p1 = (int)*str) != '\0') { if (ISEUC(p1)) { if((p2 = (int)*(++str)) == '\0') break; if (ISEUC(p2)) { p1 -= 128; p2 -= 128; _jis_shift(&p1,&p2); } CHAROUT(p1); CHAROUT(p2); str++; continue; } CH...
false
false
false
false
false
0
ap_method_list_add(ap_method_list_t *l, const char *method) { int methnum; int i; const char **xmethod; char **methods; /* * If it's one of our known methods, use the shortcut and use the * bitmask. */ methnum = ap_method_number_of(method); l->method_mask |= (AP_METHOD_BIT <<...
false
false
false
false
false
0
ev_setup(int eflag, int vflag) { int i,n; evflag = 1; eflag_either = eflag; eflag_global = eflag % 2; eflag_atom = eflag / 2; vflag_either = vflag; vflag_global = vflag % 4; vflag_atom = vflag / 4; // reallocate per-atom arrays if necessary if (eflag_atom && atom->nmax > maxeatom) { maxeato...
false
false
false
false
false
0
to_dbm(apr_dbm_t *dbm, apr_file_t *fp, apr_pool_t *pool) { apr_status_t rv = APR_SUCCESS; char line[REWRITE_MAX_TXT_MAP_LINE + 1]; /* +1 for \0 */ apr_datum_t dbmkey; apr_datum_t dbmval; apr_pool_t* p; apr_pool_create(&p, pool); while (apr_file_gets(line, sizeof(line), fp) == APR_SUCCESS) ...
false
false
false
false
false
0
cmpc_bl_get_brightness(struct backlight_device *bd) { acpi_status status; acpi_handle handle; unsigned long long brightness; handle = bl_get_data(bd); status = cmpc_get_brightness(handle, &brightness); if (ACPI_SUCCESS(status)) return brightness; else return -1; }
false
false
false
false
false
0
s5h1411_set_gpio(struct dvb_frontend *fe, int enable) { struct s5h1411_state *state = fe->demodulator_priv; u16 val; dprintk("%s(%d)\n", __func__, enable); val = s5h1411_readreg(state, S5H1411_I2C_TOP_ADDR, 0xe0) & ~0x02; if (enable) return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xe0, val | 0x02); ...
false
false
false
false
false
0
init_info_for_card(struct snd_card *card) { struct snd_info_entry *entry; entry = snd_info_create_card_entry(card, "id", card->proc_root); if (!entry) { dev_dbg(card->dev, "unable to create card entry\n"); return -ENOMEM; } entry->c.text.read = snd_card_id_read; card->proc_id = entry; return snd_info_card_...
false
false
false
false
false
0
txtstore(int new_entry,char * txtstr) /*! Return Value: -1 = Error, # = Text ID Parameters: Type Name IO Description ---- ---- -- ----------- */ #ifdef DOC int new_entry ;/* I New entry flag. 1 = Start ne...
false
false
false
false
false
0
free_diff3_blocks(p) struct diff3_block *p; { register struct diff3_block *next; while (p) { next = p->next; if (p->lines[0]) free(p->lines[0]); if (p->lines[1]) free(p->lines[1]); if (p->lines[2]) free(p->lines[2]); if (p->lengths[0]) free(p->lengths[0]); if (p->lengths...
false
false
false
false
false
0
netsnmp_binary_to_hex(u_char ** dest, size_t *dest_len, int allow_realloc, const u_char * input, size_t len) { u_int olen = (len * 2) + 1; u_char *s, *op; const u_char *ip = input; if (dest == NULL || dest_len == NULL || input == NULL) return 0; i...
false
false
false
false
false
0
ReadAssert ( TypSymbolSet follow ) { if ( ! READ_ERROR() ) { IntrAssertBegin(); } Match( S_ASSERT, "Assert", follow ); Match( S_LPAREN, "(", follow ); ReadExpr( S_RPAREN | S_COMMA | follow, 'r' ); if ( ! READ_ERROR() ) { IntrAssertAfterLevel(); } Match( S_COMMA, ",", S_RPAREN|follow )...
false
false
false
false
false
0
aes_copy(struct aes *dest, struct aes *src) { wchar_t *wp; dest->aes_set = src->aes_set; archive_string_copy(&(dest->aes_mbs), &(src->aes_mbs)); archive_string_copy(&(dest->aes_utf8), &(src->aes_utf8)); if (src->aes_wcs != NULL) { wp = (wchar_t *)malloc((wcslen(src->aes_wcs) + 1) ...
false
true
false
false
false
1
glade_project_verify_adaptor (GladeProject *project, GladeWidgetAdaptor *adaptor, const gchar *path_name, GString *string, GladeVerifyFlags flags, gboolean forwidget, ...
false
false
false
false
false
0
check_valid_entry(valid_block_t * vt, conf_t * conf, confentry_t * entry) { rb_dlink_node *ptr, *xptr; RB_DLINK_FOREACH(ptr, vt->valid_entries.head) { valid_entry_t *ve = ptr->data; if(!strcasecmp(ve->name, entry->entryname)) { if(entry->type & CF_FLIST && !(ve->type & CF_FLIST)) { conf_report_error_...
false
false
false
false
false
0
fill_stat_cache_info(struct cache_entry *ce, struct stat *st) { ce->ce_ctime.sec = htonl(st->st_ctime); ce->ce_mtime.sec = htonl(st->st_mtime); #ifdef USE_NSEC ce->ce_ctime.nsec = htonl(st->st_ctim.tv_nsec); ce->ce_mtime.nsec = htonl(st->st_mtim.tv_nsec); #endif ce->ce_dev = htonl(st->st_dev); ce->ce_ino = htonl(...
false
false
false
false
false
0
NewSeries (bool new_plot) { GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); GogPlot *plot = NULL; if (new_plot) { /* Create a scatter plot and add it to the chart */ plot = (GogPlot *) gog_plot_new_by_name ("GogXYPlot"); g_object_set (plot, "default-style-has-markers", false, NULL); ...
false
false
false
false
false
0
gnc_commodity_edit_new_select (gpointer arg, gpointer ptr, GtkWidget *toplevel) { gnc_commodity * comm = (gnc_commodity *)ptr; dialog_commodity_mode *mode_ptr = arg; dialog_commodity_mode mode; mode = mode_ptr ? *mode_ptr : DIAG_COMM_ALL; return gnc_ui_select...
false
false
false
false
false
0
superqix_draw_sprites( struct mame_bitmap *bitmap ) { int offs; for (offs = 0; offs < spriteram_size; offs += 4) { int attr = spriteram[offs + 3]; int code = spriteram[offs] + 256 * (attr & 0x01); int color = (attr & 0xf0) >> 4; int flipx = attr & 0x04; int flipy = attr & 0x08; int sx = sprit...
false
false
false
false
false
0
compressingLoop(void *ptr) { int id = * ( (int*) ptr); DEBUG("Worker Nr. " << id << " created"); char *peer; int con=-1; if(hostpool.size()) { peer = hostpool[id % hostpool.size()]; if(strcmp(peer, "LOCAL")) { con=setup_connection(peer); if(con<0) ...
false
false
false
false
false
0
extract_parameter_value(chunk_t *name, chunk_t *value, chunk_t *line) { /* extract name */ if (!extract_token(name,':', line)) { return "missing ':'"; } /* extract value */ return extract_value(value, line); }
false
false
false
false
false
0
to_grayscale (unsigned char r, unsigned char g, unsigned char b) { /* computing a grayscale value */ double dval = (0.3 * (double) r) + (0.59 * (double) g) + (0.11 * (double) b); int ival = (int) dval; if (ival < 0) ival = 0; if (ival > 255) ival = 255; return (unsigned char) ival; }
false
false
false
false
false
0
DCH_cache_getnew(char *str) { DCHCacheEntry *ent; /* counter overflow check - paranoia? */ if (DCHCounter >= (INT_MAX - DCH_CACHE_FIELDS - 1)) { DCHCounter = 0; for (ent = DCHCache; ent <= (DCHCache + DCH_CACHE_FIELDS); ent++) ent->age = (++DCHCounter); } /* * If cache is full, remove oldest entry *...
false
false
false
false
false
0
http_rx_data ( struct http_request *http, struct io_buffer *iobuf ) { int rc; /* Update received length */ http->rx_len += iob_len ( iobuf ); /* Hand off data buffer */ if ( ( rc = xfer_deliver_iob ( &http->xfer, iobuf ) ) != 0 ) return rc; /* If we have reached the content-length, stop now */ if ( htt...
false
false
false
false
false
0
on_websocket_connection_ready (EvdWebsocketServer *self, EvdPeer *peer, EvdHttpConnection *conn, gboolean is_new_peer) { if (is_new_peer) { EvdTransportInterface *iface; EvdPeerManager *...
false
false
false
false
false
0
IsKnownHeader (char *line) { char **iter = knownmsgheaders; while (iter && *iter) { if (_FP_strnicmp (line, *iter, strlen (*iter)) == 0) return 1; iter++; } iter = knownmimeheaders; while (iter && *iter) { if (_FP_strnicmp (line, *iter, strlen (*iter)) == 0) return 2; iter++; ...
false
false
false
false
false
0
mounts_poll(struct file *file, poll_table *wait) { struct seq_file *m = file->private_data; struct proc_mounts *p = m->private; struct mnt_namespace *ns = p->ns; unsigned res = POLLIN | POLLRDNORM; int event; poll_wait(file, &p->ns->poll, wait); event = ACCESS_ONCE(ns->event); if (m->poll_event != event) { ...
false
false
false
true
false
1
UT_go_get_mime_type (gchar const *uri) { #if HAVE_GSF_GIO gboolean content_type_uncertain = FALSE; char *content_type = g_content_type_guess (uri, NULL, 0, &content_type_uncertain); if (content_type) { char *mime_type = g_content_type_get_mime_type (content_type); g_free (content_type); if (mime_type) retu...
false
false
false
false
false
0
ToDevice(const BYTE * pBuffer, DWORD * Count) { if (OutputPath == -1) { return IO_ERROR; } if (m_bSpeedMechEnabled) { if ((CopyData (pBuffer, *Count)) == 0) { *Count = 0; return NO_ERROR; } } if (outfp) { fwrite (pBuffer, 1, *Count, outf...
false
false
false
false
false
0
operator=(char c) { char* old_S = S; n = 1; S = new char [2]; if (!S) Throw(Bad_alloc()); S[0] = c; S[1] = 0; delete [] old_S; }
false
false
false
false
false
0
open_file_eeprom(struct inode *inode, struct file *file) { struct eeprom_private *ep; struct ath5k_hw *ah = inode->i_private; bool res; int i, ret; u32 eesize; u16 val, *buf; /* Get eeprom size */ res = ath5k_hw_nvram_read(ah, AR5K_EEPROM_SIZE_UPPER, &val); if (!res) return -EACCES; if (val == 0) { ees...
false
false
false
false
false
0
setContents(GooString *new_content) { Annot::setContents(new_content); if (caption) invalidateAppearance(); }
false
false
false
false
false
0
is_unreplicated(WORKUNIT& wu) { return (wu.target_nresults == 1 && app.target_nresults > 1); }
false
false
false
false
false
0
main(int argc, char* argv[]) { char** pp; struct exfat ef; int rc = 0; for (pp = argv + 1; *pp; pp++) if (strcmp(*pp, "-v") == 0) { printf("exfatlabel %u.%u.%u\n", EXFAT_VERSION_MAJOR, EXFAT_VERSION_MINOR, EXFAT_VERSION_PATCH); puts("Copyright (C) 2011-2013 Andrew Nayenko"); return 0; } if (...
false
false
false
false
false
0
makeValue(Text &text, AttributeContext &context, const StringC &, unsigned &specLength) const { const Syntax &syntax = context.attributeSyntax(); size_t normsep = syntax.normsep(); size_t normalizedLength = text.normalizedLength(normsep); specLength += normalizedLength; size_t litlen = s...
false
false
false
false
false
0
snd_pci_quirk_lookup_id(u16 vendor, u16 device, const struct snd_pci_quirk *list) { const struct snd_pci_quirk *q; for (q = list; q->subvendor; q++) { if (q->subvendor != vendor) continue; if (!q->subdevice || (device & q->subdevice_mask) == q->subdevice) return q; } return NULL; }
false
false
false
false
false
0
str_HillFormula(INCHI_SORT *pINChISort, char *pStr, int nStrLen, int tot_len, int *bOverflow, int bOutType, int num_components, int bUseMulipliers) { int i, ii; INCHI_SORT *is, *is0; INChI *pINChI, *pINChI_Prev; int mult, eq2prev, bNext; if ( !(is0 = pINChI...
false
false
false
false
false
0
initializeMECorrection(ShowerTreePtr tree, double & initial, double & final) { // check the outgoing particles map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator cit; ShowerParticlePtr part[2]; unsigned int ix(0); for(cit=tree->outgoingLines().begin();cit!=tree->outgoingLines().end();++cit) { ...
false
false
false
false
false
0
comp_AAT(SPMAT *A) #endif { SPMAT *AAT; SPROW *r, *r2; row_elt *elts, *elts2; int i, idx, idx2, j, m, minim, n, num_scan, tmp1; Real ip; if ( ! A ) error(E_NULL,"comp_AAT"); m = A->m; n = A->n; /* set up column access paths */ if ( ! A->flag_col ) sp_col_access(A); AAT = sp_get(m,m,10); for ( i = 0; ...
false
false
false
false
false
0
mt63_txprocess(struct trx *trx) { struct mt63 *s = (struct mt63 *) trx->modem; int c; c = trx_get_tx_char(); if (c == -1) { if (trx->stopflag && s->flush-- == 0) return -1; c = 0; } else s->flush = s->Tx->DataInterleave; if ((trx->mt63_esc && c > 255) || (!trx->mt63_esc && c > 127)) c = '.'; trx_p...
false
false
false
false
false
0
UpdateTool(double NewPitch, double NewYaw, double NewRoll) { vtkScenarioElementCollection *elements; vtkScenarioElement *elem; double Origin[3]; elements = this->GetElements(); elements->InitTraversal(); while (elem = elements->GetNextElement()) { GetAndCopyMacro(elem->GetOrigin(), Origin); elem-...
false
false
false
false
false
0
__bdx_tx_db_ptr_next(struct txdb *db, struct tx_map **pptr) { BDX_ASSERT(db == NULL || pptr == NULL); /* sanity */ BDX_ASSERT(*pptr != db->rptr && /* expect either read */ *pptr != db->wptr); /* or write pointer */ BDX_ASSERT(*pptr < db->start || /* pointer has to be */ *pptr >= db->end); /* in range */ ...
false
false
false
false
false
0
opal_db_base_fetch_multiple(const opal_identifier_t *proc, opal_scope_t scope, const char *key, opal_list_t *kvs) { opal_db_active_module_t *mod; int rc; if (!opal_db_base.id_set) { return OPAL_ERR_FATAL...
false
false
false
false
false
0
GC_array_mark_proc(word * addr, mse * mark_stack_ptr, mse * mark_stack_limit, word env GC_ATTR_UNUSED) { hdr * hhdr = HDR(addr); size_t sz = hhdr -> hb_sz; size_t nwords = BYTES_TO_WORDS(sz); complex_descriptor * descr = (complex_descriptor...
false
false
false
true
false
1
lam_ssi_rpi_cbuf_append(struct lam_ssi_rpi_cbuf_msg *msg) { struct lam_ssi_rpi_cbuf_cid *pcid; /* ptr CID entry */ struct lam_ssi_rpi_cbuf_cid cident; /* CID entry */ int newsize; /* expanded table size */ pcid = (struct lam_ssi_rpi_cbuf_cid *) ah_find(buftbl, msg->cm_env.ce_cid); if (pcid == 0) { /* * Ex...
false
false
false
false
false
0
tree_iterator_test( const char *sandbox, const char *treeish, const char *start, const char *end, int expected_count, const char **expected_values) { git_tree *t; git_iterator *i; const git_index_entry *entry; int error, count = 0, count_post_reset = 0; git_repository *repo = cl_git_sandbox_init(sandbox); ...
false
false
false
false
false
0
photos_tracker_change_monitor_update_collector (PhotosTrackerChangeMonitor *self) { PhotosTrackerChangeMonitorPrivate *priv = self->priv; priv->outstanding_ops--; if (priv->outstanding_ops != 0) return; g_signal_emit (self, signals[CHANGES_PENDING], 0, priv->pending); g_hash_table_remove_all (priv->pend...
false
false
false
false
false
0
orte_errmgr_base_select(void) { int exit_status = OPAL_SUCCESS; orte_errmgr_base_component_t *best_component = NULL; orte_errmgr_base_module_t *best_module = NULL; /* * Select the best component */ if( OPAL_SUCCESS != mca_base_select("errmgr", orte_errmgr_base_framework.framework_output, ...
false
false
false
false
false
0
oc_enquant_qavg_init(ogg_int64_t _log_qavg[2][64], ogg_uint16_t *_dequant[64][3][2],int _pixel_fmt){ int qi; int pli; int qti; int ci; for(qti=0;qti<2;qti++)for(qi=0;qi<64;qi++){ ogg_int64_t q2; q2=0; for(pli=0;pli<3;pli++){ ogg_uint32_t qp; qp=0; for(ci=0;ci<64;ci++){ u...
false
false
false
false
false
0
GC_local_gcj_fast_malloc(size_t lw, void * ptr_to_struct_containing_descr) { ptr_t * my_fl = ((GC_thread)GC_getspecific(GC_thread_key)) -> gcj_freelists + lw; ptr_t my_entry = *my_fl; GC_ASSERT(GC_gcj_malloc_initialized); if (EXPECT((word)my_entry >= HBLKSIZE, 1)) { GC_PTR result = (GC_PTR)my_entry; ...
false
false
false
false
false
0
sge_run_as_user(void) { int ret = 0; DENTER(UIDGID_LAYER, "sge_run_as_user"); if(geteuid() != getuid()) { if (seteuid(getuid())) { ret = -1; } } DEXIT; return ret; }
false
false
false
false
false
0
pat_match_dir(struct sample *smp, struct pattern_expr *expr, int fill) { struct pattern_list *lst; struct pattern *pattern; list_for_each_entry(lst, &expr->patterns, list) { pattern = &lst->pat; if (match_word(smp, pattern, expr->mflags, make_4delim('/', '?', '?', '?'))) return pattern; } return NULL; }
false
false
false
false
false
0
host_stop(struct ci_hdrc *ci) { struct usb_hcd *hcd = ci->hcd; if (hcd) { usb_remove_hcd(hcd); usb_put_hcd(hcd); if (ci->platdata->reg_vbus && !ci_otg_is_fsm_mode(ci) && (ci->platdata->flags & CI_HDRC_TURN_VBUS_EARLY_ON)) regulator_disable(ci->platdata->reg_vbus); } }
false
false
false
false
false
0
metadataChanged( Meta::TrackPtr track ) { // first metadataChanged() from a MetaProxy::Track means that it has found the real track bool isEmpty; { QMutexLocker locker( &m_unresolvedTracksMutex ); m_unresolvedTracks.remove( track ); isEmpty = m_unresolvedTracks.isEmpty(); } ...
false
false
false
false
false
0
bus_config_parser_steal_policy (BusConfigParser *parser) { BusPolicy *policy; _dbus_assert (parser->policy != NULL); /* can only steal the policy 1 time */ policy = parser->policy; parser->policy = NULL; return policy; }
false
false
false
false
false
0
start_address_completion(gchar *folderpath) { gboolean different_book = FALSE; clear_completion_cache(); if (strcmp2(completion_folder_path,folderpath)) different_book = TRUE; g_free(completion_folder_path); if (folderpath != NULL) completion_folder_path = g_strdup(folderpath); else completion_folder_path...
false
false
false
false
false
0
cpl_column_conjugate(cpl_column *column) { const char *fid = "cpl_column_conjugate"; cpl_type type = cpl_column_get_type(column); if (column == 0x0) return cpl_error_set(fid, CPL_ERROR_NULL_INPUT); switch (type) { case CPL_TYPE_FLOAT: case CPL_TYPE_DOUBLE: ...
false
false
false
false
false
0
cs4349_digital_mute(struct snd_soc_dai *dai, int mute) { struct snd_soc_codec *codec = dai->codec; int reg; reg = 0; if (mute) reg = MUTE_AB_MASK; return snd_soc_update_bits(codec, CS4349_MUTE, MUTE_AB_MASK, reg); }
false
false
false
false
false
0
trav_addr_add(trav_addr_t *visited, haddr_t addr, const char *path) { size_t idx; /* Index of address to use */ /* Allocate space if necessary */ if(visited->nused == visited->nalloc) { visited->nalloc = MAX(1, visited->nalloc * 2);; visited->objs = HDrealloc(visited->objs, visited-...
false
false
false
false
false
0
fz_free_shade_imp(fz_context *ctx, fz_storable *shade_) { fz_shade *shade = (fz_shade *)shade_; if (shade->colorspace) fz_drop_colorspace(ctx, shade->colorspace); if (shade->type == FZ_FUNCTION_BASED) fz_free(ctx, shade->u.f.fn_vals); fz_free_compressed_buffer(ctx, shade->buffer); fz_free(ctx, shade); }
false
false
false
false
false
0
initLabels(const QStringList & labels, bool singleRow, const QString & chipLabel) { QFrame * frame = new QFrame(); QVBoxLayout * vLayout = new QVBoxLayout(); QLabel * label = new QLabel("<h2>" + chipLabel + "</h2>"); label->setAlignment(Qt::AlignCenter); QFrame * subFrame = new QFrame(); if (singleRow) { QGri...
false
false
false
false
false
0
tgsi_build_declaration_semantic( unsigned semantic_name, unsigned semantic_index, struct tgsi_declaration *declaration, struct tgsi_header *header ) { struct tgsi_declaration_semantic ds; assert( semantic_name <= TGSI_SEMANTIC_COUNT ); assert( semantic_index <= 0xFFFF ); ds.Name = semantic_nam...
false
false
false
false
false
0
recv (void* msg, size_t size) { //FUZZ: enable check_for_lack_ACE_OS AutoLock lock (mutex_); while (true) { throw_if_failed (); if (!in_recv_data_.empty ()) { MessagePtr m (in_recv_data_.front ()); in_recv_data_.pop (); std::type_info c...
false
false
false
false
false
0
address(source) struct symstruct *source; { if (source->indcount == 0) bugerror("taking address of non-lvalue"); else { if (source->type->constructor & (ARRAY | FUNCTION)) bugerror("botched indirect array or function"); else if (--source->indcount == 0 && source->storage == GLOBAL && !(source->fl...
false
false
false
false
false
0
qca_wq_serial_rx_clock_vote_off(struct work_struct *work) { struct qca_data *qca = container_of(work, struct qca_data, ws_rx_vote_off); struct hci_uart *hu = qca->hu; BT_DBG("hu %p rx clock vote off", hu); serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_OFF, hu); }
false
false
false
false
false
0
NewFolderNode() /* * FUNCTION: Creates a new folder node * RETURNS: * Pointer to node if there was enough free memory available, otherwise NULL */ { PCFFOLDER_NODE Node; Node = (PCFFOLDER_NODE)AllocateMemory(sizeof(CFFOLDER_NODE)); if (!Node) return NULL; memset(Node, 0, sizeof(CFFOLDE...
false
false
false
false
false
0
create_ggobi (InputDescription * desc) { gboolean init_data = true; ggobid *gg; gg = ggobi_alloc (NULL); /*-- some initializations --*/ gg->displays = NULL; gg->control_panels = NULL; globals_init (gg); /*-- variables that don't depend on the data --*/ special_colors_init (gg); make_ui (gg);...
false
false
false
true
false
1
getParam(const int pos, OFCmdFloat &value) { if (findParam(pos)) { OFBool success = OFFalse; value = OFStandard::atof((*ArgumentIterator).c_str(), &success); if (success) return PVS_Normal; return PVS_Invalid; } re...
false
false
false
false
false
0
setup_sparse(struct archive_read_disk *a, struct archive_entry *entry, int *fd) { char buff[4096]; struct fiemap *fm; struct fiemap_extent *fe; int64_t size; int count, do_fiemap; int exit_sts = ARCHIVE_OK; if (archive_entry_filetype(entry) != AE_IFREG || archive_entry_size(entry) <= 0 || archive_...
true
true
false
false
true
1
box_covered( struct box *box1, struct box *box2){ /* box1 in box2, +1..-1 frame for pixel-patterns */ if ( ( box1->x0>=box2->x0-1 && box1->x1<=box2->x1+1 ) && ( box1->y0>=box2->y0-1 && box1->y1<=box2->y1+1 ) ) return 1; return 0; }
false
false
false
false
false
0
get_max_array_du_semnode_size(const Array_def_use_table_semnode *du_head, Array_table *array_head) { const Array_def_use_table_semnode *apt; Array_table *atbl; int size = 0; for (apt = du_head; apt != NULL; apt = apt->next) { atbl = search_array_table(array_head, a...
false
false
false
false
false
0
circuit_consider_sending_sendme(circuit_t *circ, crypt_path_t *layer_hint) { // log_fn(LOG_INFO,"Considering: layer_hint is %s", // layer_hint ? "defined" : "null"); while ((layer_hint ? layer_hint->deliver_window : circ->deliver_window) <= CIRCWINDOW_START - CIRCWINDOW_INCREMENT) { log_debug(L...
false
false
false
false
false
0
__ecereMethod_ModelView_OnLoadGraphics(struct __ecereNameSpace__ecere__com__Instance * this) { struct ModelView * __ecerePointer_ModelView = (struct ModelView *)(this ? (((char *)this) + __ecereClass_ModelView->offset) : 0); if(__ecereMethod___ecereNameSpace__ecere__gfx3D__Object_Load(__ecerePointer_ModelView->model, ...
false
false
false
true
false
1
ve_ShowAlg(void) { int alg = patch_edit_get_edit_parameter(134), x, y; char *s = veAlg[alg]; int t; csetcolor(COLOR_LABEL); for (y = 11; y <= 19; y++) { x = 56; cmove(y, x); for (; x <= 72; x++) { switch (*s) { case '1': t = (!!(re_OpSe...
false
false
false
false
false
0
hexec_fatal(const char* str, ...) { if(log_out_fd == -1) return; va_list va; va_start(va, str); //dprintf(log_out_fd, "hexec: "); vdprintf(log_out_fd, str, va); va_end(va); exit(EXIT_FAILURE); }
false
false
false
false
false
0
slotRedirection( const KUrl &url) { Q_Q(StatJob); kDebug(7007) << m_url << "->" << url; if (!KAuthorized::authorizeUrlAction("redirect", m_url, url)) { kWarning(7007) << "Redirection from " << m_url << " to " << url << " REJECTED!"; q->setError( ERR_ACCESS_DENIED ); q->setErrorT...
false
false
false
false
false
0
accessible_base_p (tree t, tree base) { tree decl; /* [class.access.base] A base class is said to be accessible if an invented public member of the base class is accessible. If BASE is a non-proper base, this condition is trivially true. */ if (same_type_p (t, base)) return true; /...
false
false
false
false
false
0
nested_vmx_store_msr(struct kvm_vcpu *vcpu, u64 gpa, u32 count) { u32 i; struct vmx_msr_entry e; for (i = 0; i < count; i++) { struct msr_data msr_info; if (kvm_vcpu_read_guest(vcpu, gpa + i * sizeof(e), &e, 2 * sizeof(u32))) { pr_warn_ratelimited( "%s cannot read MSR entry (%u, 0x%08llx)\n", ...
false
false
false
false
false
0
test_commit_parse__leading_lf(void) { git_commit *commit; const char *buffer = "tree 1810dff58d8a660512d4832e740f692884338ccd\n\ parent e90810b8df3e80c413d903f631643c716887138d\n\ author Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\ committer Vicent Marti <tanoku@gmail.com> 1273848544 +0200\n\ \n\ \n\ \n\ This ...
false
false
false
false
false
0
printUndefinedMembers (std::ostream &os) { os << "\tundefined members:" ; Scope::VarMap::iterator i = variables.begin() ; for (; i != variables.end() ; i++) { if (i->first[0] == '.') { Tag *tag = (Tag*)i->second ; if (tag->flags & VAR_PREDEFINED) { os << "\n\t...
false
false
false
false
false
0
login_dialog_close (EogPostasaPlugin *plugin) { /* abort the authentication attempt if in progress and we're cancelling */ g_cancellable_cancel (plugin->priv->login_cancellable); gtk_widget_hide (GTK_WIDGET (plugin->priv->login_dialog)); if (plugin->priv->uploads_pending == TRUE) { plugin->priv->uploads_pending ...
false
false
false
false
false
0
brightnessEffect(uint8_t buffer[][3], bool reset) { static int gyroYid, gyroZid, gyroXid =- 1; static uint8_t brightness = 0; if (gyroXid < 0) { //Init gyroXid = logGetVarId("gyro", "x"); gyroYid = logGetVarId("gyro", "y"); gyroZid = logGetVarId("gyro", "z"); } else { int i; int ...
false
false
false
false
false
0
pfs_fchownat( int dirfd, const char *path, uid_t owner, gid_t group, int flags ) { char newpath[PFS_PATH_MAX]; pfs_current->table->complete_at_path(dirfd,path,newpath); #ifdef AT_SYMLINK_NOFOLLOW if(flags&AT_SYMLINK_NOFOLLOW) { return pfs_lchown(newpath,owner,group); } #endif return pfs_chown(newpath,owner,group...
false
false
false
false
false
0
NewFastGeomQuad(int numPts) { if (this->FastGeomQuadArrayLength == 0) { vtkErrorMacro("Face hash allocation has not been initialized."); return NULL; } // see if there's room for this one int polySize = sizeofFastQuad(numPts); if(this->NextQuadIndex + polySize > this->FastGeomQuadArrayLength)...
false
false
false
false
false
0
gerb_fgetint(gerb_file_t *fd, int *len) { long int result; char *end; errno = 0; result = strtol(fd->data + fd->ptr, &end, 10); if (errno) { GERB_COMPILE_ERROR("Failed to read integer"); return 0; } if (len) { *len = end - (fd->data + fd->ptr); } fd->ptr = end - fd->data; ...
false
false
false
false
false
0
tomoyo_realpath_nofollow(const char *pathname) { struct path path; if (pathname && kern_path(pathname, 0, &path) == 0) { char *buf = tomoyo_realpath_from_path(&path); path_put(&path); return buf; } return NULL; }
false
false
false
false
false
0
iface_setup_from_boot_context(struct iface_rec *iface, struct boot_context *context) { struct iscsi_transport *t = NULL; uint32_t hostno; if (strlen(context->initiatorname)) strlcpy(iface->iname, context->initiatorname, sizeof(iface->iname)); if (strlen(context->scsi_host_name)) { if (sscanf(context...
false
false
false
false
false
0
epp_stream_error (struct vink_epp_state *state, const char *type, const char *format, ...) { va_list args; char *buf; int result; epp_write (state, "<error xml:lang='en'>"); if (format) { va_start (args, format); result = vasprintf (&buf, format, args); if (result =...
false
false
false
false
false
0
Read(ptr, size, nitems, stream) char *ptr; int size; int nitems; FILE *stream; { size *= nitems; while (size) { nitems = fread(ptr, 1, size, stream); if (nitems <= 0) return False; size -= nitems; ptr += nitems; } return True; }
false
false
false
false
false
0
FvhFbhPostTreat( FsmFigure ) fsmfig_list *FsmFigure; { fvhfig_list *ScanFigList; fsmfig_list *Figure; fsmstate_list *StarState; chain_list *StarChain; fsmtrans_list *ScanTrans; ablexpr *Equation; for ( ScanFigList = FvhHeadFigList; ScanFigList != (fvhfig_list *)0; ScanFig...
false
false
false
false
false
0
dup_name(dns_name_t *source, dns_name_t *target, isc_mem_t *mctx) { isc_result_t result; if (dns_name_dynamic(target)) free_name(target, mctx); result = dns_name_dup(source, mctx, target); check_result(result, "dns_name_dup"); }
false
false
false
false
false
0
_updateContainsFootnoteRef(void) { m_bContainsFootnoteRef = false; UT_sint32 count = m_vecRuns.getItemCount(); for (UT_sint32 i = 0; i < count; i++) { const fp_Run * r = static_cast<const fp_Run *>(m_vecRuns.getNthItem(i)); if (r->getType() == FPRUN_FIELD) { const fp_FieldRun * fr = static_cast<const fp_F...
false
false
false
false
false
0
PE1main(pe_data_t *pedata) { int total = 0, index = 1, condition = 0; for (index = 1; index < 1000; index++) { condition = multiple_of_three_or_five (index); if (condition == 1) total = total + index; } if (pedata->verbosity > 0) printf ("Total: %i\...
false
true
false
false
false
1
snd_cs46xx_reset(struct snd_cs46xx *chip) { int idx; /* * Write the reset bit of the SP control register. */ snd_cs46xx_poke(chip, BA1_SPCR, SPCR_RSTSP); /* * Write the control register. */ snd_cs46xx_poke(chip, BA1_SPCR, SPCR_DRQEN); /* * Clear the trap registers. */ for (idx = 0; idx < 8; idx...
false
false
false
false
false
0
gst_message_get_seqnum (GstMessage * message) { g_return_val_if_fail (GST_IS_MESSAGE (message), -1); return GST_MESSAGE_SEQNUM (message); }
false
false
false
false
false
0