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
evalAllExpressions(bool warn_uninit) { cout << "Evaluating expressions..."; // Loop over all statements, and fill global eval context if relevant for (vector<Statement *>::const_iterator it = statements.begin(); it != statements.end(); it++) { InitParamStatement *ips = dynamic_cast<InitParamStatement *...
false
false
false
false
false
0
build_objc_method_call (location_t loc, int super_flag, tree method_prototype, tree lookup_object, tree selector, tree method_params) { tree sender = (super_flag ? umsg_super_decl : (flag_objc_direct_dispatch ? umsg_fast_decl : umsg_decl)); tree rcv_p = (super_flag ? objc_super_type : objc_obje...
false
false
false
false
false
0
dumpNamespace(Archive *fout, DumpOptions *dopt, NamespaceInfo *nspinfo) { PQExpBuffer q; PQExpBuffer delq; PQExpBuffer labelq; char *qnspname; /* Skip if not to be dumped */ if (!nspinfo->dobj.dump || dopt->dataOnly) return; /* don't dump dummy namespace from pre-7.3 source */ if (strlen(nspinfo->dobj.na...
false
false
false
false
false
0
stopWithError( const QString &message ) { raiseError( message ); if( m_transferJob ) { m_transferJob->kill( KJob::EmitResult ); m_transferJob = 0; } emit doneParsing(); }
false
false
false
false
false
0
is_kernel_type(char *cmdstr, enum kernel_type *type) { const char *const *p; char *q; enum kernel_type t = KT_NONE; for (p = kernel_types; *p; p++, t++) { if ((q = looking_at(cmdstr, *p))) { *type = t; return q; } } return NULL; }
false
false
false
false
false
0
rebuild_relation(Relation OldHeap, Oid indexOid, int freeze_min_age, int freeze_table_age, bool verbose) { Oid tableOid = RelationGetRelid(OldHeap); Oid tableSpace = OldHeap->rd_rel->reltablespace; Oid OIDNewHeap; bool is_system_catalog; bool swap_toast_by_content; TransactionId frozenXid; /* Mark ...
false
false
false
false
false
0
ContextSlotOperandCheckExtensions(Slot* slot, Result tmp, JumpTarget* slow) { ASSERT(slot->type() == Slot::CONTEXT); ASSERT(tmp.is_register()); Register context = rsi; for (Scope* s = scope(); s !=...
false
false
false
false
false
0
emit(exec_list list) { foreach_list_safe(node, &list) { fs_inst *inst = (fs_inst *)node; inst->remove(); emit(inst); } }
false
false
false
false
false
0
run (GVfsJob *job) { GVfsJobUnmountMountable *op_job = G_VFS_JOB_UNMOUNT_MOUNTABLE (job); GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); if (op_job->eject) { if (class->eject_mountable == NULL) { g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, _("Operation ...
false
false
false
false
false
0
GWEN_DlgInput_new(uint32_t flags, const char *title, const char *text, int minLen, int maxLen) { GWEN_DIALOG *dlg; GWEN_DLGINPUT *xdlg; GWEN_BUFFER *fbuf; GWEN_GUI *gui; uint32_t gflags=0; int n; int rv; char dlgNameBuf[128]; /* get GUI flags */ gui=GWEN_Gui_...
false
false
false
false
false
0
onFocusSelf(FXObject*,FXSelector,void* ptr){ setFocus(); if(contentWindow()) contentWindow()->handle(this,FXSEL(SEL_FOCUS_SELF,0),ptr); return 1; // if(contentWindow() && contentWindow()->handle(this,FXSEL(SEL_FOCUS_SELF,0),ptr)) return 1; // setFocus(); // return 1; ///// FIXME See ScrollWindow ///// // FX...
false
false
false
false
false
0
cal_obj_secondly_find_next_position (CalObjTime *cotime, CalObjTime *event_end, RecurData *recur_data, CalObjTime *interval_end) { cal_obj_time_add_seconds (cotime, recur_data->recur->interval); if (event_e...
false
false
false
false
false
0
get_acls(Vfs_handle *h) { int n; Dsvec *dsv; dsv = dsvec_init(NULL, sizeof(Acl_file *)); if ((n = vfs_list(h, is_valid, fts_compar, add, (void ***) dsv)) == -1) return(NULL); return(dsv); }
false
false
false
false
false
0
__do_fault(struct vm_area_struct *vma, unsigned long address, pgoff_t pgoff, unsigned int flags, struct page *cow_page, struct page **page) { struct vm_fault vmf; int ret; vmf.virtual_address = (void __user *)(address & PAGE_MASK); vmf.pgoff = pgoff; vmf.flags = flags; vmf.page = NULL; vmf.cow_page = cow_...
false
false
false
false
false
0
ThreadedRequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *vtkNotUsed(outputVector), vtkImageData ***inData, vtkImageData **outData, int outExt[6], int id) { int inExt[6]; this->InternalRequestUpdateExtent(inExt, outExt); void *inPt...
false
false
false
false
false
0
RetrieveDomain(std::string &Domain) const { switch(GetDomain()) { case (Url_Unknown): Domain.clear(); break; case (Url_Internal): Domain="Internal"; break; case (Url_External): Domain="External"; break; } }
false
false
false
false
false
0
pk11_PubEncryptRaw(SECKEYPublicKey *key, unsigned char *out, unsigned int *outLen, unsigned int maxLen, const unsigned char *data, unsigned dataLen, CK_MECHANISM_PTR mech, void *wincx) { PK11SlotInfo *slot; CK_OBJECT_HANDLE id; CK_U...
false
false
false
false
false
0
sm_get_description(seg_manager_t *self, reg_t addr) { mem_obj_t *mobj = self->heap[addr.segment]; if (addr.segment >= self->heap_size) return ""; switch (mobj->type) { case MEM_OBJ_DYNMEM: return mobj->data.dynmem.description; default: return ""; } }
false
false
false
false
false
0
xmlSecXPathDataNodeRead(xmlSecXPathDataPtr data, xmlNodePtr node) { int ret; xmlSecAssert2(data != NULL, -1); xmlSecAssert2(data->expr == NULL, -1); xmlSecAssert2(data->ctx != NULL, -1); xmlSecAssert2(node != NULL, -1); ret = xmlSecXPathDataRegisterNamespaces (data, node); if(ret <...
false
false
false
false
false
0
updateSensitivity(void) { if (sensitive()==MSFalse) { _firstCharacter=0; _selectionStart=-1; _selectionEnd=-1; disownSelection(XA_PRIMARY); removeCycle(); } MSCompositeField::updateSensitivity(); }
false
false
false
false
false
0
I_open_cam_file_old(char *camera, char *file) { int fd; char element[100]; /* find the file first */ if (!I_find_camera_file(camera, file)) { camera_error(camera, file, "", " not found"); return -1; } /* get group element name */ sprintf(element, "camera/%s", camera); fd = G_open_ol...
true
true
false
false
false
1
make_raw_sign_hash (GChecksumType algo, const guchar *data, gsize n_data, gsize *n_result) { gsize n_hash; GChecksum *checksum; guchar *hash; g_assert (data); g_assert (n_result); n_hash = g_checksum_type_get_length (algo); g_return_val_if_fail (n_hash > 0, FALSE); hash = g_malloc0 (n_has...
false
false
false
false
false
0
skd_do_driver_inq(struct skd_device *skdev, volatile struct fit_completion_entry_v1 *skcomp, volatile struct fit_comp_error_info *skerr, uint8_t *cdb, uint8_t *buf) { if (!buf) return; else if (cdb[0] != INQUIRY) return; /* Not an INQUIRY */ else if ((cdb[1] & 1) == 0) return...
false
false
false
false
false
0
NK6510_DeletePhonebookLocation(gn_data *data, struct gn_statemachine *state) { unsigned char req[] = {FBUS_FRAME_HEADER, 0x0f, 0x55, 0x01, 0x04, 0x55, 0x00, 0x10, 0xFF, 0x02, 0x00, 0x08, /* location */ 0x00, 0x00, 0x00, 0x00, 0x05, /* memory type */ 0x55, 0x55, 0x55}; gn_phon...
false
false
false
false
false
0
__pcpu_size_to_slot(int size) { int highbit = fls(size); /* size is in bytes */ return max(highbit - PCPU_SLOT_BASE_SHIFT + 2, 1); }
false
false
false
false
false
0
_addinientry(zend_ini_entry *ini_entry TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) { zval *retval = va_arg(args, zval*); int number = va_arg(args, int); if (number == ini_entry->module_number) { if (ini_entry->value) { add_assoc_stringl(retval, ini_entry->name, ini_entry->value, ini_entry->...
false
false
false
false
false
0
object_split(object *orig_ob, uint32 nr, char *err, size_t size) { object *newob; if (MAX(1, orig_ob->nrof) < nr) { /* If err is set, the caller knows that nr can be wrong (player trying to drop items), thus don't log that. */ if (err) snprintf(err, size, "There are only %u %ss.", o...
false
false
false
false
false
0
jl_is_leaf_type(jl_value_t *v) { if (jl_is_tuple(v)) { jl_tuple_t *t = (jl_tuple_t*)v; size_t i; for(i=0; i < t->length; i++) { if (!jl_is_leaf_type(jl_tupleref(t, i))) return 0; } return 1; } if (jl_is_type_type(v) && !jl_has_typevars_(jl_...
false
false
false
false
false
0
totem_options_process_early (Totem *totem, const TotemCmdLineOptions* options) { if (options->quit) { /* If --quit is one of the commands, just quit */ gdk_notify_startup_complete (); exit (0); } g_settings_set_boolean (totem->settings, "debug", options->debug); }
false
false
false
false
false
0
find_tmp_path(char *buffer, size_t length) { #ifndef _WIN32 static const size_t var_count = 4; static const char *env_vars[] = { "TMPDIR", "TMP", "TEMP", "USERPROFILE" }; size_t i; for (i = 0; i < var_count; ++i) { const char *env = getenv(env_vars[i]); if (!env) continue; if (is_valid_tmp_path(env...
false
false
false
false
false
0
ap_linexpr0_hash(ap_linexpr0_t* expr) { if (expr->size==0){ return ap_coeff_hash(&expr->cst); } else { ap_coeff_t* pcoeff; size_t i,dec; long res,res1; res = expr->size << 8; dec = 0; for (i=0; i<expr->size; i += (expr->size+7)/8){ pcoeff = ap_linexpr0_coeffref(expr,i); res...
false
false
false
false
false
0
brasero_track_data_cfg_node_to_path (BraseroTrackDataCfg *self, BraseroFileNode *node) { GtkTreePath *path; path = gtk_tree_path_new (); for (; node->parent && !node->is_root; node = node->parent) { guint nth; nth = brasero_track_data_cfg_get_pos_as_child (node); gtk_tree_path_prepend_index (path, n...
false
false
false
false
false
0
setuwep(obj) register struct obj *obj; { struct obj *olduwep = uwep; if (obj == uwep) return; /* necessary to not set unweapon */ /* This message isn't printed in the caller because it happens * *whenever* Sunsword is unwielded, from whatever cause. */ setworn(obj, W_WEP); if (uwep == obj && artifact_light(ol...
false
false
false
false
false
0
FrameFiller_new(int width, unsigned char *frame) { FrameFiller *filler; filler = (FrameFiller *)malloc(sizeof(FrameFiller)); if(filler == NULL) return NULL; filler->width = width; filler->frame = frame; filler->x = width - 1; filler->y = width - 1; filler->dir = -1; filler->bit = -1; return filler; }
false
false
false
false
false
0
DebugEngineCode(GrcManager * pcman, int fxdRuleVersion, std::ostream & strmOut) { strmOut << "\nTABLE: " << m_psymName->FullName() << "\n"; for (size_t ippass = 0; ippass < m_vppass.size(); ippass++) { m_vppass[ippass]->DebugEngineCode(pcman, fxdRuleVersion, strmOut); } }
false
false
false
false
false
0
do_uworld(void) { fprintf(stdout, "# %s\n", orig_line); if (fields[0] && fields[0][0]) fprintf(stdout, "Uworld { name = \"%s\"; };\n", fields[0]); if (fields[1] && fields[1][0]) fprintf(stdout, "Jupe { nick = \"%s\"; };\n", fields[1]); }
false
false
false
false
false
0
gconf_locale_cache_add (GConfLocaleCache* cache, const gchar* locale) { Entry* e; e = g_new(Entry, 1); e->locale = g_strdup(locale); e->list = gconf_locale_list_new(locale); e->mod_time = time(NULL); g_hash_table_insert (cache->hash, e->locale, e); }
false
false
false
false
false
0
xosdlib_drv_set_contrast (Driver *drvthis, int promille) { PrivateData *p = drvthis->private_data; int contrast; /* Check it */ if (promille < 0 || promille > 1000) return; /* store the software value since there is no way to get it from the display */ p->contrast = promille; /* map range [0, 1000] to [0, 2...
false
false
false
false
false
0
replicate_data_item (const model_data_item *orig) { model_data_item *item = malloc(sizeof *item); if (item != NULL) { item->key = gretl_strdup(orig->key); if (item->key == NULL) { free(item); item = NULL; } } if (item != NULL) { if (orig->type == GRETL_TYPE_MATRIX) { item->ptr = gre...
false
false
false
false
false
0
request_sync_action_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { GduWindow *window = GDU_WINDOW (user_data); GError *error = NULL; if (!udisks_mdraid_call_request_sync_action_finish (UDISKS_MDRAID (source_object), ...
false
false
false
false
false
0
knh_StmtMTD_typing(CTX ctx, kStmtExpr *stmt, kMethod *mtd, kclass_t mtd_cid) { knh_Fmethod func = NULL; DP(mtd)->uri = ULINE_uri(stmt->uline); Term_setCONST(ctx, tkNN(stmt, 2/*method*/), mtd); func = GammaBuilder_loadMethodFunc(ctx, mtd_cid, (mtd)->mn, knh_StmtMETA_is(ctx, stmt, "Native")); if(func != NULL) { kn...
false
false
false
false
false
0
find_prepared_statement(const char *name, struct connection * con, struct prepared_statement ** prev_) { struct prepared_statement *this, *prev; for (this = con->prep_stmts, prev = NULL; this != NULL; prev = this, this = this->next) { if (strcmp(this->name, name) == 0) { if (prev_) *prev_ = pr...
false
false
false
false
false
0
wlc_phy_rxcore_setstate_nphy(struct brcms_phy_pub *pih, u8 rxcore_bitmask) { u16 regval; u16 tbl_buf[16]; uint i; struct brcms_phy *pi = container_of(pih, struct brcms_phy, pubpi_ro); u16 tbl_opcode; bool suspend; pi->sh->phyrxchain = rxcore_bitmask; if (!pi->sh->clk) return; suspend = (0 == (bcma_read32(...
false
false
false
false
false
0
analysis_tool_frequency_engine (G_GNUC_UNUSED GOCmdContext *gcc, data_analysis_output_t *dao, gpointer specs, analysis_tool_engine_t selector, gpointer result) { analysis_tools_data_frequency_t *info = specs; switch (selector) { case TOOL_ENGINE_UPDATE_DESCRIPTOR: return (dao_command_descriptor (dao, _("...
false
false
false
false
false
0
establish_agg_workspace() { int eaw_rc = FSCK_OK; uint32_t mapsize_bytes; int I_am_logredo = 0; /* * establish the fsck workspace block map */ eaw_rc = establish_wsp_block_map(); if (eaw_rc == FSCK_OK) { /* block map has been established */ agg_recptr->agg_imap.num_iags = 1; agg_recptr->agg_imap.bkd_i...
false
true
false
false
false
1
__efx_rx_packet(struct efx_channel *channel) { struct efx_nic *efx = channel->efx; struct efx_rx_buffer *rx_buf = efx_rx_buffer(&channel->rx_queue, channel->rx_pkt_index); u8 *eh = efx_rx_buf_va(rx_buf); /* Read length from the prefix if necessary. This already * excludes the length of the prefix itself. */...
false
false
false
false
false
0
Targ_FindList(Lst *nodes, Lst *names, int flags) { LstNode *ln; /* name list element */ GNode *gn; /* node in tLn */ char *name; for (ln = Lst_First(names); ln != NULL; ln = Lst_Succ(ln)) { name = Lst_Datum(ln); gn = Targ_FindNode(name, flags); if (gn != NULL) { /* * Note: Lst_AtEnd must come before t...
false
false
false
false
false
0
push_scope (void) { if (next_is_function_body) { /* This is the transition from the parameters to the top level of the function body. These are the same scope (C99 6.2.1p4,6) so we do not push another scope structure. next_is_function_body is set only by store_parm_decls, which in turn is called wh...
false
false
false
false
false
0
pci_dev_uses_irq(struct pnp_dev *pnp, struct pci_dev *pci, unsigned int irq) { u32 class; u8 progif; if (pci->irq == irq) { pnp_dbg(&pnp->dev, " device %s using irq %d\n", pci_name(pci), irq); return 1; } /* * See pci_setup_device() and ata_pci_sff_activate_host() for * similar IDE legacy dete...
false
false
false
false
false
0
parse_options(int *parsed_args, GtFile **outfp, int argc, const char **argv, GtError *err) { GtOptionParser *op; GtOutputFileInfo *ofi; GtOPrval oprval; gt_error_check(err); op = gt_option_parser_new("[option ...] [GFF3_file ...]", "Merge sorted GFF3 file...
false
false
false
false
false
0
iser_init(void) { int err; iser_dbg("Starting iSER datamover...\n"); if (iscsi_max_lun < 1) { iser_err("Invalid max_lun value of %u\n", iscsi_max_lun); return -EINVAL; } memset(&ig, 0, sizeof(struct iser_global)); ig.desc_cache = kmem_cache_create("iser_descriptors", sizeof(struct iser_tx_desc), ...
false
false
false
false
false
0
oo_parse_color (GsfXMLIn *xin, xmlChar const *str, char const *name) { guint r, g, b; g_return_val_if_fail (str != NULL, NULL); if (3 == sscanf (CXML2C (str), "#%2x%2x%2x", &r, &g, &b)) return gnm_color_new_rgb8 (r, g, b); if (0 == strcmp (CXML2C (str), "transparent")) return style_color_ref (magic_transpare...
false
false
false
false
false
0
NextGraphEdge() { vtkInEdgeType e = this->Next(); if (!this->GraphEdge) { this->GraphEdge = vtkGraphEdge::New(); } this->GraphEdge->SetSource(e.Source); this->GraphEdge->SetTarget(this->Vertex); this->GraphEdge->SetId(e.Id); return this->GraphEdge; }
false
false
false
false
false
0
trap_filter(rwlock_t *lock, entry_t **entry, peer_cfg_t **peer_cfg, void *none, child_sa_t **child_sa) { if (!(*entry)->child_sa) { /* skip entries that are currently being installed */ return FALSE; } if (peer_cfg) { *peer_cfg = (*entry)->peer_cfg; } if (child_sa) { *child_sa = (*entry)->child_sa; ...
false
false
false
false
false
0
img_ir_nec_filter(const struct rc_scancode_filter *in, struct img_ir_filter *out, u64 protocols) { unsigned int addr, addr_inv, data, data_inv; unsigned int addr_m, addr_inv_m, data_m, data_inv_m; data = in->data & 0xff; data_m = in->mask & 0xff; if ((in->data | in->mask) & 0xff000000) { /* 3...
false
false
false
false
false
0
FromCommandLine(PackageContainerInterface * const pci, pkgCacheFile &Cache, const char **cmdline, CacheSetHelper &helper) { bool found = false; for (const char **I = cmdline; *I != 0; ++I) found |= PackageContainerInterface::FromString(pci, Cache, *I, helper); return found; }
false
false
false
false
false
0
create_link(char *pfilename, const char *linkname, mode_t linktype, const char *prevlinkname) { struct stat stat_buf; if (stat(prevlinkname, &stat_buf) == 0) { unlink(prevlinkname); } if (stat(linkname, &stat_buf) == 0) { if (prevlinkname) { rename(linkname, prevlinkname)...
false
false
false
false
false
0
filterattr(dp) CONST struct filestat_t *dp; { int i, f; for (i = 0; dirattr[i]; i++) { f = 0; if (dirattr[i] == '-') { i++; f++; } switch (dirattr[i]) { case 'D': if (!(dir_isdir(dp))) f ^= 1; break; case 'R': if (dp -> mod & S_IWUSR) f ^= 1; break; case 'H': if (dp -> mod...
false
false
false
false
false
0
pl_parent_entrylk_xattr_fill (xlator_t *this, inode_t *parent, char *basename, dict_t *dict) { uint32_t entrylk = 0; int ret = -1; if (!parent || !basename || !strlen (basename)) goto out; entrylk = check_entrylk_on_b...
false
false
false
false
false
0
mchip_comp_read_frame(u32 v, u8 *buf, int size) { int pt_start, pt_end, trailer; int fsize; int i; pt_start = (v >> 19) & 0xFF; pt_end = (v >> 11) & 0xFF; trailer = (v >> 1) & 0x3FF; if (pt_end < pt_start) fsize = (MCHIP_NB_PAGES_MJPEG - pt_start) * PAGE_SIZE + pt_end * PAGE_SIZE + trailer * 4; else fs...
false
false
false
false
false
0
z_set_colour( zword_t foreground, zword_t background ) { if ( ( ZINT16 ) foreground < -1 || ( ZINT16 ) foreground > 9 || ( ZINT16 ) background < -1 || ( ZINT16 ) background > 9 ) fatal( "Bad colour!" ); flush_buffer( FALSE ); set_colours( foreground, background ); return; }
false
false
false
false
false
0
boot_msp34xx(struct bttv *btv, int pin) { int mask = (1 << pin); gpio_inout(mask,mask); gpio_bits(mask,0); mdelay(2); udelay(500); gpio_bits(mask,mask); if (bttv_gpio) bttv_gpio_tracking(btv,"msp34xx"); if (bttv_verbose) pr_info("%d: Hauppauge/Voodoo msp34xx: reset line init [%d]\n", btv->c.nr, pin); }
false
false
false
false
false
0
seqBlastLoadBuff(AjPSeqin seqin) { AjBool ret; AjPStr hdrstr = NULL; AjPStr seqstr = NULL; AjPQuery qry; SeqPCdQry qryd; qry = seqin->Input->Query; qryd = qry->QryData; if(!qry->QryData) ajFatal("seqBlastLoadBuff Query Data not initialised"); ajDebug("seqBlastLoadBuff lib...
false
false
false
false
false
0
_mesa_PrioritizeTextures( GLsizei n, const GLuint *texName, const GLclampf *priorities ) { GET_CURRENT_CONTEXT(ctx); GLint i; if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) _mesa_debug(ctx, "glPrioritizeTextures %d\n", n); FLUSH_VERTICES(ctx, 0); if (n < 0) { _...
false
false
false
false
false
0
nw_rpc100s_set_config(StonithPlugin* s, StonithNVpair *list) { struct pluginDevice* ctx; StonithNamesToGet namestocopy [] = { {ST_TTYDEV, NULL} , {ST_HOSTLIST, NULL} , {NULL, NULL} }; int rc; ERRIFWRONGDEV(s,S_OOPS); if (s->isconfigured) { return S_OOPS; } ctx = (struct pluginDevice*) s; if ((rc = O...
false
false
false
false
false
0
free_form(FORM * form) { if ( !form ) RETURN(E_BAD_ARGUMENT); if ( form->status & _POSTED) RETURN(E_POSTED); Disconnect_Fields( form ); if (form->page) free(form->page); free(form); RETURN(E_OK); }
false
false
false
false
false
0
_get_photo_info_parser (xmlDoc *doc, GError **error) { xmlXPathContext *xpathCtx = NULL; xmlXPathObject * xpathObj = NULL; FspDataPhotoInfo *pinfo = NULL; GError *err = NULL; g_return_val_if_fail (doc != NULL, NULL); xpathCtx = xmlXPathNewContext ...
false
false
false
false
false
0
xlsx_func_erf_output_handler (GnmConventionsOut *out, GnmExprFunction const *func) { /* func->argc == 1 is handled by the translation */ if (func->argc != 1) { g_string_append (out->accum, "ERF"); gnm_expr_list_as_string (func->argc, func->argv, out); return TRUE; } return FALSE; }
false
false
false
false
false
0
GoMatchingBrace(bool select) { int braceAtCaret = -1; int braceOpposite = -1; bool isInside = FindMatchingBracePosition(true, braceAtCaret, braceOpposite, true); // Convert the character positions into caret positions based on whether // the caret position was inside or outside the braces. if (isInside) { if (b...
false
false
false
false
false
0
handle_ep0_ctrl_req(struct pxa_udc *udc, struct pxa27x_request *req) { struct pxa_ep *ep = &udc->pxa_ep[0]; union { struct usb_ctrlrequest r; u32 word[2]; } u; int i; int have_extrabytes = 0; unsigned long flags; nuke(ep, -EPROTO); spin_lock_irqsave(&ep->lock, flags); /* * In the PXA320 manual, i...
false
false
false
false
false
0
DohKeys(DOH *obj) { DohBase *b = (DohBase *) obj; DohObjInfo *objinfo = b->type; if (objinfo && objinfo->doh_hash->doh_keys) { return (objinfo->doh_hash->doh_keys) (b); } return 0; }
false
false
false
false
false
0
gwy_radio_buttons_find(GSList *group, gint value) { g_return_val_if_fail(group, NULL); while (group) { g_return_val_if_fail(GTK_IS_RADIO_BUTTON(group->data), FALSE); if (GPOINTER_TO_INT(g_object_get_qdata(G_OBJECT(group->data), ...
false
false
false
false
false
0
crl_uri_destroy(x509_cdp_t *this) { free(this->uri); DESTROY_IF(this->issuer); free(this); }
false
false
false
false
false
0
copy_to_eoln(char *outstr, char *more_terminators, char *instr, int max) { int count = 0; char ch; char terminators[128]; Assert((more_terminators == NULL) || (strlen(more_terminators) < 125)); terminators[0] = EOLN; terminators[1] = (char)EOF_CHAR; terminators[2] = 0; if (more_terminators != NULL) strcat_s...
false
false
false
false
false
0
get_colorid_back() { if( m_css_body.bg_color >= 0 ) return m_css_body.bg_color; return m_colorid_back; }
false
false
false
false
false
0
load_ui_factory (CutContractor *contractor) { GList *node; CutContractorPrivate *priv = CUT_CONTRACTOR_GET_PRIVATE(contractor); for (node = priv->builders; node; node = g_list_next(node)) { const gchar *module_dir, *type_name; CutFactoryBuilder *builder = CUT_FACTORY_BUILDER(node->data); ...
false
false
false
false
false
0
setupNAddItem(QLanguageItem* languageItem) { //Adds the languageItem at its correct place in the mZOrderedItems list. //Fill with 0. while ( mZOrderedItems.size() <= languageItem->zValue() ) mZOrderedItems << 0; //Replace if the corresponding place is free ( mZOrderedItems[zValue] = 0 ). if ( mZOrderedItems[in...
false
false
false
false
false
0
EV_BuildStairs ( line_t* line, stair_e type ) { int secnum; int height; int i; int newsecnum; int texture; int ok; int rtn; sector_t* sec; sector_t* ...
false
false
false
false
false
0
qib_bad_intrstatus(struct qib_devdata *dd) { static int allbits; /* separate routine, for better optimization of qib_intr() */ /* * We print the message and disable interrupts, in hope of * having a better chance of debugging the problem. */ qib_dev_err(dd, "Read of chip interrupt status failed disabling ...
false
false
false
false
false
0
HFASetDatum( HFAHandle hHFA, const Eprj_Datum *poDatum ) { /* -------------------------------------------------------------------- */ /* Loop over bands, setting information on each one. */ /* -------------------------------------------------------------------- */ for( int iBand = 0; iBand < hHF...
false
false
false
false
false
0
we_general_delete_char_cb(GtkWidget *widget, gpointer data) { World *world = (World *) data; GtkTreeView *view; GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeIter iter; view = GTK_TREE_VIEW(gtk_builder_get_object(world->ui_builder, ...
false
false
false
false
false
0
setLabelsOrigin(VisuData *data, GList *nodeIds) { gchar numero[256]; VisuNode *node; if (nodeIds) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radioMovePick))) { movedNode = GPOINTER_TO_INT(nodeIds->data); node = visu_node_array_getFromId(VISU_NODE_ARRAY(data), ...
false
true
false
false
false
1
subtract_set(unsigned *s0, unsigned *s1, unsigned *s2) { unsigned i; for (i = 0; i < STATESETSIZE; i++) *s0++ = *s1++ & ~*s2++; }
false
false
false
false
false
0
strg_end_compare(gchar *strg1, gchar *strg2) { int i = 0; int matching = TRUE; gchar *strg1_end, *strg2_end; if (strlen(strg1) < strlen(strg2)) return FALSE; strg1_end = strg1 + strlen(strg1); strg2_end = strg2 + strlen(strg2); for (i = 0; i < g_utf8_strlen(strg2, -1); i++) { strg1_end = g_utf8_pre...
false
false
false
false
false
0
chan_irqt(int irq, void *dev) { struct shdma_chan *schan = dev; const struct shdma_ops *ops = to_shdma_dev(schan->dma_chan.device)->ops; struct shdma_desc *sdesc; spin_lock_irq(&schan->chan_lock); list_for_each_entry(sdesc, &schan->ld_queue, node) { if (sdesc->mark == DESC_SUBMITTED && ops->desc_complet...
false
false
false
false
false
0
incrementIndent(UT_sint32 iLevel, bool bInc) { UT_UTF8String sProp = "toc-indent"; UT_UTF8String sLevel = UT_UTF8String_sprintf("%d",iLevel); sProp += sLevel.utf8_str(); UT_UTF8String sVal = getTOCPropVal(sProp); double inc = getIncrement(sVal.utf8_str()); if(!bInc) { inc = -inc; } sVal = UT_incrementDimStri...
false
false
false
false
false
0
gst_opengl_glGetDoublev ( GLenum pname ) { GLdouble *params; int i, size; OOP anArray = nil; size = gst_opengl_glGetv_size (pname); if (size > 0) { /* Allocating an Array object */ anArray = vm_proxy->objectAlloc (vm_proxy->arrayClass, size); /* retreiving datas from OpenGL */ pa...
false
false
false
false
false
0
test_long_double (void) { /* Check that the value of LDBL_MIN_EXP is well parenthesized. */ ASSERT ((LDBL_MIN_EXP % 101111) == (LDBL_MIN_EXP) % 101111); /* Check that the value of LDBL_MIN_10_EXP is well parenthesized. */ ASSERT ((LDBL_MIN_10_EXP % 101111) == (LDBL_MIN_10_EXP) % 101111); /* Check that 'lo...
false
false
false
false
false
0
cpanel_tour2d3_set (displayd *display, cpaneld *cpanel, ggobid* gg) /* * To handle the case where there are multiple scatterplots * which may have different tour options and parameters selected */ { GtkWidget *w, *btn; GtkWidget *pnl = mode_panel_get_by_name(GGOBI(getPModeName)(TOUR2D3), gg); GtkAdjustment *adj...
false
false
false
false
false
0
Reg_FreeInstanceVars(InstanceVars I) { if (I->currentPartition != NULL) DXDelete((Pointer)I->currentPartition); if (I) DXFree((Pointer)I); return OK; }
false
false
false
false
false
0
ts2020_set_tuner_rf(struct dvb_frontend *fe) { struct ts2020_priv *dev = fe->tuner_priv; int ret; unsigned int utmp; ret = regmap_read(dev->regmap, 0x3d, &utmp); utmp &= 0x7f; if (utmp < 0x16) utmp = 0xa1; else if (utmp == 0x16) utmp = 0x99; else utmp = 0xf9; regmap_write(dev->regmap, 0x60, utmp); ret...
false
false
false
false
false
0
blkid_evaluate_tag(const char *token, const char *value, blkid_cache *cache) { struct blkid_config *conf = NULL; char *t = NULL, *v = NULL; char *ret = NULL; int i; if (!token) return NULL; if (!cache || !*cache) blkid_init_debug(0); DBG(DEBUG_EVALUATE, printf("evaluating %s%s%s\n", token, value ? "...
false
false
false
false
true
1
load_next(PyObject *mod, PyObject *altmod, char **p_name, char *buf, Py_ssize_t *p_buflen) { char *name = *p_name; char *dot = strchr(name, '.'); size_t len; char *p; PyObject *result; if (strlen(name) == 0) { /* completely empty module name should only happen in 'f...
false
false
false
false
false
0
parse_id (struct sym_id *id) { char *slash; DBG (IDDEBUG, printf ("[parse_id] %s -> ", id->spec)); slash = strchr (id->spec, '/'); if (slash) { parse_spec (slash + 1, &id->right.sym); *slash = '\0'; id->has_right = TRUE; } parse_spec (id->spec, &id->left.sym); #ifdef DEBUG if (d...
false
false
false
false
false
0
PSRLQ_PqIb(bxInstruction_c *i) { #if BX_SUPPORT_MMX BX_CPU_THIS_PTR prepareMMX(); BX_CPU_THIS_PTR prepareFPU2MMX(); /* FPU2MMX transition */ BxPackedMmxRegister op = BX_READ_MMX_REG(i->rm()); Bit8u shift = i->Ib(); if(shift > 63) { MMXUQ(op) = 0; } else { MMXUQ(op) >>= shift; } /* now write...
false
false
false
false
false
0
cached_server_equal (gconstpointer _a, gconstpointer _b) { const CachedServer *a = _a; const CachedServer *b = _b; return strcmp (a->server_name, b->server_name) == 0 && strcmp (a->share_name, b->share_name) == 0 && strcmp (a->domain, b->domain) == 0 && strcmp (a->username, b->username) ...
false
false
false
false
false
0
amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev, struct amdgpu_cs_parser *parser) { struct amdgpu_fpriv *fpriv = parser->filp->driver_priv; struct amdgpu_vm *vm = &fpriv->vm; struct amdgpu_ring *ring; int i, r; if (parser->num_ibs == 0) return 0; /* Only for UVD/VCE VM emulation */ for (i = 0; i < pars...
false
false
false
false
false
0
LodeZlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodeZlib_DecompressSettings* settings) { unsigned error = 0; unsigned CM, CINFO, FDICT; ucvector outv; if(insize < 2) { error = 53; return error; } /*error, size of zlib data too small*/ /*read informati...
false
false
false
false
false
0
ctcp_DCC_RESUME(char *nick, char *from, char *handle, char *object, char *keyword, char *text) { char *action, *fn, buf[512], *msg = buf; int i, port; unsigned long offset; strcpy(msg, text); action = newsplit(&msg); if (egg_strcasecmp(action, "RESUME")) return 0; fn = ne...
false
false
false
false
false
0
add_photos_to_photoset_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) { DialogData *data = user_data; GError *error = NULL; if (! flickr_service_add_photos_to_set_finish (FLICKR_SERVICE (source_object), result, &error)) { _gtk_error_dialog_from_gerror_show (GTK...
false
false
false
false
false
0