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
amd_powerplay_display_configuration_change(void *handle, const void *input) { struct pp_hwmgr *hwmgr; const struct amd_pp_display_configuration *display_config = input; PP_CHECK((struct pp_instance *)handle); hwmgr = ((struct pp_instance *)handle)->hwmgr; phm_store_dal_configuration_data(hwmgr, display_config)...
false
false
false
false
false
0
printable_time(time_t t) { static char s[128]; char *p; if ((p = ctime(&t)) == NULL) strlcpy(s, "?", sizeof(s)); else { strlcpy(s, p + 4, sizeof(s)); s[20] = 0; } return s; }
false
false
false
false
false
0
cleanupContent(void) { TextureManager::getSingleton().remove("DynaTex"); delete vrend; delete trend; }
false
false
false
false
false
0
pndparams_explicit(struct namparam_t *npmphdr, int32 *all_named) { register struct namparam_t *npmp; int32 has_named, all2_named; *all_named = FALSE; has_named = FALSE; all2_named = TRUE; for (npmp = npmphdr; npmp != NULL; npmp = npmp->nprmnxt) { if (npmp->pnam != NULL) has_named = TRUE; else all2_named ...
false
false
false
false
false
0
get_phy_c45_devs_in_pkg(struct mii_bus *bus, int addr, int dev_addr, u32 *devices_in_package) { int phy_reg, reg_addr; reg_addr = MII_ADDR_C45 | dev_addr << 16 | MDIO_DEVS2; phy_reg = mdiobus_read(bus, addr, reg_addr); if (phy_reg < 0) return -EIO; *devices_in_package = (phy_reg & 0xffff) << 16; reg_ad...
false
false
false
false
false
0
file_should_show_foreach (NautilusFile *file, gboolean *show_mount, gboolean *show_unmount, gboolean *show_eject, gboolean *show_start, gboolean *show_stop, gboolean *show_poll, GDriveStartStopType *start_stop_ty...
false
false
false
false
false
0
selection_changed_cb (GtkTreeSelection *selection, gpointer data) { GtkWidget * dialog = data; ui_gate_dialog_t * gd; gd = g_object_get_data(G_OBJECT(dialog), "gd"); if (gd->ds == NULL) return; /* run the following function on each selected row */ gd->valid = FALSE; gtk_tree_selection_selected_foreach(...
false
false
false
false
false
0
_craft_state_description (FrogrMainView *mainview) { FrogrMainViewPrivate *priv = NULL; FrogrAccount *account = NULL; GSList *pictures = NULL; guint n_pictures = 0; const gchar *login = NULL; gchar *description = NULL; gchar *login_str = NULL; gchar *bandwidth_str = NULL; gchar *upload_size_str = NULL...
false
false
false
false
false
0
hud_squadmsg_toggle() { // if the emp effect is active, always ignore this if(emp_active_local()){ return; } // if entering this mode, must setup messaging system. Don't start squadmessging if // the player is dead. if ( !(Player->flags & PLAYER_FLAGS_MSG_MODE) ) { if ( Game_mode & GM_DEAD ){ return; ...
false
false
false
false
false
0
prep(bool wantVec) { /* The default behavior is to pass down the wantVec flag to all children and set isVec to true if any child is a vec. */ bool valid=true; std::vector<SeExprNode*>::iterator iter; _isVec = 0; for (iter = _children.begin(); iter != _children.end(); iter++) { SeExprNode* ch...
false
false
false
false
false
0
init_packbuffer_from_buffer(sge_pack_buffer *pb, char *buf, u_long32 buflen) { DENTER(PACK_LAYER, "init_packbuffer_from_buffer"); if (!pb && !buf) { DRETURN(PACK_FORMAT); } memset(pb, 0, sizeof(sge_pack_buffer)); pb->head_ptr = buf; pb->cur_ptr = buf; pb->mem_size = buflen; pb->byte...
false
false
false
false
false
0
d_print_mod_list (struct d_print_info *dpi, int options, struct d_print_mod *mods, int suffix) { struct d_print_template *hold_dpt; if (mods == NULL || d_print_saw_error (dpi)) return; if (mods->printed || (! suffix && (mods->mod->type == DEMANGLE_COMPONENT_RESTRICT_THIS ||...
false
false
false
false
false
0
shdma_prep_slave_sg( struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len, enum dma_transfer_direction direction, unsigned long flags, void *context) { struct shdma_chan *schan = to_shdma_chan(chan); struct shdma_dev *sdev = to_shdma_dev(schan->dma_chan.device); const struct shdma_ops *ops = sdev->o...
false
false
false
false
false
0
expandMacro(const MacroRegModify & MacroMod) { RegModOffset * regmod; // set source and destination registers in macro expansion for (uint i = 0; i < MacroMod.RegModSize; i++) { regmod = &MacroMod.RegMods[i]; MacroMod.Macro[regmod->MacroOffset].mID = regmod->RegisterBase + mOpParrams[regmo...
false
false
false
false
false
0
create_op(xmlNode * cib_resource, const char *task, int interval, int outcome) { lrmd_event_data_t *op = NULL; xmlNode *xop = NULL; op = calloc(1, sizeof(lrmd_event_data_t)); op->rsc_id = strdup(ID(cib_resource)); op->interval = interval; op->op_type = strdup(task); op->rc = outcome; ...
false
false
false
false
false
0
extractprefixbytecode(unsigned long merbytes, unsigned int prefixlength, const GtUchar *bytecode) { unsigned long idx, code = 0; for (idx=0; idx < MIN((unsigned long) sizeof (unsigned long),merbytes); idx++) { code = (code ...
false
false
false
false
false
0
AddExtension(const std::string& name, const std::string& data, bool crit) { X509_EXTENSION* ext = NULL; ext = CreateExtension(name, data, crit); if(ext && sk_X509_EXTENSION_push(extensions_, ext)) return true; return false; }
false
false
false
false
false
0
About( void ) { wxString os1; long lStyle; os1 << wxT("\n " ) << APP_NAME << wxT("\n Version ") << APP_VERSION << wxT(" (") << APP_DATE << wxT(")") << wxT("\n ") ...
false
false
false
false
false
0
ssl_pick_cert( ssl_context *ssl, const ssl_ciphersuite_t * ciphersuite_info ) { ssl_key_cert *cur, *list; pk_type_t pk_alg = ssl_get_ciphersuite_sig_pk_alg( ciphersuite_info ); #if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) if( ssl->handshake->sni_key_cert != NULL ) list...
false
false
false
false
false
0
additionalVertices(JohnsonBodyPart j,uint32_t numBaseEdges) { if (j==INF_NO_BODY||j==SUP_NO_BODY) return 0; else if (j<UPWARDS_CUPOLA) return 1; //j is a pyramid else if (j<PRISM) return numBaseEdges>>1; //j is a cupola else if (j<UPWARDS_ROTUNDA) return numBaseEdges; //j is a prism or antiprism else return 10; //...
false
false
false
false
false
0
add_layout_group(const sharedptr<LayoutGroup>& group, bool is_top_level) { //row[model_parts->m_columns.m_col_item] = sharedptr<LayoutItem>(static_cast<LayoutItem*>(group->clone())); //Add the group item: if(!is_top_level) { create_canvas_layout_item_and_add(group); } //Add the group's children. add...
false
false
false
false
false
0
evas_object_image_reload(Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if ((o->preloading) && (o->engin...
false
false
false
false
false
0
get_state (igzstream& file) { mapcharacter *mc = NULL; u_int16 nbr_of; string id; // try to load event list if (!event_list::get_state (file)) return false; // Load the mapcharacters nbr_of << file; for (u_int16 i = 0; i < nbr_of; i++) { id << file; ...
false
false
false
false
false
0
get_message_from_identifier(const char *identifier) { GeneralMessage *msg = first_msg; while (msg && ((msg->identifier == 0) || (strcmp(msg->identifier, identifier) != 0))) msg = msg->next; return msg; }
false
false
false
false
false
0
cleanruv_log(Slapi_Task *task, char *task_type, char *fmt, ...) { va_list ap1; va_list ap2; va_list ap3; va_list ap4; char *errlog_fmt; va_start(ap1, fmt); va_start(ap2, fmt); va_start(ap3, fmt); va_start(ap4, fmt); if(task){ slapi_task_log_notice_ext(task, fmt, ap1); ...
false
false
false
false
false
0
avdtp_unref(struct avdtp *session) { struct avdtp_server *server; if (!session) return; session->ref--; DBG("%p: ref=%d", session, session->ref); if (session->ref == 1) { if (session->state == AVDTP_SESSION_STATE_CONNECTING && session->io) { avdtp_cancel_authorization(session); g_io_channel_s...
false
false
false
false
false
0
tp_proxy_signal_connection_dropped (gpointer p, GClosure *unused) { TpProxySignalConnection *sc = p; MORE_DEBUG ("%p (%u invocations queued)", sc, sc->invocations.length); tp_proxy_signal_connection_unref (sc); }
false
false
false
false
false
0
zmalloc_get_smap_bytes_by_field(char *field) { char line[1024]; size_t bytes = 0; FILE *fp = fopen("/proc/self/smaps","r"); int flen = strlen(field); if (!fp) return 0; while(fgets(line,sizeof(line),fp) != NULL) { if (strncmp(line,field,flen) == 0) { char *p = strchr(line,'k...
false
false
false
false
false
0
sig_complete_unload(GList **list, WINDOW_REC *window, const char *word, const char *line, int *want_space) { if (*line != '\0') return; /* completing script parameter for /SCRIPT UNLOAD */ *list = script_complete(word); if (*list != NULL) signal_stop(); }
false
false
false
false
false
0
init_usq(f) /* initialize Huffman unsqueezing */ FILE *f; /* file containing squeezed data */ { int i; /* node index */ u_int inlen; bpos = 99; /* force initial read */ inlen = getb_unp(f); inbeg = pinbuf; inend = &pinbuf[inlen]; GET_INT(numnodes); if (numnodes < 0 || numnodes >= NUMVALS) arc...
false
false
false
false
false
0
plpgsql_parse_wordtype(char *word) { PLpgSQL_nsitem *nse; bool old_nsstate; HeapTuple typeTup; char *cp[2]; int i; /* Do case conversion and word separation */ /* We convert %type to .type momentarily to keep converter happy */ i = strlen(word) - 5; Assert(word[i] == '%'); word[i] = '.'; plpgsql_conve...
true
true
false
false
false
1
addToPersonal(const QString &word) { enchant_dict_add_to_pwl(m_dict, word.toUtf8(), word.toUtf8().length()); return true; }
false
false
false
false
false
0
createMess(t_symbol* s) { char* disp = NULL; /* just in case a "pleaseDestroy" is still pending... */ GemMan::pleaseDestroy=false; if (s != &s_) disp = s->s_name; if ( !GemMan::windowExists() ) { GemMan::createContext(disp); if ( !GemMan::createWindow(disp) ) { error("no window made")...
false
false
false
false
false
0
PyDict_SetItemString(PyObject *v, const char *key, PyObject *item) { PyObject *kv; int err; kv = PyString_FromString(key); if (kv == NULL) return -1; PyString_InternInPlace(&kv); /* XXX Should we really? */ err = PyDict_SetItem(v, kv, item); Py_DECREF(kv); return err; }
false
false
false
false
false
0
ddf_CreateSetFamily(ddf_bigrange fsize, ddf_bigrange ssize) { ddf_SetFamilyPtr F; ddf_bigrange i,f0,f1,s0,s1; if (fsize<=0) { f0=0; f1=1; /* if fsize<=0, the fsize is set to zero and the created size is one */ } else { f0=fsize; f1=fsize; } if (ssize<=0) { s0=0; s1=1; /* if ssize<=0...
false
false
false
false
false
0
multi_search(pattern, charset, n) char *pattern; CHARSET *charset; int n; { register int nomore; IFILE save_ifile; int changed_file; changed_file = 0; save_ifile = save_curr_ifile(); if (search_type & SRCH_FIRST_FILE) { /* * Start at the first (or last) file * in the command line list. */ if (...
false
false
false
false
false
0
lookup_real(struct inode *dir, struct dentry *dentry, unsigned int flags) { struct dentry *old; /* Don't create child dentry for a dead directory. */ if (unlikely(IS_DEADDIR(dir))) { dput(dentry); return ERR_PTR(-ENOENT); } old = dir->i_op->lookup(dir, dentry, flags); if (unlikely(old)) { dput(dentr...
false
false
false
false
false
0
glade_gtk_assistant_update_page_type (GtkAssistant *assistant) { gint i, current, pages; GtkWidget *page; current = gtk_assistant_get_current_page (assistant); pages = gtk_assistant_get_n_pages (assistant) - 1; if (pages < 0) return; /* Last Page */ page = gtk_assistant_get_nth_page (assistant, pages); gtk_a...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__eda__PrintedReport_EndPage(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * page) { struct __ecereNameSpace__eda__PrintedReport * __ecerePointer___ecereNameSpace__eda__PrintedReport = (struct __ecereNameSpace__eda__PrintedReport *)(thi...
false
false
false
true
false
1
end_loop() { fixloop(); if (n>2) transformed_vertex((COORD_T)p[0].x, (COORD_T)p[0].y); end_line(); }
false
false
false
false
false
0
RenderOverlay(vtkViewport *viewport) { this->BuildRepresentation(); int count = 0; if ( this->TextActor->GetVisibility() ) { count += this->TextActor->RenderOverlay(viewport); } count += this->BoxActor->RenderOverlay(viewport); if ( this->HBoxActor->GetVisibility() ) { count += this->HBo...
false
false
false
false
false
0
flatten(Scope *sc) { Statements *a = NULL; if (statement) { a = statement->flatten(sc); if (a) { if (!a->dim) { a->push(new ExpStatement(loc, (Expression *)NULL)); } Statement *s = (*a)[0]; s = new LabelSta...
false
false
false
false
false
0
ListExposedPolarResidues_ (RuntimeS *runtimeSP, int docking_complexI) { MolComplexS *curr_mol_complexSP; int *exposed_atomIP; ExposedResidueS *exposed_polarSP; int exposed_polarN = 0; int matrix_width; int rowI, columnI, combinedI; int *curr_cellP; int atomI; AtomS *curr_atomSP; char pure_residue_name...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); CalendarItemEditorPatientMapperWidget *_t = static_cast<CalendarItemEditorPatientMapperWidget *>(_o); switch (_id) { case 0: _t-...
false
false
false
false
false
0
ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq, struct sk_buff *skb, int count) { struct ath_frame_info *fi = get_frame_info(skb); struct ath_buf *bf = fi->bf; struct ieee80211_hdr *hdr; int prev = fi->retries; TX_STAT_INC(txq->axq_qnum, a_retries); fi->retries += count; if (prev > 0) ret...
false
false
false
false
false
0
save_battery_config(FILE *f) { GList *list; Battery *bat; fprintf(f, "%s enable %d\n", BAT_CONFIG_KEYWORD, enable_each); fprintf(f, "%s enable_composite %d\n", BAT_CONFIG_KEYWORD, enable_composite); fprintf(f, "%s estimate_time %d\n", BAT_CONFIG_KEYWORD, enable_estimate); /* 2.1.15: scale saved float valu...
false
false
false
false
false
0
statcmp(struct stat *s1, struct stat *s2, unsigned long type) { int retval = 0; if (type & ST_DEV) { retval += s1->st_dev != s2->st_dev; } if (type & ST_INO) { retval += s1->st_ino != s2->st_ino; } if (type & ST_MODE) { retval += s1->st_mode != s2->st_mode; } if ...
false
false
false
false
false
0
calcDataRectLimits( double x1, double x2, double y1, double y2 ) { double XA1, XA2, YA1, YA2; if (x2<x1) { XA1=x2; XA2=x1; } else { XA1=x1; XA2=x2; } if ( y2<y1) { YA1=y2; YA2=y1; } else { YA1=y1; YA2=y2; } if ( XA2 == XA1 ) { kWarning() << "x1 and x2 cannot be equal. Setting x2 = x1 + ...
false
false
false
false
false
0
mca_sharedfp_individual_getoffset(double timestamp, double *ts, int totalnodes) { int i = 0; int notfound = 1; while (notfound) { if (ts[i] == timestamp) break; i++; if (i == totalnodes) { notfound = 0; } } if (!notfound) { return...
false
false
false
false
false
0
php_get_wrapper_errors_list(php_stream_wrapper *wrapper TSRMLS_DC) { zend_llist *list = NULL; if (!FG(wrapper_errors)) { return NULL; } else { zend_hash_find(FG(wrapper_errors), (const char*)&wrapper, sizeof wrapper, (void**)&list); return list; } }
false
false
false
false
false
0
gdl_dock_item_drag_end (GdlDockItem *item, gboolean cancel) { /* Release pointer & keyboard. */ GtkWidget *widget = gtk_grab_get_current (); if (widget == NULL) { widget = GTK_WIDGET (item); } gtk_grab_remove (widget); g_signal_emit (item, gdl_dock_item_s...
false
false
false
false
false
0
vmLoadObject(robj *o) { /* If we are loading the object in background, stop it, we * need to load this object synchronously ASAP. */ if (o->storage == REDIS_VM_LOADING) vmCancelThreadedIOJob(o); return vmGenericLoadObject((vmpointer*)o,0); }
false
false
false
false
false
0
glade_project_verify_property (GladeProject *project, GladeProperty *property, const gchar *path_name, GString *string, gboolean forwidget) { GladeWidgetAdaptor *adaptor, *prop_adaptor; gint target_major, target_minor; gchar *catalog, *tooltip; if (glade...
false
false
false
true
false
1
hdup_makedate(int format, int day, int mon, int year) { /* return the date in d */ char *d = g_malloc(11); switch (format) { default: case DATE_DEF: /* DD-MM-YYYY */ g_snprintf(d,11, "%.2d-%.2d-%4d",day,mon,year); break; case DATE_ISO: /* YYYY-MM-DD */ g_snprintf(d,11, "%4d-%.2d-%.2d",year, mo...
false
false
false
false
false
0
add_handlers() { add_read_handler("table", read_handler, 0); set_handler("lookup", Handler::OP_READ | Handler::READ_PARAM, lookup_handler); add_write_handler("add", add_handler, 0); add_write_handler("remove", remove_handler, 0); }
false
false
false
false
false
0
glade_xml_get_property_targetable_versions (GladeXmlNode *node_in, const gchar *name) { GladeTargetableVersion *version; GList *targetable = NULL; xmlNodePtr node = (xmlNodePtr) node_in; gchar *value; gchar **split, **maj_min; gint ...
false
false
false
false
false
0
SV_SendClientMessages (void) { int i; client_t *c; int msglen; byte msgbuf[MAX_MSGLEN]; int r; msglen = 0; // read the next demo message if needed if (sv.state == ss_demo && sv.demofile) { if (sv_paused->integer) { msglen = 0; } else { // get the next message r = FS_Read(&msglen, 4, sv.de...
false
false
false
false
true
1
init() { // search button on the left m_searchButton = new SearchButton(this); addWidget(m_searchButton, LeftSide); // clear button on the right m_clearButton = new ClearButton(this); connect(m_clearButton, SIGNAL(clicked()), this, SLOT(clear())); connect(this, SIGNAL(textChange...
false
false
false
false
false
0
canwlock(RWLock *l) { if(_wlock) return (*_wlock)(l, 0, getcallerpc(&l)); else{ if(l->writer || l->readers) return 0; l->writer = (void*)1; return 1; } }
false
false
false
false
false
0
edac_create_debugfs_nodes(struct mem_ctl_info *mci) { struct dentry *d, *parent; char name[80]; int i; if (!edac_debugfs) return -ENODEV; d = debugfs_create_dir(mci->dev.kobj.name, edac_debugfs); if (!d) return -ENOMEM; parent = d; for (i = 0; i < mci->n_layers; i++) { sprintf(name, "fake_inject_%s", ...
true
true
false
false
false
1
setVersion(const QString &version) { QSqlDatabase DB = QSqlDatabase::database(connectionName()); if (!connectDatabase(DB, __FILE__, __LINE__)) return; executeSQL(prepareDeleteQuery(Constants::Table_CURRENTVERSION, QHash<int,QString>()), DB); QSqlQuery query(DB); query.prepare(prepareInsertQu...
false
false
false
false
false
0
_MD_CreateUnixProcess( const char *path, char *const *argv, char *const *envp, const PRProcessAttr *attr) { struct pr_CreateProcOp *op; PRProcess *proc; int rv; if (PR_CallOnce(&pr_wp.once, _MD_InitProcesses) == PR_FAILURE) { return NULL; } op = PR_NEW(struct pr_CreateProcOp);...
false
false
false
false
false
0
_snd_pcm_hw_param_set_max(snd_pcm_hw_params_t *params, snd_pcm_hw_param_t var, unsigned int val, int dir) { int changed; int openmax = 0; if (dir) { if (dir < 0) { openmax = 1; } else if (dir > 0) { openmax = 1; val++; } } if (hw_is_mask(var)) { if (val == 0 && openmax) { snd_mask_none(...
false
false
false
false
false
0
KerningPListOutputGlyph(FILE *plist, char *key,KernPair *kp) { fprintf( plist, "\t<key>%s</key>\n", key ); fprintf( plist, "\t<dict>\n" ); while ( kp!=NULL ) { if ( kp->off!=0 && SCWorthOutputting(kp->sc)) { fprintf( plist, "\t <key>%s</key>\n", kp->sc->name ); fprintf( plist, "\t <integer>...
false
false
false
false
false
0
do_get_e2attrs (const char *filename) { int r; CLEANUP_FREE char *buf = NULL; char *out; CLEANUP_FREE char *err = NULL; size_t i, j; buf = sysroot_path (filename); if (!buf) { reply_with_perror ("malloc"); return NULL; } r = command (&out, &err, str_lsattr, "-d", "--", buf, NULL); if (r ==...
false
false
false
false
false
0
defaultArg(Loc loc, Scope *sc) { RootObject *da = defaultAlias; Type *ta = isType(defaultAlias); if (ta) { if (ta->ty == Tinstance) { // If the default arg is a template, instantiate for each type da = ta->syntaxCopy(); } } RootObject *o = aliasParamet...
false
false
false
false
false
0
HandleMailCreateTextItem(WorldPacket& recv_data) { ObjectGuid mailboxGuid; uint32 mailId; recv_data >> mailboxGuid; recv_data >> mailId; if (!CheckMailBox(mailboxGuid)) return; Player* pl = _player; Mail* m = pl->GetMail(mailId); if (!m || (m->body.empty() && !m->mailTemplate...
false
false
false
false
false
0
lpfc_cmpl_els_logo_acc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, struct lpfc_iocbq *rspiocb) { struct lpfc_nodelist *ndlp = (struct lpfc_nodelist *) cmdiocb->context1; struct lpfc_vport *vport = cmdiocb->vport; IOCB_t *irsp; irsp = &rspiocb->iocb; lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_R...
false
false
false
false
false
0
get_com_ex(const char *prompt, ui_event *command) { ui_event ke; /* Paranoia XXX XXX XXX */ message_flush(); /* Display a prompt */ prt(prompt, 0, 0); /* Get a key */ ke = inkey_ex(); /* Clear the prompt */ prt("", 0, 0); /* Save the command */ *command = ke; /* Done */ if (ke.type == EVT_KBRD && ke....
false
false
false
false
false
0
exit_creds(struct task_struct *tsk) { struct cred *cred; kdebug("exit_creds(%u,%p,%p,{%d,%d})", tsk->pid, tsk->real_cred, tsk->cred, atomic_read(&tsk->cred->usage), read_cred_subscribers(tsk->cred)); cred = (struct cred *) tsk->real_cred; tsk->real_cred = NULL; validate_creds(cred); alter_cred_s...
false
true
false
false
false
1
focus_callback(Widget w, XtPointer client_data, XtPointer call_data) { if (global.busy) return; if (global.mode == NewsModeAllgroups) set_search_mode(SearchModeNewsgroups); else if (w == search_widgets.regexp_field) set_search_mode(SearchModeRegexp); else set_search_mode(SearchModeXpat)...
false
false
false
false
false
0
__dbreg_mark_restored(env) ENV *env; { DB_LOG *dblp; FNAME *fnp; LOG *lp; /* If we haven't initialized logging, we have nothing to do. */ if (!LOGGING_ON(env)) return (0); dblp = env->lg_handle; lp = dblp->reginfo.primary; MUTEX_LOCK(env, lp->mtx_filelist); SH_TAILQ_FOREACH(fnp, &lp->fq, q, __fname) if...
false
false
false
false
false
0
do_channel_part(struct chanset_t *chan) { if (!channel_inactive(chan) && chan->name[0]) { /* Using chan->name is important here, especially for !chans <cybah> */ dprintf(DP_SERVER, "PART %s\n", chan->name); /* As we don't know of this channel anymore when we receive the server's * ack for the above ...
false
false
false
false
false
0
set_sync_endpoint(struct snd_usb_substream *subs, struct audioformat *fmt, struct usb_device *dev, struct usb_host_interface *alts, struct usb_interface_descriptor *altsd) { int is_playback = subs->direction == SNDRV_PCM_STREAM_PLAYBACK; unsigned int ep, attr; bool implicit_fb; int e...
false
false
false
false
false
0
mono_fconv_ovf_u8 (double v) { guint64 res; /* * The soft-float implementation of some ARM devices have a buggy guin64 to double * conversion that it looses precision even when the integer if fully representable * as a double. * * This was found with 4294967295ull, converting to double and back looses one bit o...
false
false
false
false
false
0
canCreateExtraItems(Player* player, uint32 spellId, float& additionalChance, uint8& additionalMax) { // get the info for the specified spell SkillExtraItemMap::const_iterator ret = SkillExtraItemStore.find(spellId); if (ret == SkillExtraItemStore.end()) return false; SkillExtraItemEntry const* ...
false
false
false
false
false
0
ExistsAny(const char *Name) const { string key = Name; if (key.size() > 2 && key.end()[-2] == '/') { if (key.find_first_of("fdbi",key.size()-1) < key.size()) { key.resize(key.size() - 2); if (Exists(key.c_str())) return true; } else { _error...
false
false
false
false
false
0
lexmark_get_resolution_para(int model, const char *resolution) { const lexmark_cap_t * caps= lexmark_get_model_capabilities(model); const lexmark_res_t *res = *(caps->res_parameters); /* get the resolution specific parameters of printer */ if (resolution) { while (res->hres) { if ((res->vres <= ca...
false
false
false
false
false
0
SCSP_UpdateRegR(int reg) { switch(reg&0x3f) { case 4: case 5: { unsigned short v=SCSP->udata.data[0x5/2]; v&=0xff00; v|=MidiStack[MidiR]; if(MidiR!=MidiW) { ++MidiR; MidiR&=7; } SCSP->udata.data[0x5/2]=v; } break; case 8: case 9: { uns...
false
false
false
false
false
0
copy_file (char *dl_src, char *dl_dest, int permissions) { int tmp_src, tmp_dest; gboolean ok = FALSE; char dl_tmp[4096]; int return_tmp, return_tmp2; if ((tmp_src = g_open (dl_src, O_RDONLY | OFLAGS, 0600)) == -1) { g_fprintf (stderr, "Unable to open() file '%s' (%s) !", dl_src, strerror (errno)); ret...
true
true
false
false
true
1
__midgard_user_delete (MidgardUser *self) { g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (MIDGARD_IS_USER (self), FALSE); MidgardConnection *mgd = MGD_OBJECT_CNC (self); const gchar *guid = MGD_OBJECT_GUID (self); g_return_val_if_fail (mgd != NULL, FALSE); MIDGARD_ERRNO_SET (mgd, MGD_ERR_O...
false
false
false
false
false
0
VisitPointer(Heap* heap, Object** p) { if (!(*p)->IsHeapObject()) return; HeapObject* obj = HeapObject::cast(*p); Address old_addr = obj->address(); if (heap->new_space()->Contains(obj)) { ASSERT(heap->InFromSpace(*p)); *p = HeapObject::FromAddress(Memory::Address_at(old_addr)); } }
false
false
false
false
false
0
FontEncRecode(unsigned code, FontMapPtr mapping) { FontEncPtr encoding = mapping->encoding; if(encoding && mapping->recode) { if(encoding->row_size == 0) { /* linear encoding */ if(code < encoding->first || code>=encoding->size) return 0; } else { ...
false
false
false
false
false
0
ifp_treewalk_open(struct ifp_device * dev, const char * directory, void ** handle) { struct treewalk_state * tws = NULL; int len; int i = 0; if (handle == NULL) { i = -1; ifp_err("handle shouldn't be null"); goto err; } tws = (struct treewalk_state *)malloc(sizeof(struct treewalk_state)); if (tws == NULL)...
false
false
false
false
false
0
thunk_adjust (tree ptr, bool this_adjusting, HOST_WIDE_INT fixed_offset, tree virtual_offset) { if (this_adjusting) /* Adjust the pointer by the constant. */ ptr = fold (build (PLUS_EXPR, TREE_TYPE (ptr), ptr, ssize_int (fixed_offset))); /* If there's a virtual offset, look up that value i...
false
false
false
false
false
0
write_NamedColorVal2( icmNamedColorVal *p, char *bp, icColorSpaceSignature pcs, /* Header Profile Connection Space */ unsigned int ndc /* Number of device coords */ ) { icc *icp = p->icp; unsigned int i; int rv; if ((rv = check_null_string(p->root,32)) == 1) { sprintf(icp->err,"icmNamedColorVal2_write: R...
false
true
false
false
false
1
mca_btl_vader_send (struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *endpoint, struct mca_btl_base_descriptor_t *descriptor, mca_btl_base_tag_t tag) { mca_btl_vader_frag_t *frag = (mca_btl_vader_frag_t *) descriptor; if (...
false
false
false
false
false
0
ips_detect_cpu(struct ips_driver *ips) { u64 turbo_power, misc_en; struct ips_mcp_limits *limits = NULL; u16 tdp; if (!(boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 37)) { dev_info(&ips->dev->dev, "Non-IPS CPU detected.\n"); goto out; } rdmsrl(IA32_MISC_ENABLE, misc_en); /* * If the turbo enable ...
false
false
false
false
false
0
gsb_payment_method_changed_callback ( GtkWidget *combo_box, gpointer null ) { gint payment_number; GtkWidget *cheque_entry; cheque_entry = gsb_form_widget_get_widget (TRANSACTION_FORM_CHEQUE); if ( !cheque_entry ) return FALSE; payment_number = gsb_payment_method_ge...
false
false
false
false
false
0
ssl_FinishHandshake(sslSocket *ss) { PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) ); PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); SSL_TRC(3, ("%d: SSL[%d]: handshake is completed", SSL_GETPID(), ss->fd)); ss->firstHsDone = PR_TRUE; ss->enoughFirstHsDone = PR_TRUE; ...
false
false
false
false
false
0
chk_pull_gate(struct gate_t *gp) { register int32 i; struct expr_t *xp; struct net_t *np; /* first cannot have delay */ if (gp->g_du.pdels != NULL) { __sgferr(816, "%s source cannot have delay", gp->gmsym->synam); __free_dellst(gp->g_du.pdels); gp->g_du.pdels = NULL; } /* must mark as no del since l...
false
false
false
false
false
0
simunpack(unsigned char *cpack,g2int *idrstmpl,g2int ndpts,g2float *fld) ////$$$ SUBPROGRAM DOCUMENTATION BLOCK // . . . . // SUBPROGRAM: simunpack // PRGMMR: Gilbert ORG: W/NP11 DATE: 2002-10-29 // // ABSTRACT: This subroutine unpacks a dat...
false
false
false
false
false
0
first_nonzero (int *i, char *filename) { size_t len; FILE *fp; unsigned int value = 0; void *p; len = (size_t) Access_filesize(filename); if ((fp = FOPEN_READ_BINARY(filename)) == NULL) { fprintf(stderr,"Error: can't open file %s with fopen\n",filename); exit(9); } else { *i = 0; p = (vo...
false
false
false
false
false
0
DecodeModImmInstruction(llvm::MCInst &Inst, uint32_t insn, uint64_t Addr, const void *Decoder) { unsigned Rd = fieldFromInstruction(insn, 0, 5); unsigned cmode = fieldFromInstruction(insn, 12, 4); unsigned imm = fieldFromInstr...
false
false
false
false
false
0
setShowPower(int value) { showPower->setCurrentIndex(value); //if (!current) return; // we only show the power shading on the // allPlot / stack plots, not on the fullPlot allPlot->setShowPower(value); if (!showStack->isChecked()) allPlot->replot(); // redraw foreach (AllPlot ...
false
false
false
false
false
0
tracker_sparql_scanner_is_pn_local_char (TrackerSparqlScanner* self, gchar c) { gboolean result = FALSE; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; gchar _tmp3_; gboolean _tmp4_ = FALSE; gboolean _tmp6_; gboolean _tmp8_; gboolean _tmp10_; #line 458 "/home/martyn/Source/tracker/s...
false
false
false
false
false
0
gt_sain_timer_logger_new(bool verbose) { GtSainTimerandLogger *tl = gt_malloc(sizeof (*tl)); tl->timer = NULL; tl->logger = gt_logger_new(verbose,GT_LOGGER_DEFLT_PREFIX,stdout); if (gt_showtime_enabled()) { if (verbose) { tl->timer = gt_timer_new_with_progress_description( ...
false
false
false
false
false
0
getRelocationTypeName( DataRefImpl Rel, SmallVectorImpl<char> &Result) const { StringRef res; uint64_t RType = getRelocationType(Rel); unsigned Arch = this->getArch(); switch (Arch) { case Triple::x86: { static const char *const Table[] = { "GENERIC_RELOC_VANILLA", "GENERIC_RELO...
false
false
false
false
false
0
AccessBookkeeper(bookkeeper_t **bookkeeper, char *path) { bookkeeper_list_t **bookkeeper_list_entry; int sem_key, shm_key, shm_id, sem_id; *bookkeeper = NULL; shm_key = _ftok(path, 1); if ( shm_key == - 1 ) return ERR_PATHACCESS; // check if the shared memory is already allocated shm_id = shmget(shm_key, si...
false
false
false
false
false
0
PrintObject(ho) HTMLObject ho; { char *text; size_t len; MLElementType mt; if (ho->type == HTML_ELEMENT) { MLGetText(ho->o.p, &text, &len); fwrite (text, 1, len, stdout); printf ("\n"); } else if (ho->type == HTML_TAG || ho->type == HTML_BEGINTAG || ho->type == HTML_ENDTAG) { mt = M...
false
false
false
false
false
0