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
sext (unsigned prec) const { const double_int &cst = *this; double_int mask = double_int::mask (prec); double_int r; unsigned HOST_WIDE_INT snum; if (prec <= HOST_BITS_PER_WIDE_INT) snum = cst.low; else { prec -= HOST_BITS_PER_WIDE_INT; snum = (unsigned HOST_WIDE_INT) cst.high; } ...
false
false
false
false
false
0
getFPOpCost(Type *Ty) { // Use similar logic that's in ARMISelLowering: // Any ARM CPU with VFP2 has floating point, but Thumb1 didn't have access // to VFP. if (ST->hasVFP2() && !ST->isThumb1Only()) { if (Ty->isFloatTy()) { return TargetTransformInfo::TCC_Basic; } if (Ty->isDoubleTy()) { ...
false
false
false
false
false
0
do_text(char *buf) { int x, y; int x2, y2; /* skip over the word "text" */ while (*buf && *buf != ' ' && *buf != '\t') buf++; /* skip white space to get to the text */ while (*buf == ' ' || *buf == '\t') buf++; G_plot_where_xy(cur_east, cur_north, &x, &y); R_move_abs(x, y); R_ge...
false
false
false
false
false
0
read_training_labels(struct parms *parms, struct files *files) { char *mapset; char *map; map = parms->training_map; mapset = G_find_cell(map, ""); if (G_read_cats(map, mapset, &files->training_labels) < 0) G_init_cats((CELL) 0, "", &files->training_labels); return 0; }
false
false
false
false
false
0
event_signal_closure(struct event_base *base, struct event *ev) { short ncalls; int should_break; /* Allows deletes to work */ ncalls = ev->ev_ncalls; ev->ev_pncalls = &ncalls; EVBASE_RELEASE_LOCK(base, th_base_lock); while (ncalls) { ncalls--; ev->ev_ncalls = ncalls; if (ncalls == 0) ev->ev_pncalls = ...
false
false
false
false
false
0
PR_PostSem(PRSemaphore *semaphore) { static PRBool unwarned = PR_TRUE; if (unwarned) unwarned = _PR_Obsolete( "PR_PostSem", "locks & condition variables"); PR_Lock(semaphore->cvar->lock); PR_NotifyCondVar(semaphore->cvar); semaphore->count += 1; PR_Unlock(semaphore->cvar->lock); }
false
false
false
false
false
0
ProcessGUCArray(ArrayType *array, GucContext context, GucSource source, GucAction action) { int i; Assert(array != NULL); Assert(ARR_ELEMTYPE(array) == TEXTOID); Assert(ARR_NDIM(array) == 1); Assert(ARR_LBOUND(array)[0] == 1); for (i = 1; i <= ARR_DIMS(array)[0]; i++) { Datum d; bool isnull; char...
false
false
false
false
false
0
hide(){ if(shown()){ FXTopWindow::hide(); if(options&SPLASH_DESTROY){ getApp()->removeTimeout(this,ID_DELETE); } else{ getApp()->removeTimeout(this,ID_HIDE); } } }
false
false
false
false
false
0
check_selection (GtkTreeView *tree_view, GtkTreeIter *iter, GitgCommitView *view) { if (view->priv->update_id) { g_signal_handler_disconnect (view->priv->shell, view->priv->update_id); } gitg_io_cancel (GITG_IO (view->priv->shell)); view->priv->update_id = 0; GtkTextView ...
false
false
false
false
false
0
zsm_mlt(scalar,matrix,out) complex scalar; ZMAT *matrix,*out; { u_int m,n,i; if ( matrix==ZMNULL ) error(E_NULL,"zsm_mlt"); if ( out==ZMNULL || out->m != matrix->m || out->n != matrix->n ) out = zm_resize(out,matrix->m,matrix->n); m = matrix->m; n = matrix->n; for ( i=0; i<m; i++ ) __zmlt__(...
false
false
false
true
false
1
gen8_emit_pipe_control(struct drm_i915_gem_request *req, u32 flags, u32 scratch_addr) { struct intel_engine_cs *engine = req->engine; int ret; ret = intel_ring_begin(req, 6); if (ret) return ret; intel_ring_emit(engine, GFX_OP_PIPE_CONTROL(6)); intel_ring_emit(engine, flags); intel_ring_emit(engine,...
false
false
false
false
false
0
Ns_TaskWait(Ns_Task *task, Ns_Time *timeoutPtr) { Task *taskPtr = (Task *) task; TaskQueue *queuePtr = taskPtr->queuePtr; int status = NS_OK; if (queuePtr == NULL) { if (!(taskPtr->signal & TASK_DONE)) { status = NS_TIMEOUT; } } else { Ns_MutexLock(&queuePtr->lock); while (status =...
false
false
false
false
false
0
pt1_start_feed(struct dvb_demux_feed *feed) { struct pt1_adapter *adap; adap = container_of(feed->demux, struct pt1_adapter, demux); if (!adap->users++) { int ret; ret = pt1_start_polling(adap->pt1); if (ret) return ret; pt1_set_stream(adap->pt1, adap->index, 1); } return 0; }
false
false
false
false
false
0
lock (int argc, const char** argv) { const char* key_name = 0; bool all_keys = false; Options_list options; options.push_back(Option_def("-k", &key_name)); options.push_back(Option_def("--key-name", &key_name)); options.push_back(Option_def("-a", &all_keys)); options.push_back(Option_def("--all", &all_keys)); ...
false
false
false
false
false
0
_elm_toolbar_icon_size_get(Widget_Data *wd) { const char *icon_size = edje_object_data_get (elm_smart_scroller_edje_object_get(wd->scr), "icon_size"); if (icon_size) return atoi(icon_size); return _elm_config->icon_size; }
false
false
false
false
false
0
getSecondSelectedCol() { if (firstColumnSelected < secondColumn) return secondColumn; else return firstColumnSelected; }
false
false
false
false
false
0
i40e_dcbnl_vsi_del_app(struct i40e_vsi *vsi, struct i40e_dcb_app_priority_table *app) { struct net_device *dev = vsi->netdev; struct dcb_app sapp; if (!dev) return -EINVAL; sapp.selector = app->selector; sapp.protocol = app->protocolid; sapp.priority = app->priority; return dcb_ieee_delapp(dev, &sapp);...
false
false
false
false
false
0
getnum(char *s, char **e) { int ret = -1; *e = (char *) 0; ret = strtol(s, e, 0); if (*e) switch (**e) { case 'b': case 'B': ret *= 512; *e = *e + 1; break; case 'k': case 'K': ret *= 1024; *e = *e + 1; break; case 'm': case 'M': ret *= 1024*1024; *e = *e + 1; break; case...
false
false
false
false
false
0
FCEUI_AddCheat(const char *name, uint32 addr, uint8 val, int compare, int type) { char *t; if(!(t=(char *)malloc(strlen(name)+1))) { CheatMemErr(); return(0); } strcpy(t,name); if(!AddCheatEntry(t,addr,val,compare,1,type)) { free(t); return(0); } savecheats=1; RebuildSubCheats(); return(1); }
false
true
false
false
false
1
remote_device_found(const char *adapter, const char *bdaddr, const char *name) { DBusMessage *message, *reply, *adapter_reply; DBusMessageIter iter; char *object_path = NULL; char *id; adapter_reply = NULL; if (adapter == NULL) { message = dbus_message_new_method_call("org.bluez", "/", "org.blue...
false
false
false
false
false
0
nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds) { if (atomic_dec_and_lock(&ds->ds_count, &nfs4_ds_cache_lock)) { list_del_init(&ds->ds_node); spin_unlock(&nfs4_ds_cache_lock); destroy_ds(ds); } }
false
false
false
false
false
0
rename_regexp(RenREInfo *ri, GError **err) { const gchar *fromdefd, *tod; guint reflags; GRegex *fromre = NULL; gboolean ok = TRUE; if((fromdefd = gtk_entry_get_text(GTK_ENTRY(ri->re_from))) == NULL) return FALSE; if((tod = gtk_entry_get_text(GTK_ENTRY(ri->re_to))) == NULL) return FALSE; reflags = G_REGE...
false
false
false
false
false
0
InstallProject() { cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Install projects" << std::endl); this->CleanTemporaryDirectory(); std::string bareTempInstallDirectory = this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY"); std::string tempInstallDirectoryStr = bareTempInstallDirectory; bool setDestDir = cmSyst...
false
false
false
false
false
0
contains_scalar_p (type_p t) { switch (t->kind) { case TYPE_STRING: case TYPE_POINTER: return 0; case TYPE_ARRAY: return contains_scalar_p (t->u.a.p); case TYPE_USER_STRUCT: /* User-marked structures will typically contain pointers. */ return 0; default: /* Could...
false
false
false
false
false
0
virtual_cwd_startup(void) /* {{{ */ { char cwd[MAXPATHLEN]; char *result; #ifdef NETWARE result = getcwdpath(cwd, NULL, 1); if(result) { char *c=cwd; while(c = strchr(c, '\\')) { *c='/'; ++c; } } #else result = getcwd(cwd, sizeof(cwd)); #endif if (!result) { cwd[0] = '\0'; } main_cwd_state.c...
false
false
false
false
false
0
updateVolume() { if (!m_player) return; m_player->setVolume(m_muted ? 0 : m_volume); if (renderer()) renderer()->updateFromElement(); }
false
false
false
false
false
0
Request_free (T *old) { if (*old) { Shortread_free(&(*old)->queryseq1); if ((*old)->queryseq2) { Shortread_free(&(*old)->queryseq2); } FREE_IN(*old); } return; }
false
false
false
false
false
0
print(STD_NAMESPACE ostream &stream, const size_t flags) const { const char *className = dcmFindNameOfUID(SOPClassUID.c_str()); stream << "("; if (className != NULL) stream << className; else stream << "\"" << SOPClassUID << "\""; stream ...
false
false
false
false
false
0
kvaser_leaf_rx_error(const struct kvaser_usb *dev, const struct kvaser_msg *msg) { struct kvaser_usb_error_summary es = { }; switch (msg->id) { case CMD_CAN_ERROR_EVENT: es.channel = msg->u.leaf.error_event.channel; es.status = msg->u.leaf.error_event.status; es.txerr = msg->u.leaf.error_event.tx_errors...
false
false
false
false
false
0
mouseReleaseEvent(QMouseEvent *e) { if (e->button() == Qt::LeftButton) URLObject::getInstance()->popupAction(url()); QLabel::mouseReleaseEvent(e); }
false
false
false
false
false
0
save_mem_devices(const struct dmi_header *dm, void *v) { const char *d = (const char *)dm; static int nr; if (dm->type != DMI_ENTRY_MEM_DEVICE) return; if (nr >= dmi_memdev_nr) { pr_warn(FW_BUG "Too many DIMM entries in SMBIOS table\n"); return; } dmi_memdev[nr].handle = get_unaligned(&dm->handle); dmi_me...
false
false
false
false
false
0
sssvlv_db_init( BackendDB *be, ConfigReply *cr) { slap_overinst *on = (slap_overinst *)be->bd_info; sssvlv_info *si; if ( ov_count == 0 ) { int rc; rc = register_supported_control2( LDAP_CONTROL_SORTREQUEST, SLAP_CTRL_SEARCH, NULL, sss_parseCtrl, 1 /* replace */, &sss_cid ); if ( rc != LDA...
false
false
false
false
false
0
idbm_for_each_drec(int type, char *config_root, void *data, idbm_drec_op_fn *fn) { DIR *entity_dirfd; struct dirent *entity_dent; int found = 0; discovery_rec_t drec; char *tmp_port; entity_dirfd = opendir(config_root); if (!entity_dirfd) return found; while ((entity_dent = readdir(entity_dirfd))) ...
false
false
false
false
false
0
on_setting_activate (GtkMenuItem *menuitem, gpointer thisitemsetting) { int oldval = GPOINTER_TO_INT( *((gpointer *)thisitemsetting+1) ); gpointer p=gtk_object_get_data(GTK_OBJECT(menuitem),"supermenu"); if (p) { GSList *g=gtk_object_get_data(p,"group"); while(g) { struct ...
false
false
false
false
false
0
standard_is_boolean (const char * key) { static GHashTable *bools = NULL; if (bools == NULL) { bools = g_hash_table_new (g_str_hash, g_str_equal); g_hash_table_insert (bools, GNOME_DESKTOP_ITEM_NO_DISPLAY, GNOME_DESKTOP_ITEM_NO_DISPLAY); g_hash_table_insert (bools, GNOME_DESKTOP_ITEM...
false
false
false
false
false
0
JustSummoned(Creature* pSummoned) override { if (pSummoned->GetEntry() == NPC_ZULFARRAK_ZOMBIE || pSummoned->GetEntry() == NPC_ZULFARRAK_DEAD_HERO) { pSummoned->AI()->AttackStart(m_creature->getVictim()); } }
false
false
false
false
false
0
scope_alloc(void) { scope_t *new_scope; new_scope = (scope_t *)malloc(sizeof(scope_t)); if (new_scope == NULL) stop("Unable to malloc scope object", EX_SOFTWARE); memset(new_scope, 0, sizeof(*new_scope)); TAILQ_INIT(&new_scope->inner_scope); if (SLIST_FIRST(&scope_stack) != NULL) { TAILQ_INSERT_TAIL(&SLIST...
false
false
false
false
false
0
main(int argc, char **argv) { int printUsage = 0; int printVersion = 0; UBool useLongNames = 0; int optInd = 1; char *arg; int32_t month = -1, year = -1; UErrorCode status = U_ZERO_ERROR; /* parse the options */ for(optInd = 1; optInd < argc; ++optInd) { arg = ...
false
false
false
false
false
0
preprocess_targetlist(PlannerInfo *root, List *tlist) { Query *parse = root->parse; int result_relation = parse->resultRelation; List *range_table = parse->rtable; CmdType command_type = parse->commandType; /* * Sanity check: if there is a result relation, it'd better be a real * relation not a subqu...
false
false
false
false
false
0
daemonize(void) { int pid = fork(); if (pid < 0) /* error */ return -errno; if (pid > 0) /* parent */ return 0; /* child */ close(0); xopen(bb_dev_null, O_RDWR); xdup2(0, 1); xdup2(0, 2); setsid(); openlog(applet_name, LOG_PID, LOG_DAEMON); logmode = LOGMODE_SYSLOG; return 1; }
false
false
false
false
false
0
uListInit(ULIST **ul, int size, int flags) { ULIST *r_ul; *ul = NULL; if (size == 0) { size = ULIST_DEFAULT_SIZE; } r_ul = (ULIST *) calloc (1, sizeof (ULIST)); if (r_ul == NULL) { return nerr_raise(NERR_NOMEM, "Unable to create ULIST: Out of memory"); } r_ul->items = (void **) calloc (siz...
false
false
false
false
false
0
vu_check_height(t_vu *x, int h) { int n; n = h / IEM_VU_STEPS; if(n < IEM_VU_MINSIZE) n = IEM_VU_MINSIZE; x->x_led_size = n-1; x->x_gui.x_h = IEM_VU_STEPS * n; }
false
false
false
false
false
0
sec_pkcs12_decode_authenticated_safe(SEC_PKCS12PFXItem *pfx) { SECItem *der_asafe = NULL; SEC_PKCS12AuthenticatedSafe *asafe = NULL; SECStatus rv; if(pfx == NULL) { return NULL; } der_asafe = SEC_PKCS7GetContent(&pfx->authSafe); if(der_asafe == NULL) { /* XXX set error ? */ goto loser;...
false
false
false
false
false
0
clearItems(){ list->clearItems(); field->setIcon(NULL); field->setText(" "); recalc(); }
false
false
false
false
false
0
handle_optval (char *s, int ci, gretlopt opt, int status) { char *p = s + 1; /* skip '=' */ char *val = NULL; int len = 0, quoted = 0; int err = 0; if (*p == '"') { /* handle a quoted value (e.g. a filename) */ quoted = 1; p++; val = get_quoted_optval(p, &len); if (val == NULL) { err = E_...
false
false
false
false
false
0
hasRegsUsedByUsesOtherThan(size_t LUIdx, const RegUseTracker &RegUses) const { if (ScaledReg) if (RegUses.isRegUsedByUsesOtherThan(ScaledReg, LUIdx)) return true; for (SmallVectorImpl<const SCEV *>::const_iterator I = BaseRegs.begin(), E = BaseRegs.end(); I ...
false
false
false
false
false
0
mmio16read__write_file(struct b43_wldev *dev, const char *buf, size_t count) { unsigned int addr; int res; res = sscanf(buf, "0x%X", &addr); if (res != 1) return -EINVAL; if (addr > B43_MAX_MMIO_ACCESS) return -EADDRNOTAVAIL; if ((addr % 2) != 0) return -EINVAL; dev->dfsentry->mmio16read_next = add...
false
false
false
false
false
0
shell_exec_node(struct gnutella_shell *sh, int argc, const char *argv[]) { shell_check(sh); g_assert(argv); g_assert(argc > 0); if (argc < 2) return REPLY_ERROR; #define CMD(name) G_STMT_START { \ if (0 == ascii_strcasecmp(argv[1], #name)) \ return shell_exec_node_ ## name(sh, argc - 1, argv + 1); \ } G_STMT...
false
false
false
false
false
0
insert_to_undo(u, start, size) struct undostack *u; int start,size; { if (uputcmd(u, size, start, U_DELC)) { fixmarkers(start, size); bufmax += size; } else error(); }
false
false
false
false
false
0
cb_general(void) { #if !defined(WIN32) gint n; gboolean new_state; #endif if (allow_multiple_button) _GK.allow_multiple_instances = GTK_TOGGLE_BUTTON(allow_multiple_button)->active; if (on_top_button) _GK.on_top = GTK_TOGGLE_BUTTON(on_top_button)->active; _GK.save_position = GTK_TOGGLE_BUTTON(save_pos...
false
false
false
false
false
0
__archive_rep_exit(env) ENV *env; { DB_REP *db_rep; REP *rep; if (!REP_ON(env)) return (0); db_rep = env->rep_handle; rep = db_rep->region; REP_SYSTEM_LOCK(env); rep->arch_th--; REP_SYSTEM_UNLOCK(env); return (0); }
false
false
false
false
false
0
_move_one_lv(struct volume_group *vg_from, struct volume_group *vg_to, struct dm_list *lvh) { struct logical_volume *lv = dm_list_item(lvh, struct lv_list)->lv; dm_list_move(&vg_to->lvs, lvh); lv->vg = vg_to; if (lv_is_active(lv)) { log_error("Logical volume \"%s\" must be inactive", lv->name); return...
false
false
false
false
false
0
Mp4_Header_Display_File_Info_To_UI(gchar *filename, ET_File_Info *ETFileInfo) { gchar *text; gchar *time = NULL; gchar *time1 = NULL; gchar *size = NULL; gchar *size1 = NULL; /* MPEG, Layer versions */ gtk_label_set_text(GTK_LABEL(VersionLabel),ETFileInfo->mpc_version); //text = g_strdu...
false
false
false
false
false
0
picolcd_init_cir(struct picolcd_data *data, struct hid_report *report) { struct rc_dev *rdev; int ret = 0; rdev = rc_allocate_device(); if (!rdev) return -ENOMEM; rdev->priv = data; rdev->driver_type = RC_DRIVER_IR_RAW; rdev->allowed_protocols = RC_BIT_ALL; rdev->open = picolcd_...
false
false
false
false
false
0
ApplyModUInt32Value(uint16 index, int32 val, bool apply) { int32 cur = GetUInt32Value(index); cur += (apply ? val : -val); if (cur < 0) { cur = 0; } SetUInt32Value(index, cur); }
false
false
false
false
false
0
borg_activate_item(int tval, int sval, bool target) { int i; /* Check the equipment */ for (i = INVEN_WIELD; i < INVEN_TOTAL; i++) { borg_item *item = &borg_items[i]; /* Skip incorrect items */ if (item->tval != tval) continue; if (item->sval != sval) continue; ...
false
false
false
false
false
0
meta_color_component_from_string (const char *str) { if (strcmp ("fg", str) == 0) return META_GTK_COLOR_FG; else if (strcmp ("bg", str) == 0) return META_GTK_COLOR_BG; else if (strcmp ("light", str) == 0) return META_GTK_COLOR_LIGHT; else if (strcmp ("dark", str) == 0) return META_GTK_COLOR_DARK...
false
false
false
false
false
0
z180_set_irq_line(int irqline, int state) { if (irqline == IRQ_LINE_NMI) { if( Z180.nmi_state == state ) return; LOG(("Z180 #%d set_irq_line (NMI) %d\n", cpu_getactivecpu(), state)); Z180.nmi_state = state; if( state == CLEAR_LINE ) return; LOG(("Z180 #%d take NMI\n", cpu_getactivecpu())); _P...
false
false
false
false
false
0
do_move_mount(struct path *path, const char *old_name) { struct path old_path, parent_path; struct mount *p; struct mount *old; struct mountpoint *mp; int err; if (!old_name || !*old_name) return -EINVAL; err = kern_path(old_name, LOOKUP_FOLLOW, &old_path); if (err) return err; mp = lock_mount(path); err...
false
false
false
false
false
0
getsize (siz) unsigned long siz []; { long i; for (i=0 ; i<MAXCMD_DFN ; i++) siz [i] = 0; siz [character_DFN] = sizeof (char); siz [short_DFN] = sizeof (short); siz [integer_DFN] = sizeof (int); siz [long_DFN] = sizeof (long); siz [string_DFN] = sizeof (char *); siz [chain_DFN...
false
false
false
false
false
0
FindDirection(WORD x1, WORD y1, WORD x2,WORD y2) { register WORD xd,xr,yd,yr; xd=(x1-x2); yd=(y1-y2); yr=( yd >> 1); xr=( xd >> 1); // Mi serve il modulo / 2 if(xd >= yr ) /* NO O, SO o S */ { if( yd > -xr ) /* NO o O */ { if(yd<xr) return D_O...
false
false
false
false
false
0
sentinelFailoverSendSlaveOfNoOne(sentinelRedisInstance *ri) { int retval; /* We can't send the command to the promoted slave if it is now * disconnected. Retry again and again with this state until the timeout * is reached, then abort the failover. */ if (ri->promoted_slave->flags & SRI_DISCONNEC...
false
false
false
false
false
0
menu_copy (void) { if (is_drawing) { cancel_action (); return; } if (num_sel == 0) return; if (copy_buffer != NULL) free_bond_list (copy_buffer); copy_buffer = copy_selection (bonds, 1000, -1000); }
false
false
false
false
false
0
sanitize_size (GdkWindow *window, gint *width, gint *height) { gboolean set_bg = FALSE; if ((*width == -1) && (*height == -1)) { set_bg = GDK_IS_WINDOW (window); gdk_window_get_size (window, width, height); } else if (*width == -1) gdk_window_get_s...
false
false
false
false
false
0
_gst_parse_escape (const gchar * str) { GString *gstr = NULL; g_return_val_if_fail (str != NULL, NULL); gstr = g_string_sized_new (strlen (str)); while (*str) { if (*str == ' ') g_string_append_c (gstr, '\\'); g_string_append_c (gstr, *str); str++; } return g_string_free (gstr, FALSE);...
false
false
false
false
false
0
getSelectedItemArgument(int listID) { void *res = 0; int i, sz; dbgprintf("Looking for path of image being currently selected\n"); sz = size(); // look for where the image list begins for (i = 0 ; i < sz; i++) { if ((dynamicMenu[i].label() != 0) && (strcmp(dynamicMenu[i].label(), l...
false
false
false
false
false
0
hide_last_colon ( void ) { if ( define_token ) { tic_hdr_t *temp_vocab; /* The add_to_current() function will have been called before this * one when a new colon-definition is created, so save_current * will have been set to point to the entry that had been made * just...
false
false
false
false
false
0
snd_m3_interrupt(int irq, void *dev_id) { struct snd_m3 *chip = dev_id; u8 status; int i; status = inb(chip->iobase + HOST_INT_STATUS); if (status == 0xff) return IRQ_NONE; if (status & HV_INT_PENDING) schedule_work(&chip->hwvol_work); /* * ack an assp int if its running * and has an int pending */...
false
false
false
false
false
0
zxid_mk_subj(zxid_conf* cf, struct zx_elem_s* father, zxid_entity* sp_meta, zxid_nid* nid) { struct zx_sa_Subject_s* subj = zx_NEW_sa_Subject(cf->ctx, father); #if 0 // , struct zx_str* affil, char* fmt nid = zx_NEW_sa_NameID(cf->ctx,0); nid->SPNameQualifier = affil; nid->NameQualifier = zxid_my_ent_id(cf); ...
false
false
false
false
false
0
zxid_get_epr_tas3_trust(zxid_conf* cf, zxid_epr* epr) { if (!epr || !epr->Metadata || !epr->Metadata->Trust) return 0; return zx_easy_enc_elem_sig(cf, &epr->Metadata->Trust->gg); }
false
false
false
false
false
0
pnm_getint16(jas_stream_t *in, int *val) { int v; int c; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = c & 0xff; if ((c = jas_stream_getc(in)) == EOF) { return -1; } v = (v << 8) | (c & 0xff); *val = v; return 0; }
false
false
false
false
false
0
command_stats_getPhotostreamStats(flickcurl* fc, int argc, char *argv[]) { char* date = argv[1]; int views; views = flickcurl_stats_getPhotostreamStats(fc, date); if(views < 0) return 1; fprintf(stdout, "%s: Photostream view stats: %d\n", program, views); return 0; }
false
false
false
false
false
0
Stack_makeMarksNull(Stack *self) { ptrdiff_t mark = self->lastMark; while (mark) { ptrdiff_t nextMark = (ptrdiff_t)self->items[mark]; self->items[mark] = NULL; mark = nextMark; } }
false
false
false
false
false
0
showserverGetFields(const AjPStr svrname, AjPStr* fields) { AjPQuery query; query = ajQueryNew(AJDATATYPE_UNKNOWN); ajStrAssignS(&query->SvrName, svrname); ajNamSvrData(query,0); ajStrAssignS(fields, query->DbFields); /* if there are no query fields, then change to a '_' */ if(!ajStrGetLe...
false
false
false
false
false
0
board_hash_update(struct board *board, coord_t coord, enum stone color) { board->hash ^= hash_at(board, coord, color); board->qhash[coord_quadrant(coord, board)] ^= hash_at(board, coord, color); if (DEBUGL(8)) fprintf(stderr, "board_hash_update(%d,%d,%d) ^ %"PRIhash" -> %"PRIhash"\n", color, coord_x(coord, board),...
false
false
false
false
false
0
setView(FV_View* pView) { m_pView = pView; fp_Page* pPage = getFirstPage(); while (pPage) { pPage->setView(pView); pPage = pPage->getNext(); } if (m_pView && !m_pPrefs ) { XAP_Prefs *pPrefs= XAP_App::getApp()->getPrefs(); UT_ASSERT_HARMLESS(pPrefs); if (pPrefs) { // remember this so we can re...
false
false
false
false
false
0
rsvg_state_finalize (RsvgState * state) { g_free (state->font_family); g_free (state->lang); rsvg_paint_server_unref (state->fill); rsvg_paint_server_unref (state->stroke); if (state->dash.n_dash != 0) g_free (state->dash.dash); if (state->styles) { g_hash_table_unref (state->s...
false
false
false
false
false
0
amdgpu_ih_ring_alloc(struct amdgpu_device *adev) { int r; /* Allocate ring buffer */ if (adev->irq.ih.ring_obj == NULL) { r = amdgpu_bo_create(adev, adev->irq.ih.ring_size, PAGE_SIZE, true, AMDGPU_GEM_DOMAIN_GTT, 0, NULL, NULL, &adev->irq.ih.ring_obj); if (r) { DRM_ERROR("amdgpu: f...
false
false
false
false
false
0
_create_sview_part_sub(partition_info_t *part_ptr, node_info_t *node_ptr, int node_scaling) { sview_part_sub_t *sview_part_sub_ptr = xmalloc(sizeof(sview_part_sub_t)); if (!part_ptr) { g_print("got no part_ptr!\n"); xfree(sview_part_sub_ptr); return NULL; } if (!node_ptr) { g_print("got no no...
false
false
false
false
false
0
sw_client_service_banishable_hide_item (SwClientService *service, const gchar *uid) { SwClientServicePrivate *priv = GET_PRIVATE (service); GError *error = NULL; if (!_sw_client_service_setup_proxy_for_iface (service, pr...
false
false
false
false
false
0
cf_section_sub_find_name2(const CONF_SECTION *cs, const char *name1, const char *name2) { CONF_ITEM *ci; if (!cs) cs = mainconfig.config; if (name1 && (cs->section_tree)) { CONF_SECTION mycs, *master_cs; mycs.name1 = name1; mycs.name2 = name2; master_cs = rbtree_finddata(cs->section_tree, &mycs);...
false
false
false
false
false
0
AllocateJSGlobalPropertyCell(Object* value) { Object* result; { MaybeObject* maybe_result = AllocateRawCell(); if (!maybe_result->ToObject(&result)) return maybe_result; } HeapObject::cast(result)->set_map(global_property_cell_map()); JSGlobalPropertyCell::cast(result)->set_value(value); return result; ...
false
false
false
false
false
0
save_ipod_prefs(iTunesDB *itdb, const gchar *mountpoint) { g_return_val_if_fail (itdb && mountpoint, FALSE); return save_ipod_index_prefs(get_itdb_index(itdb), mountpoint); }
false
false
false
false
false
0
maybe_add_category_view (GnomeControlCenter *shell, const char *name) { GtkTreeModel *filter; GtkWidget *categoryview; if (g_hash_table_lookup (shell->priv->category_views, name) != NULL) return; if (g_hash_table_size (shell->priv->category_views) > 0) { GtkWidge...
false
false
false
false
false
0
firestring_estr_ip_chug(struct firestring_estr_t * const s) { /* remove leading whitespace in place */ long start = 0; while (start < s->l && isspace(s->s[start])) start++; memmove(s->s,&s->s[start],s->l - start); s->l -= start; }
false
false
false
false
false
0
opt_baw_put (gnm_float s, gnm_float x, gnm_float t, gnm_float r, gnm_float v, gnm_float b) { gnm_float sk = NRA_p (x, t, r, v, b); gnm_float n = 2 * b / (v * v); gnm_float k = 2 * r / ((v * v) * (1.0 - gnm_exp (-r * t))); gnm_float d1 = (gnm_log (sk / x) + (b + (v * v) / 2.0) * t) / (v * gnm_sqrt (t)); gnm_float q...
false
false
false
false
false
0
set_row_attrib(glp_tree *tree, struct MIR *mir) { /* set global row attributes */ glp_prob *mip = tree->mip; int m = mir->m; int k; for (k = 1; k <= m; k++) { GLPROW *row = mip->row[k]; mir->skip[k] = 0; mir->isint[k] = 0; switch (row->type) { case...
false
false
false
false
false
0
htlepagemaps_init(Bounds *b, File *file, ht_format_group *group) { ht_le_shared_data *le_shared=(ht_le_shared_data *)group->get_shared_data(); FileOfs h = le_shared->hdr_ofs; ht_uformat_viewer *v=new ht_uformat_viewer(); v->init(b, DESC_LE_PAGEMAP, VC_EDIT | VC_SEARCH, file, group); ht_mask_sub *m = new ht_mask...
false
false
false
false
false
0
CreateApiObjects() { Object* obj; { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); if (!maybe_obj->ToObject(&obj)) return false; } set_neander_map(Map::cast(obj)); { MaybeObject* maybe_obj = Heap::AllocateJSObjectFromMap(neander_map()); if (!maybe_obj->ToObject(&obj)) r...
false
false
false
false
false
0
unit_can_est_trade_route_here(const struct unit *punit) { struct city *phomecity, *pdestcity; return (unit_has_type_flag(punit, F_TRADE_ROUTE) && (pdestcity = tile_city(unit_tile(punit))) && (phomecity = game_city_by_number(punit->homecity)) && can_cities_trade(phomecity, pdestcity));...
false
false
false
false
false
0
vm_bind_device(vm_instance_t *vm,struct vdevice *dev) { struct vdevice **cur; u_int i; /* * Add this device to the device array. The index in the device array * is used by the MTS subsystem. */ for(i=0;i<VM_DEVICE_MAX;i++) if (!vm->dev_array[i]) break; if (i == VM_DEVICE_MAX...
false
false
false
false
false
0
gimple_seq_add_stmt (gimple_seq *seq_p, gimple gs) { gimple_stmt_iterator si; if (gs == NULL) return; if (*seq_p == NULL) *seq_p = gimple_seq_alloc (); si = gsi_last (*seq_p); gsi_insert_after (&si, gs, GSI_NEW_STMT); }
false
false
false
false
false
0
_round_item_del(Elm_Diskselector_Smart_Data *sd, Elm_Diskselector_Item *it) { if (!it) return; elm_box_unpack(sd->main_box, VIEW(it)); sd->r_items = eina_list_remove(sd->r_items, it); eina_stringshare_del(it->label); elm_widget_item_free(it); }
false
false
false
false
false
0
amd_pmu_init(struct kvm_vcpu *vcpu) { struct kvm_pmu *pmu = vcpu_to_pmu(vcpu); int i; for (i = 0; i < AMD64_NUM_COUNTERS ; i++) { pmu->gp_counters[i].type = KVM_PMC_GP; pmu->gp_counters[i].vcpu = vcpu; pmu->gp_counters[i].idx = i; } }
false
false
false
false
false
0
setPaperColor(void) { const PP_AttrProp* pSectionAP = NULL; getAP(pSectionAP); UT_return_if_fail(pSectionAP); const char* pszClrPaper = NULL; pSectionAP->getProperty("background-color", (const gchar *&)pszClrPaper); FV_View * pView = m_pLayout->getView(); if(pszClrPaper && strcmp(pszClrPaper,"transparent") != 0...
false
false
false
false
false
0
db__recv_value(dbValue * value, int Ctype) { DB_RECV_CHAR(&value->isNull); if (value->isNull) return DB_OK; switch (Ctype) { case DB_C_TYPE_INT: DB_RECV_INT(&value->i); break; case DB_C_TYPE_DOUBLE: DB_RECV_DOUBLE(&value->d); break; case DB_C_TYPE_STRING: DB_RECV_STRING(&value->s); break...
false
false
false
false
false
0
minix_mkdir(struct inode * dir, struct dentry *dentry, umode_t mode) { struct inode * inode; int err; inode_inc_link_count(dir); inode = minix_new_inode(dir, S_IFDIR | mode, &err); if (!inode) goto out_dir; minix_set_inode(inode, 0); inode_inc_link_count(inode); err = minix_make_empty(inode, dir); if (e...
false
false
false
false
false
0
gst_base_rtp_audio_payload_push_buffer (GstBaseRTPAudioPayload * baseaudiopayload, GstBuffer * buffer, GstClockTime timestamp) { GstBaseRTPPayload *basepayload; GstBaseRTPAudioPayloadPrivate *priv; GstBuffer *outbuf; guint8 *payload; guint payload_len; GstFlowReturn ret; priv = baseaudiopayload->priv...
false
true
false
false
false
1
parseQuoted (char startQuote, char endQuote, const char *aCStr) { int retVal = 0; if ( aCStr && *aCStr ) { if ( *aCStr == startQuote ) { aCStr++; retVal++; } else { return 0; } while ( *aCStr && *aCStr != endQuote ) { //skip over backticks if ( *aCStr == '\\' ) { ...
false
false
false
false
false
0
awtc_fgets(char *s, int size, FILE *stream) { // same as fgets but also works with file in MACOS format int i; for (i = 0; i<(size-1); ++i) { int byte = fgetc(stream); if (byte == EOF) { if (i == 0) return 0; break; } s[i] = byte; if (byte == ...
false
false
false
false
false
0