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
_talloc_total_blocks(const void *ptr) { size_t total = 0; struct talloc_chunk *c, *tc = talloc_chunk_from_ptr(ptr); if (tc->flags & TALLOC_FLAG_LOOP) { return 0; } tc->flags |= TALLOC_FLAG_LOOP; total++; for (c=tc->child;c;c=c->next) { total += _talloc_total_blocks(TC_PTR_FROM_CHUNK(c)); } tc->flags &=...
false
false
false
false
false
0
xml_strcell(FILE *outf, Outchoices *od, choice rep, choice col, char *s, unsigned int width) { XML_TRACE(0); XML_OUT( XMLDBG "<col name=\"%s\">", strtolower(column_name[col]) ); switch( col ) { case COL_TIME: case COL_FIRSTT: case COL_DATE: case COL_FIRSTD: if ( strlen(s) ) XML_OUT( "<timespan from=\"%s\"/...
false
false
false
false
false
0
r_owned(struct SN_env * z) { int among_var; z->ket = z->c; /* [, line 154 */ if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 233)) return 0; among_var = find_among_b(z, a_9, 12); /* substring, line 154 */ if (!(among_var)) return 0; z->bra = z->c; /* ], line 154 */ { int r...
false
false
false
false
false
0
constructed (GObject *object) { NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (object); NMConnection *connection; NMDevice *device; G_OBJECT_CLASS (nm_vpn_connection_parent_class)->constructed (object); connection = nm_active_connection_get_connection (NM_ACTIVE_CONNECTION (object)); priv->connec...
false
false
false
false
false
0
freeze_workqueues_begin(void) { struct workqueue_struct *wq; struct pool_workqueue *pwq; mutex_lock(&wq_pool_mutex); WARN_ON_ONCE(workqueue_freezing); workqueue_freezing = true; list_for_each_entry(wq, &workqueues, list) { mutex_lock(&wq->mutex); for_each_pwq(pwq, wq) pwq_adjust_max_active(pwq); mutex...
false
false
false
false
false
0
rm(int argc, const char **argv) { struct option options[] = { OPT_END() }; struct remote *remote; struct strbuf buf = STRBUF_INIT; struct known_remotes known_remotes = { NULL, NULL }; struct string_list branches = STRING_LIST_INIT_DUP; struct string_list skipped = STRING_LIST_INIT_DUP; struct branches_for_rem...
false
false
false
false
true
1
lru_deactivate_file_fn(struct page *page, struct lruvec *lruvec, void *arg) { int lru, file; bool active; if (!PageLRU(page)) return; if (PageUnevictable(page)) return; /* Some processes are using the page */ if (page_mapped(page)) return; active = PageActive(page); file = page_is_file_cache(...
false
false
false
false
false
0
find_offset(const uint8_t *cstr, int clen, const uint8_t *dname) { const uint8_t *c, *d; int off; /* find all labels in cstr */ off = 0; while (off < clen) { c = cstr + off; if ((*c & NS_CMPRSFLGS) == NS_CMPRSFLGS) { /* pointer, skip */ off += 2; continue; } if (*c) { /* label, try matching dname...
false
false
false
false
false
0
evaluateDegConnection(double *p11, double *p12, double *p13, double *p14, double *p21, double *p22, double *p23, double *p24, double *p31, double *p32, double *p33, double *p34, double *n12, double *n13, double *n22, double *n23, do...
false
false
false
false
false
0
handle_edit_startpos(const struct packet_edit_startpos *packet) { struct tile *ptile = index_to_tile(packet->id); bool changed = FALSE; /* Check. */ if (NULL == ptile) { log_error("%s(): invalid tile index %d.", __FUNCTION__, packet->id); return; } /* Handle. */ if (packet->remove) { changed...
false
false
false
false
false
0
merge() { // GNASH_REPORT_FUNCTION; return merge(_que.front()); }
false
false
false
false
false
0
be_get_phys_port_id(struct net_device *dev, struct netdev_phys_item_id *ppid) { int i, id_len = CNTL_SERIAL_NUM_WORDS * CNTL_SERIAL_NUM_WORD_SZ + 1; struct be_adapter *adapter = netdev_priv(dev); u8 *id; if (MAX_PHYS_ITEM_ID_LEN < id_len) return -ENOSPC; ppid->id[0] = adapter->hba_port_num + 1; id =...
false
false
false
false
false
0
update_halftone(halftone_screen *halftone) { int x, y, i; XWindowAttributes attrs; XGetWindowAttributes(halftone->dpy, halftone->window, &attrs); /* Make sure we have a valid buffer */ update_buffer(halftone, &attrs); /* Make sure all dot attributes (spacing, width, height, etc) are correct */ update...
false
false
false
false
false
0
SwapIf(int i,int j){ if (i==j || i<0) return false; // safety memblock *e1=blocks(i),*e2=blocks(j); if (e1->value > e2->value){ Swap(blocks(i),blocks(j)); e1->hID=j; e2->hID=i; return true; } else return false; }
false
false
false
false
false
0
PyLong_GetInfo(void) { PyObject* int_info; int field = 0; int_info = PyStructSequence_New(&Int_InfoType); if (int_info == NULL) return NULL; PyStructSequence_SET_ITEM(int_info, field++, PyLong_FromLong(PyLong_SHIFT)); PyStructSequence_SET_ITEM(int_info, fiel...
false
false
false
false
true
1
igb_run_loopback_test(struct igb_adapter *adapter) { struct igb_ring *tx_ring = &adapter->test_tx_ring; struct igb_ring *rx_ring = &adapter->test_rx_ring; u16 i, j, lc, good_cnt; int ret_val = 0; unsigned int size = IGB_RX_HDR_LEN; netdev_tx_t tx_ret_val; struct sk_buff *skb; /* allocate test skb */ skb = all...
false
false
false
false
false
0
mark_page_dirty_in_slot(struct kvm_memory_slot *memslot, gfn_t gfn) { if (memslot && memslot->dirty_bitmap) { unsigned long rel_gfn = gfn - memslot->base_gfn; set_bit_le(rel_gfn, memslot->dirty_bitmap); } }
false
false
false
false
false
0
git_blob_create_frombuffer(git_oid *oid, git_repository *repo, const void *buffer, size_t len) { int error; git_odb_stream *stream; if ((error = git_odb_open_wstream(&stream, repo->db, len, GIT_OBJ_BLOB)) < GIT_SUCCESS) return git__rethrow(error, "Failed to create blob. Can't open write stream"); stream->write(...
false
false
false
false
false
0
defaultSizes(int width, int height) { for (int i=0; defaultAppearance[i].maxheight; i++) { if (height > defaultAppearance[i].maxheight && width > defaultAppearance[i].maxwidth) continue; else return defaultAppearance[i]; } return defaultAppearance[0]; // shouldn't get here }
false
false
false
false
false
0
request_phantoms(Xfer *pXfer, int maxReq){ Stmt q; db_prepare(&q, "SELECT uuid FROM phantom JOIN blob USING(rid)" " WHERE NOT EXISTS(SELECT 1 FROM shun WHERE uuid=blob.uuid) %s", (pXfer->syncPrivate ? "" : " AND NOT EXISTS(SELECT 1 FROM private WHERE rid=blob.rid)") ); while( db_step(&q)...
false
false
false
false
false
0
parse_color_field(struct ccd_frame *fr, char *default_cfa) { char str[80]; float r, g, gp, b; if (fr->magic & FRAME_VALID_RGB) { /* Only process CFA attributes for RAW files */ return 0; } if(fits_get_string(fr, "CFA_FMT", str, 80) <= 0) { if(! default_cfa || strncmp(default_cfa, "none", 5) == 0) { ...
false
false
false
false
false
0
current_value() { unsigned int tmr2_val = (get_cycles().get() - last_cycle)/ prescale; value.put(tmr2_val & 0xff); if(tmr2_val > 0x100) // Can get to 0x100 during transition { cout << "TMR2 BUG!! value = " << tmr2_val << " which is greater than 0xff\n"; } }
false
false
false
false
false
0
readNext() { Event e; if(d->handler->needMore) return e; Event *ep = d->handler->takeEvent(); if(!ep) { if(!d->reader->parseContinue()) { e.setError(); return e; } ep = d->handler->takeEvent(); if(!ep) return e; } e = *ep; delete ep; return e; }
false
false
false
false
false
0
time_modify(time) VALUE time; { rb_check_frozen(time); if (!OBJ_TAINTED(time) && rb_safe_level() >= 4) rb_raise(rb_eSecurityError, "Insecure: can't modify Time"); }
false
false
false
false
false
0
vbi_buffer_prepare(struct vb2_buffer *vb) { struct em28xx *dev = vb2_get_drv_priv(vb->vb2_queue); struct em28xx_v4l2 *v4l2 = dev->v4l2; unsigned long size; size = v4l2->vbi_width * v4l2->vbi_height * 2; if (vb2_plane_size(vb, 0) < size) { printk(KERN_INFO "%s data will not fit into plane (%lu ...
false
false
false
false
false
0
tty_resize() { char *env; char buf[32]; int shell_lines = 0, shell_columns = 0; int termcap_lines = 0, termcap_columns = 0; #ifdef HAVE_WINSZ struct winsize winsz; int winsz_lines = 0, winsz_columns = 0; #endif /* HAVE_WINSZ */ #ifdef HAVE_WINSZ #if defined TIOCGSIZE && !defined TIOCGWINSZ #de...
false
false
false
false
false
0
qh_crossproduct (int dim, realT vecA[3], realT vecB[3], realT vecC[3]){ if (dim == 3) { vecC[0]= det2_(vecA[1], vecA[2], vecB[1], vecB[2]); vecC[1]= - det2_(vecA[0], vecA[2], vecB[0], vecB[2]); vecC[2]= det2_(vecA[0], vecA[1], vecB[0], vecB[1]); } }
false
false
false
false
false
0
inlinable_function_p (fn, id) tree fn; inline_data *id; { int inlinable; int currfn_insns; int max_inline_insns_single = MAX_INLINE_INSNS_SINGLE; /* If we've already decided this function shouldn't be inlined, there's no need to check again. */ if (DECL_UNINLINABLE (fn)) return 0; /* A...
false
false
false
false
false
0
_cmsGetTagDescriptor(cmsContext ContextID, cmsTagSignature sig) { _cmsTagLinkedList* pt; _cmsTagPluginChunkType* TagPluginChunk = ( _cmsTagPluginChunkType*) _cmsContextGetClientChunk(ContextID, TagPlugin); for (pt = TagPluginChunk->Tag; pt != NULL; pt = pt ->Next) { ...
false
false
false
false
false
0
CopyToken( char *src, char *dest, char *spaces, int snum, char *delims, int dnum, char *out_delim) { int len = 0; char *t; while (*src != 0 && !(isspace((unsigned char)*src) || (snum && strchr(spaces, *src)) || (dnum && strchr(delims, *src)))) { /* Check for quoted text */ if (IsQuote(*src)...
false
false
false
false
false
0
gs_copied_font_add_encoding(gs_font *copied, gs_char chr, gs_glyph glyph) { gs_copied_font_data_t *const cfdata = cf_data(copied); if (copied->procs.font_info != copied_font_info) return_error(gs_error_rangecheck); return cfdata->procs->add_encoding(copied, chr, glyph); }
false
false
false
false
false
0
tty_write(char *buf, int len) { int in_esc = 0; /* escapes can't straddle writes */ int esc_state = 0; if (discard) return len; /* Ignore NULs */ if (len == 1 && *buf == 0) return len; /* FF is a special case (perhaps!) */ if (len == 1 && buf[0] == '\f') { last_char = '\f'; return write(termfd, "\033...
false
false
false
false
true
1
sun6i_dma_tx_status(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *state) { struct sun6i_vchan *vchan = to_sun6i_vchan(chan); struct sun6i_pchan *pchan = vchan->phy; struct sun6i_dma_lli *lli; struct virt_dma_desc *vd; struct sun6i_desc *txd; enum dma_status ret; unsigned long f...
false
false
false
false
false
0
init_reg_sets (void) { int i, j; /* First copy the register information from the initial int form into the regsets. */ for (i = 0; i < N_REG_CLASSES; i++) { CLEAR_HARD_REG_SET (reg_class_contents[i]); /* Note that we hard-code 32 here, not HOST_BITS_PER_INT. */ for (j = 0; j < FIRS...
false
true
false
false
false
1
Decrypt() { Decryptor *decryptor = new Decryptor(_state->private_inner_keys, _state->encrypted_data); QObject::connect(decryptor, SIGNAL(Finished(const QVector<QByteArray> &, const QVector<int> &)), this, SLOT(DecryptDone(const QVector<QByteArray> &, const QVector<int> &)), Qt::QueuedC...
false
false
false
false
false
0
get_unseen_seq_name(void) { static gchar *seq_name = NULL; if (!seq_name) { gchar buf[BUFFSIZE]; gchar *tmp; gchar *profile_path = g_strconcat( get_home_dir(), G_DIR_SEPARATOR_S, ".mh_profile", NULL); FILE *fp = g_fopen(profile_path, "r"); if (fp) { while (fgets(buf, sizeof(buf), fp) != NULL) { ...
false
false
false
false
false
0
io_timeouted() { tai6464 now; static long ptr; io_entry* e; long alen=array_length(&io_fds,sizeof(io_entry)); taia_now(&now); ++ptr; if (ptr>=alen) ptr=0; e=array_get(&io_fds,sizeof(io_entry),ptr); if (!e) return -1; for (;ptr<alen; ++ptr,++e) { if (e->inuse && e->timeout.sec.x && taia_less(&e->...
false
false
false
false
false
0
zcopy_integer(i_ctx_t *i_ctx_p) { os_ptr op = osp; os_ptr op1 = op - 1; int count, i; int code; if ((uint) op->value.intval > (uint)(op - osbot)) { /* There might be enough elements in other blocks. */ check_type(*op, t_integer); if (op->value.intval >= (int)ref_stack_count(...
false
true
false
false
false
1
multiseq_print_tree(add_susp_type susp, int n) { int i; indent(n); if (!susp->multiseq) { xlfail("internal error: missing multiseq structure"); } nyquist_printf("multiseq@%p = [ ", susp->multiseq); for (i = 0; i < susp->multiseq->nchans; i++) { if (susp->multiseq->chans[i]) { ...
false
false
false
true
false
1
main(int argc, char **argv) { const char *device; if (argc != 6) { fprintf(stderr, "Usage: %s tap_device host_IP atari_IP netmask mtu_size\n", argv[0]); return -1; } device = argv[1]; /* Make sure this is a tap device - don't allow messing with other * interfaces. Poor security is ...
false
false
false
false
true
1
Export(void *output) { if (!this->GetPointerToData()) { // GetPointerToData() outputs an error message. return; } if (this->ImageLowerLeft) { memcpy(output,this->GetPointerToData(),this->GetDataMemorySize()); } else { // flip the image when it is output void *ptr = this->Get...
false
false
false
false
false
0
base_tv_destroy(tview_t* tv) { bam_lplbuf_destroy(tv->lplbuf); bcf_call_destroy(tv->bca); bam_index_destroy(tv->idx); if (tv->fai) fai_destroy(tv->fai); free(tv->ref); bam_header_destroy(tv->header); bam_close(tv->fp); }
false
false
false
false
false
0
A_DropMace(mobj_t * actor) { mobj_t *mo; mo = P_SpawnMobj(actor->x, actor->y, actor->z + (actor->height >> 1), MT_ETTIN_MACE); if (mo) { mo->momx = (P_Random() - 128) << 11; mo->momy = (P_Random() - 128) << 11; mo->momz = FRACUNIT * 10 + (P_Random() << 10); ...
false
false
false
false
false
0
isConnected(Agraph_t * g) { Agnode_t *n; int ret = 1; int cnt = 0; stk_t stk; blk_t blk; Agnode_t* base[INITBUF]; for (n = agfstnode(g); n; n = agnxtnode(g, n)) UNMARK(n); n = agfstnode(g); if (n) { initStk (&stk, &blk, base); if (setjmp(jbuf)) { freeStk (&stk); return...
false
false
false
false
false
0
compute_g_max(HMMWork *wrk, HTK_HMM_State *stateinfo, int *last_maxi) { int i, maxi; LOGPROB prob; LOGPROB maxprob = LOG_ZERO; int s; PROB stream_weight; LOGPROB logprobsum; logprobsum = 0.0; for(s=0;s<wrk->OP_nstream;s++) { /* set stream weight */ if (stateinfo->w) stream_weight = stateinfo->w...
false
false
false
false
false
0
Initialize_IOType_transport_impl(const int direction, const int index) { int return_status = REG_SUCCESS; socket_info_type* socket_info = &(socket_info_table.socket_info[index]); /* set up socket info stuff */ if(socket_info_init(socket_info) != REG_SUCCESS) { #ifdef REG_DEBUG fprintf(stderr, "STEER: Init...
false
false
false
false
false
0
ssd_check_pl_cap_fast(struct ssd_device *dev) { uint32_t u1; uint16_t val = 0; int ret = 0; if (dev->protocol_info.ver < SSD_PROTOCOL_V3_2) { return 0; } if (dev->hw_info_ext.form_factor == SSD_FORM_FACTOR_FHHL && dev->hw_info.pcb_ver < 'B') { return 0; } /* cap ready ? */ ret = ssd_smbus_read_word(dev,...
false
false
false
false
false
0
gdata_calendar_service_query_all_calendars_async (GDataCalendarService *self, GDataQuery *query, GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GDestroyNotify destro...
false
false
false
false
false
0
_evsig_restore_handler(struct event_base *base, int evsignal) { int ret = 0; struct evsig_info *sig = &base->sig; #ifdef _EVENT_HAVE_SIGACTION struct sigaction *sh; #else ev_sighandler_t *sh; #endif /* restore previous handler */ sh = sig->sh_old[evsignal]; sig->sh_old[evsignal] = NULL; #ifdef _EVENT_HAVE_SIGAC...
false
false
false
false
false
0
eti_get_row_at_index (AtkTable *table, gint index) { ETableItem *item; item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table))); if (!item) return -1; return index / item->cols - 1; }
false
false
false
false
false
0
gauche__threadsmutex_unlockX(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj mutex_scm; ScmMutex* mutex; ScmObj cv_scm; ScmObj cv; ScmObj timeout_scm; ScmObj timeout; ScmObj SCM_SUBRARGS[5]; int SCM_i; SCM_ENTER_SUBR("mutex-unlock!"); if (SCM_ARGCNT >= 4 && !SCM_NULLP(SCM_ARGREF(SCM_ARGC...
false
false
false
false
false
0
audio_info_is_equal (GstAudioInfo * from, GstAudioInfo * to) { if (from == to) return TRUE; if (from->finfo == NULL || to->finfo == NULL) return FALSE; if (GST_AUDIO_INFO_FORMAT (from) != GST_AUDIO_INFO_FORMAT (to)) return FALSE; if (GST_AUDIO_INFO_RATE (from) != GST_AUDIO_INFO_RATE (to)) return...
false
false
false
false
false
0
internal_loadFromConfigFile_common( const mrpt::utils::CConfigFileBase &iniFile, const std::string &section) { sigma = iniFile.read_float(section.c_str(),"sigma",sigma); cutoffRadius = iniFile.read_float(section.c_str(),"cutoffRadius",cutoffRadius); R_min = iniFile.read_float(section.c_str(),"R_min",R_m...
false
false
false
false
false
0
smp_open(const struct stevedore *st) { struct smp_sc *sc; ASSERT_CLI(); CAST_OBJ_NOTNULL(sc, st->priv, SMP_SC_MAGIC); Lck_New(&sc->mtx, lck_smp); Lck_Lock(&sc->mtx); sc->stevedore = st; /* We trust the parent to give us a valid silo, for good measure: */ AZ(smp_valid_silo(sc)); AZ(mprotect(sc->base, 4096...
false
false
false
true
false
1
check_local_idref(HSCPRC * hp, IDREF * idref) { HSCIDD *iddef = find_iddef(hp->project->document, idref->name); BOOL found = FALSE; if (iddef) { found = TRUE; DIHP(fprintf(stderr, DHL " local id ok: `%s'\n", idref->name)); } else { DIHP( { ...
false
false
false
false
true
1
tdfx_waitidle( TDFXDriverData *tdrv, TDFXDeviceData *tdev ) { int i = 0; int timeout = 1000000; // tdfx_waitfifo( tdrv, tdev, 1 ); // voodoo3D->nopCMD = 0; while (timeout--) { tdev->idle_waitcycles++; i = (tdrv->voodoo2D->status & (0xF << ...
false
false
false
false
false
0
matsushita_build_paper_sizes (Matsushita_Scanner * dev) { SANE_String_Const *psl; /* string list */ int *psv; /* value list */ int num; int i; DBG (DBG_proc, "matsushita_build_paper_sizes: enter\n"); psl = malloc ((sizeof (SANE_String_Const) + 1) * NELEMS (paper_sizes)); if (psl == NULL) { D...
false
false
false
false
true
1
entry_set_byte_order (ExifEntry *e, void *data) { ByteOrderChangeData *d = data; if (!e) return; exif_array_set_byte_order (e->format, e->data, e->components, d->old, d->new); }
false
false
false
false
false
0
FDKsbrEnc_addFIXP_DBL(const FIXP_DBL *X, const FIXP_DBL *Y, FIXP_DBL *Z, INT n) { for (INT i=0; i<n; i++) Z[i] = (X[i]>>1) + (Y[i]>>1); }
false
false
false
false
false
0
PutDecodedDatumInto(const TestData &data, const char *name, BufferedTransformation &target) { std::string s1 = GetRequiredDatum(data, name), s2; ByteQueue q; while (!s1.empty()) { while (s1[0] == ' ') { s1 = s1.substr(1); if (s1.empty()) goto end; // avoid invalid read if s1 is empty } int repea...
false
false
false
false
false
0
delayCmd(clientData, interp, objc, objv) ClientData clientData; /* The HTML widget data structure */ Tcl_Interp *interp; /* Current interpreter. */ int objc; /* Number of arguments. */ Tcl_Obj *CONST objv[]; /* Argument strings. */ { Ht...
false
false
false
false
false
0
checkDeprecated(Loc loc, Scope *sc) { if (global.params.useDeprecated != 1 && isDeprecated()) { // Don't complain if we're inside a deprecated symbol's scope for (Dsymbol *sp = sc->parent; sp; sp = sp->parent) { if (sp->isDeprecated()) goto L1; } for (S...
false
false
false
false
false
0
AddQuadToHash(HashTable h, int p, int q, int r, int s, int *nQuad) { struct hash hash; SetupQuad(p, q, r, s, &hash); if (_QueryHash(h, &hash)) return OK; hash.index = *nQuad; *nQuad = *nQuad + 1; return DXInsertHashElement(h, (Element)&hash); }
false
false
false
false
false
0
createNewObjectBlock(GLEObjectDOConstructor* cons) { GLERC<GLEObjectDO> obj = cons->constructObject(); if (obj->getObjectRepresentation()->getRectangle()->getXMin() != -1.0) { gleScript->addNewObject(obj.get()); GLEObjectBlock *newObj = new GLEObjectBlock(dpi, pixmap.size(), this); objectList.append(newObj); ...
false
false
false
false
false
0
world_tree_remove_app(graph_view_handle view, uint64_t id) { GtkTreeIter view_iter; GtkTreeIter app_iter; const char * view_name; const char * app_name; GtkTreePath * path; if (!find_app(view, id, &view_iter, &app_iter)) { log_error("removed app not found"); return; } path = gtk_tree_model_g...
false
false
false
false
false
0
pa_ap_log_rerror(const char *file, int line, int level, const pa_request_rec *s, const char *fmt, ...) { const char* str; va_list l; va_start(l, fmt); str=va_arg(l, const char*); va_end(l); ap_log_rerror(file, line, #if (AP_SERVER_MAJORVERSION_NUMBER == 2) && (AP_SERVER_MINORVERSION_NUMBER >= 4) APLOG_MODUL...
false
false
false
false
false
0
_cdio_strfreev(char **strv) { int n; cdio_assert (strv != NULL); for(n = 0; strv[n]; n++) free(strv[n]); free(strv); }
true
true
false
true
false
1
sim_properties_reply(struct modem_data *modem, DBusMessageIter *dict) { DBG("%s", modem->path); while (dbus_message_iter_get_arg_type(dict) == DBUS_TYPE_DICT_ENTRY) { DBusMessageIter entry, value; const char *key; dbus_message_iter_recurse(dict, &entry); dbus_message_iter_get_basic(&entry, &key); db...
false
false
false
false
false
0
OptimizeAwayTrappingUsesOfValue(Value *V, Constant *NewV) { bool Changed = false; for (auto UI = V->user_begin(), E = V->user_end(); UI != E; ) { Instruction *I = cast<Instruction>(*UI++); if (LoadInst *LI = dyn_cast<LoadInst>(I)) { LI->setOperand(0, NewV); Changed = true; } else if (StoreIn...
false
false
false
false
false
0
rtl_wol_pll_power_down(struct rtl8169_private *tp) { if (!(__rtl8169_get_wol(tp) & WAKE_ANY)) return false; rtl_speed_down(tp); rtl_wol_suspend_quirk(tp); return true; }
false
false
false
false
false
0
isMemberVar(const Scope *scope, const Token *tok) const { bool again = false; // try to find the member variable do { again = false; if (tok->str() == "this") { return true; } else if (Token::simpleMatch(tok->tokAt(-3), "( * this )")) { return true; ...
false
false
false
false
false
0
rsn_audiomunge_sink_event (GstPad * pad, GstEvent * event) { gboolean ret = FALSE; RsnAudioMunge *munge = RSN_AUDIOMUNGE (gst_pad_get_parent (pad)); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_FLUSH_STOP: rsn_audiomunge_reset (munge); ret = gst_pad_push_event (munge->srcpad, event); br...
false
false
false
false
false
0
cs_config(CS_CONTEXT * ctx, CS_INT action, CS_INT property, CS_VOID * buffer, CS_INT buflen, CS_INT * outlen) { CS_INT maxcp; /* declared for - CS_USERDATA changes - swapna*/ tdsdump_log(TDS_DBG_FUNC, "cs_config(%p, %d, %d, %p, %d, %p)\n", ctx, action, property, buffer, buflen, outlen); if (action == CS_GET) { ...
false
true
false
false
false
1
Skip_white_space(line, index) char *line; int index; { /* skip white space */ while (line[index] == ' ' || line[index] == '\t') ++index; /* for(; */ /* line[index] == ' ' || line[index]=='\t' && line[index]!='\0'; */ /* index++) ; */ r...
false
false
false
false
false
0
tanconseq(tanflfig *flfig, tanpoly *polys, int *pntsuiv, tanfpnt *fpnts, double seuil){ int i,k; gboolean trouve, ret; int polynbr; int act; int suiva,suivb; polynbr = flfig->flpiecenbr; ret = FALSE; trouve = TRUE; while (trouve){ trouve = FALSE; for (i = 0; i<polynbr && !trouve; i++){ ...
false
false
false
false
false
0
omap_hsmmc_remove(struct platform_device *pdev) { struct omap_hsmmc_host *host = platform_get_drvdata(pdev); pm_runtime_get_sync(host->dev); mmc_remove_host(host->mmc); if (host->tx_chan) dma_release_channel(host->tx_chan); if (host->rx_chan) dma_release_channel(host->rx_chan); pm_runtime_put_sync(host->de...
false
false
false
false
false
0
str_rep (lua_State *L) { size_t l, lsep; const char *s = luaL_checklstring(L, 1, &l); int n = luaL_checkint(L, 2); const char *sep = luaL_optlstring(L, 3, "", &lsep); if (n <= 0) lua_pushliteral(L, ""); else if (l + lsep < l || l + lsep >= MAXSIZE / n) /* may overflow? */ return luaL_error(L, "resultin...
false
false
false
false
false
0
gog_series_set_fill_type (GogSeries *series, GogSeriesFillType fill_type) { GogSeriesClass *series_klass; g_return_if_fail (GOG_IS_SERIES (series)); if (series->fill_type == fill_type) return; g_return_if_fail (fill_type >= 0 && fill_type < GOG_SERIES_FILL_TYPE_INVALID); series_klass = GOG_SERIES_GET_CLASS (se...
false
false
false
true
false
1
nufa_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, dev_t rdev, mode_t umask, dict_t *params) { dht_local_t *local = NULL; dht_conf_t *conf = NULL; xlator_t *subvol = NULL; xlator_t *avail_subvol = NULL; int op_errno = -1; ...
false
false
false
false
false
0
opt_look_for_col_in_comparison_before( /*==================================*/ ulint cmp_type, /*!< in: OPT_EQUAL, OPT_COMPARISON */ ulint col_no, /*!< in: column number */ func_node_t* search_cond, /*!< in: comparison condition */ sel_node_t* sel_node, /*!< in: select node */ ulint nth_table, /*!< in: nth tabl...
false
false
false
false
false
0
mf_w_meta_event( unsigned long delta_time, unsigned int type, unsigned char *data, unsigned long size) { int i; WriteVarLen(delta_time); eputc(meta_event); laststat = meta_event; eputc(type); lastmeta = type; WriteVarLen(size); for(i = 0; i < size; i++) { if (eputc(data[i]) != data[i]) ret...
false
false
false
false
false
0
printCvtMode(const MCInst *MI, int OpNum, raw_ostream &O, const char *Modifier) { const MCOperand &MO = MI->getOperand(OpNum); int64_t Imm = MO.getImm(); if (strcmp(Modifier, "ftz") == 0) { // FTZ flag if (Imm & NVPTX::PTXCvtMode::FTZ_FLAG) O << ".ftz"; } else ...
false
false
false
false
false
0
ProcessLastBlock(byte *outString, const byte *inString, size_t length) { const byte *pn, *pn1; bool stealIV = length <= BlockSize(); if (stealIV) { pn = inString; pn1 = m_register; } else { pn = inString + BlockSize(); pn1 = inString; length -= BlockSize(); } // decrypt last partial plaintext block...
false
false
false
false
false
0
printHeader(std::ostream& stream) { stream << "\n\n"; if (wasSuccessful()) stream << "OK (" << runTests() << " tests)" << std::endl; else stream << "!!!FAILURES!!!" << std::endl << "Runs: " << runTests () << " Failures: " << testFailures...
false
false
false
false
false
0
configure(Vector<String> &conf, ErrorHandler *errh) { _ignore = 0; if (cp_va_kparse(conf, this, errh, "IGNORE", cpkP, cpUnsigned, &_ignore, cpEnd) < 0) return -1; _ignore *= CLICK_HZ; return 0; }
false
false
false
false
false
0
test_object_blob_filter__stats(void) { int i; git_blob *blob; git_buf buf = GIT_BUF_INIT; git_buf_text_stats stats; for (i = 0; i < CRLF_NUM_TEST_OBJECTS; i++) { cl_git_pass(git_blob_lookup(&blob, g_repo, &g_crlf_oids[i])); cl_git_pass(git_blob__getbuf(&buf, blob)); git_buf_text_gather_stats(&stats, &buf, f...
false
false
false
false
false
0
kf(void *handle) { if (!is_open) return; if (!lirc_claim()) return; parport_enable_irq(pport); lirc_off(); /* this is a bit annoying when you actually print...*/ /* printk(KERN_INFO "%s: reclaimed port\n", LIRC_DRIVER_NAME); */ }
false
false
false
false
false
0
cnr_arr_to_qual(uint32_t modulation, uint32_t fec, float cnr, struct cnr_to_qual_s *arr, unsigned len) { int i; for (i = 0; i < len; i++) { if (modulation == arr[i].modulation) { if (cnr < arr[i].cnr_ok) return DVB_QUAL_POOR; else if (cnr < arr[i].cnr_good) return DVB_QUAL_OK;...
false
false
false
false
false
0
tcp_seg_interleave_nulls(ELEM *seg) { ELEM *s; struct ip *iph; int ip_hl; if (!seg) return NULL; for (s = seg ; s != NULL ; s = s->next) { s = list_dup(s); iph = (struct ip *)s->data; ip_hl = iph->ip_hl * 4; /* Whack the sequence number with something bogus. */ ((struct tcphdr *)(s...
false
false
false
false
false
0
clutter_text_node_draw (ClutterPaintNode *node) { ClutterTextNode *tnode = CLUTTER_TEXT_NODE (node); PangoRectangle extents; guint i; if (node->operations == NULL) return; pango_layout_get_pixel_extents (tnode->layout, NULL, &extents); for (i = 0; i < node->operations->len; i++) { const Clu...
false
false
false
false
false
0
read(Lexer & lex, docstring const & name, bool makenew) { if (hasCounter(name)) { LYXERR(Debug::TCLASS, "Reading existing counter " << to_utf8(name)); return counterList_[name].read(lex); } LYXERR(Debug::TCLASS, "Reading new counter " << to_utf8(name)); Counter cnt; bool success = cnt.read(lex); // if makene...
false
false
false
false
false
0
DisplayContextMenu(const wxPoint& position, ModuleType type) { bool noeditor = (type != mtEditorManager); // noeditor: // True if context menu belongs to open files tree; // False if belongs to cbEditor // inform the editors we 're just about to create a context menu if (!OnBeforeBuildContextMe...
false
false
false
false
false
0
lt_tag_new(void) { lt_tag_t *retval = lt_mem_alloc_object(sizeof (lt_tag_t)); if (retval) { retval->state = STATE_NONE; retval->privateuse = lt_string_new(NULL); lt_mem_add_ref(&retval->parent, retval->privateuse, (lt_destroy_func_t)lt_string_unref); } return retval; }
false
false
false
false
false
0
test_null_strings(PyObject *self) { PyObject *o1 = PyObject_Str(NULL), *o2 = PyObject_Str(NULL); PyObject *tuple = PyTuple_Pack(2, o1, o2); Py_XDECREF(o1); Py_XDECREF(o2); return tuple; }
false
false
false
false
false
0
RayHitTriangle( Geometry_t *Geometry,double FX,double FY,double FZ,double DX,double DY,double DZ,double L ) { double A11,A12,A13,A21,A22,A23,A31,A32,A33,U,V,T,*X,*Y,*Z; double B11,B12,B13,B21,B22,B23,B31,B32,B33,PX,PY,PZ,detA; double EPS=REPS; /* * if ( !RayHitBBox(&Geometry->BBox,FX,FY,FZ,DX...
false
false
false
false
false
0
_obj_to_str(PyObject *obj) { if (PyType_Check(obj)) return PyObject_GetAttrString(obj, "__name__"); else return PyObject_Str(obj); }
false
false
false
false
false
0
curses_vbar (Driver *drvthis, int x, int y, int len, int promille, int options) { PrivateData *p = drvthis->private_data; // map char ACS_map[] = { ACS_S9, ACS_S9, ACS_S7, ACS_S7, ACS_S3, ACS_S3, ACS_S1, ACS_S1 }; char ascii_map[] = { ' ', ' ', '-', '-', '=', '=', '#', '#' }; char *map = (p->useACS) ? ACS_map : as...
false
false
false
false
false
0
minimizeRestoreAction() { if ( d->window ) { bool restore = !( d->window->isVisible() ); minimizeRestore( restore ); } }
false
false
false
false
false
0
InitPaperTypeMap() { #ifdef LOCO_PAPERSIZE_MAP #error "LOCO_PAPERSIZE_MAP already defined" #endif #define LOCO_PAPERSIZE_MAP( P ) paperTypeStringToQtG[ #P ] = QPrinter::P LOCO_PAPERSIZE_MAP( A0 );LOCO_PAPERSIZE_MAP( B6 ); LOCO_PAPERSIZE_MAP( A1 );LOCO_PAPERSIZE_MAP( B7 ); LOCO_PAPERSIZE_MAP( A2 );LOCO_PAP...
false
false
false
false
false
0
gt_feature_node_new_pseudo(GtStr *seqid, unsigned long start, unsigned long end, GtStrand strand) { GtFeatureNode *pf; GtGenomeNode *pn; gt_assert(seqid); gt_assert(start <= end); pn = gt_feature_node_new(seqid, "pseudo", start, end, strand); pf = gt_feature_node_cas...
false
false
false
false
false
0