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
asoc_simple_card_parse_daifmt(struct device_node *node, struct simple_card_data *priv, struct device_node *codec, char *prefix, int idx) { struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, idx); struct device *dev = simple_priv_to_dev(priv); struct device_node *bitclkmaster = NULL; str...
false
false
false
false
false
0
H5P_set_vlen_mem_manager(H5P_genplist_t *plist, H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func, void *free_info) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) HDassert(plist); /* Update property list */ if(H5P_set(plist, H5D_XFER_VLEN_ALL...
false
false
false
false
false
0
srvDefHeader(srvrec_t *srvp, const int *header) { size_t i; for ( i = 0; i < SRV_HEADER_LEN; i++ ) srvp->header[i] = header[i]; srvp->datasize = header[4]*header[5]; if ( SRV_Debug ) Message("datasize = %lu", srvp->datasize); return (0); }
false
false
false
false
false
0
photos_view_model_object_added (PhotosViewModel *self, GObject *object) { PhotosBaseItem *item = PHOTOS_BASE_ITEM (object); PhotosViewModelPrivate *priv = self->priv; GObject *collection; collection = photos_base_manager_get_active_object (priv->col_mngr); if (collection == NULL) { if ((priv->mode...
false
false
false
false
false
0
CL_UnIgnoreText_f( void ) { if(!cl_textIgnores) { Com_Printf("Text ignore list is empty\n"); return; } if (Cmd_Argc() != 2) { Com_Printf("Usage: %s <text/all>\n", Cmd_Argv(0)); Com_Printf("Current text ignores:\n"); Com_Printf("---------------------\n"); CL_PrintIgnores(cl_textIgnores, false); if(!...
false
false
false
false
false
0
eckey_sign_wrap( void *ctx, md_type_t md_alg, const unsigned char *hash, size_t hash_len, unsigned char *sig, size_t *sig_len, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) { int ret; ecdsa_context ecdsa; ecdsa_init( &ecdsa ); if(...
false
false
false
false
false
0
filepos_save(void) { int i; FLAG new; SAVEDIR *x, *top; if (dircnt == diralloc && diralloc < SAVEDIR_ALLOC_MAX) { diralloc += SAVEDIR_ALLOC_UNIT; dirlist = erealloc(dirlist,diralloc * sizeof(SAVEDIR *)); x = emalloc(SAVEDIR_ALLOC_UNIT * sizeof(SAVEDIR)); for (i = 0; i < SAVEDIR_ALLOC_UNIT; i++) { US_INI...
false
false
false
false
false
0
mares_puck_device_close (dc_device_t *abstract) { mares_puck_device_t *device = (mares_puck_device_t*) abstract; // Close the device. if (serial_close (device->base.port) == -1) { free (device); return DC_STATUS_IO; } // Free memory. free (device); return DC_STATUS_SUCCESS; }
false
false
false
false
false
0
_folks_tp_zeitgeist_controller_get_zeitgeist_event_templates (FolksTpZeitgeistController* self) { GPtrArray* result = NULL; gchar* origin = NULL; FolksPersonaStore* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; ZeitgeistEvent* ev1 = NULL; ZeitgeistEvent* _tmp4_ = N...
false
false
false
false
false
0
hwi_build_be_sgl_by_offset(struct beiscsi_hba *phba, struct mem_array *pmem, struct be_dma_mem *sgl) { if (sgl->va) be_sgl_destroy_contiguous(sgl); be_sgl_create_contiguous((unsigned char *)pmem->virtual_address, pmem->bus_address.u.a64.address, pmem->size, sgl); }
false
false
false
false
false
0
toCBuffer(OutBuffer *buf, HdrGenState *hgs) { if (decl) { if (decl->dim == 0) buf->writestring("{}"); else if (hgs->hdrgen && decl->dim == 1 && (*decl)[0]->isUnitTestDeclaration()) { // hack for bugzilla 8081 buf->writestring("{}"); } else if (de...
false
false
false
false
false
0
gdome_xml_xpns_unref (GdomeNode *self, GdomeException *exc) { Gdome_xml_XPathNamespace *priv = (Gdome_xml_XPathNamespace *)self; g_return_if_fail (priv != NULL); g_return_if_fail (GDOME_XML_IS_NS (priv)); g_return_if_fail (exc != NULL); if (priv->refcnt > 0) priv->refcnt--; if (priv->refcnt == 0) { g_fre...
false
false
false
false
false
0
event_queue_remove(struct event_base *base, struct event *ev, int queue) { EVENT_BASE_ASSERT_LOCKED(base); if (!(ev->ev_flags & queue)) { event_errx(1, "%s: %p(fd %d) not on queue %x", __func__, ev, ev->ev_fd, queue); return; } if (~ev->ev_flags & EVLIST_INTERNAL) base->event_count--; ev->ev_flags &...
false
false
false
false
false
0
photos_embed_window_mode_changed (PhotosModeController *mode_cntrlr, PhotosWindowMode mode, PhotosWindowMode old_mode, gpointer user_data) { PhotosEmbed *self = PHOTOS_EMBED (user_data); if (mode == PHOTOS_WINDOW_...
false
false
false
false
false
0
channel_clear(struct sh_dmae_chan *sh_dc) { struct sh_dmae_device *shdev = to_sh_dev(sh_dc); const struct sh_dmae_channel *chan_pdata = shdev->pdata->channel + sh_dc->shdma_chan.id; u32 val = shdev->pdata->chclr_bitwise ? 1 << chan_pdata->chclr_bit : 0; __raw_writel(val, shdev->chan_reg + chan_pdata->chclr_offse...
false
false
false
false
false
0
elm_toolbar_item_next_get(const Elm_Object_Item *it) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); return (Elm_Object_Item *) ELM_TOOLBAR_ITEM_FROM_INLIST( EINA_INLIST_GET(((Elm_Toolbar_Item *)it))->next); }
false
false
false
false
false
0
xmlassign(const string &key, const string &value) { if(key.find('/')==string::npos) { // Must refer to me. if(id==key) content = value; else CERR("Walking the XML tree failed to create a final node."); return; } string k; k=key.substr(key.find('/')+1); string k2=k.substr(0,k.find('/')); for(std::ve...
false
false
false
false
false
0
ipmi_sdr_parse_device_type (ipmi_sdr_parse_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *device_type, uint8_t *device_type_modifier) { fiid_obj_t obj_sdr_record = NULL; uint32_t...
false
false
false
false
false
0
setAddresses( vector<mail::emailAddress> &addressArray) { clear(true); AddressField *p=new AddressField(this, getWidth(), 0); if (!p) outofmemory(); try { fields.push_back(p); } catch (...) { delete p; LIBMAIL_THROW(LIBMAIL_THROW_EMPTY); } resized(); validate(0, addressArray); }
false
false
false
false
false
0
ib_open_qp(struct ib_xrcd *xrcd, struct ib_qp_open_attr *qp_open_attr) { struct ib_qp *qp, *real_qp; if (qp_open_attr->qp_type != IB_QPT_XRC_TGT) return ERR_PTR(-EINVAL); qp = ERR_PTR(-EINVAL); mutex_lock(&xrcd->tgt_qp_mutex); list_for_each_entry(real_qp, &xrcd->tgt_qp_list, xrcd_list) { if (real_qp->qp_...
false
false
false
false
false
0
do_compare_capacity2(gpointer key, gpointer value, gpointer user_data) { int node1_capacity = 0; int node2_capacity = 0; struct compare_data *data = user_data; if (g_hash_table_lookup_extended(data->node1->details->utilization, key, NULL, NULL)) { return; } node1_capacity = 0; node...
false
false
false
false
false
0
recogCharsetAvailable(l_int32 type) { l_int32 ret; PROCNAME("recogCharsetAvailable"); switch (type) { case L_ARABIC_NUMERALS: ret = TRUE; break; case L_LC_ROMAN_NUMERALS: case L_UC_ROMAN_NUMERALS: case L_LC_ALPHA: case L_UC_ALPHA: L_INFO("charset type %d not a...
false
false
false
false
false
0
scroll_to_iter (TpawIrcNetworkChooserDialog *self, GtkTreeIter *filter_iter) { GtkTreePath *path; path = gtk_tree_model_get_path (GTK_TREE_MODEL (self->priv->filter), filter_iter); if (path != NULL) { gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (self->priv->treeview), path, NULL, F...
false
false
false
false
false
0
globus_l_error_invalid_credentials_destroy (void *datavp) { globus_error_invalid_credentials_instance_t *data; if (datavp==NULL) return; data = ((globus_error_invalid_credentials_instance_t *) datavp); globus_object_free (data->invalid_credentials_start_time); data->invalid_credentials_start_time = NULL; gl...
false
false
false
false
false
0
qlafx00_configure_devices(scsi_qla_host_t *vha) { int rval; unsigned long flags; rval = QLA_SUCCESS; flags = vha->dpc_flags; ql_dbg(ql_dbg_disc, vha, 0x2090, "Configure devices -- dpc flags =0x%lx\n", flags); rval = qlafx00_configure_all_targets(vha); if (rval == QLA_SUCCESS) { if (test_bit(LOOP_RESY...
false
false
false
false
false
0
_cdb_make_fullwrite(int fd, const unsigned char *buf, unsigned len) { while(len) { int l = write(fd, buf, len); if (l > 0) { len -= l; buf += l; } else if (l < 0 && errno != EINTR) return -1; } return 0; }
false
false
false
false
false
0
add_s (MatchState *ms, luaL_Buffer *b, const char *s, const char *e) { lua_State *L = ms->L; if (lua_isstring(L, 3)) { const char *news = lua_tostring(L, 3); size_t l = lua_strlen(L, 3); size_t i; for (i=0; i<l; i++) { if (news[i] != ESC) luaL_putchar(b, news[i]); ...
false
false
false
false
false
0
table_delete (table_t * ptr) { table_t *t; if ((t = ptr->prev) != NULL) t->next = ptr->next; else table = ptr->next; if ((t = ptr->next) != NULL) t->prev = ptr->prev; free (ptr); }
false
false
false
false
false
0
_dxfCubesIIInterpolator_LocalizeInterpolator(CubesIIInterpolator ci) { ci->fieldInterpolator.localized = 1; if (ci->fieldInterpolator.initialized) { if (ci->nbrs) ci->nbrs = (int *)DXGetArrayDataLocal(ci->nbrsArray); } if (DXGetError()) return NULL; else return (Interpola...
false
false
false
false
false
0
cb_font_dialog_ok(GtkWidget *w, AltFontSelect *afs) { gchar *fontname; fontname = gtk_font_selection_dialog_get_font_name(afs->fontseldlg); if (fontname) gtk_entry_set_text(GTK_ENTRY(afs->entry), fontname); gtk_widget_destroy(GTK_WIDGET(afs->fontseldlg)); theme_modified = TRUE; get_font_entries(); gkrellm_bu...
false
false
false
false
false
0
ecore_poller_poller_interval_set(Ecore_Poller *poller, int interval) { int ibit; EINA_MAIN_LOOP_CHECK_RETURN_VAL(EINA_FALSE); if (!ECORE_MAGIC_CHECK(poller, ECORE_MAGIC_POLLER)) { ECORE_MAGIC_FAIL(poller, ECORE_MAGIC_POLLER, "eco...
false
false
false
false
false
0
parse_opt (int key, char *arg, struct argp_state *state) { switch (key) { case 'o': output_name = arg; break; case 'f': if (!strcmp("dump", arg)) dumper = &dumper_dump; else if (!strcmp("csv", arg)) dumper = &dumper_csv; else a...
false
false
false
false
true
1
play_cb (GtkWidget* widget, gpointer data) { GtkTreeIter iter; if (gtk_tree_selection_get_selected (sel, NULL, &iter)) { GtkTreePath *path = gtk_tree_model_get_path (pl_model, &iter); playlist_play (gtk_tree_path_get_indices (path)[0]); gtk_tree_path_free (path); } }
false
false
false
false
false
0
FindNeededItems( void *theEnv) { struct BinaryItem *biPtr; for (biPtr = BsaveData(theEnv)->ListOfBinaryItems; biPtr != NULL; biPtr = biPtr->next) { if (biPtr->findFunction != NULL) (*biPtr->findFunction)(theEnv); } }
false
false
false
false
false
0
scm_i_make_ra (int ndim, int enclosed) { scm_t_bits tag = enclosed? scm_i_tc16_enclosed_array : scm_i_tc16_array; SCM ra; SCM_NEWSMOB(ra, ((scm_t_bits) ndim << 17) + tag, scm_gc_malloc ((sizeof (scm_i_t_array) + ndim * sizeof (scm_t_array_dim)), "array")); SCM_I_ARRAY_V (ra) = SCM...
false
false
false
false
false
0
jbd2_journal_load(journal_t *journal) { int err; journal_superblock_t *sb; err = load_superblock(journal); if (err) return err; sb = journal->j_superblock; /* If this is a V2 superblock, then we have to check the * features flags on it. */ if (journal->j_format_version >= 2) { if ((sb->s_feature_ro_comp...
false
false
false
false
false
0
kv_program_nbps_index_settings(struct amdgpu_device *adev, struct amdgpu_ps *new_rps) { struct kv_ps *new_ps = kv_get_ps(new_rps); struct kv_power_info *pi = kv_get_pi(adev); u32 nbdpmconfig1; if (adev->asic_type == CHIP_KABINI || adev->asic_type == CHIP_MULLINS) return; if (pi->sys_info.nb_dpm_enable)...
false
false
false
false
false
0
getInt64() /*const*/ { if (fCount == fDecimalAt) { uint64_t value; fDigits[fCount] = 0; // NULL terminate // This conversion is bad on 64-bit platforms when we want to // be able to return a 64-bit number [grhoten] *fDecimalDigits = fIsPositive ? '+' : '-'; // e...
false
false
false
false
false
0
nesouhlasZnakFce( char *str, int size, int badchar[zadnyZeZnaku]) { int i; //Vsechny vyskyty inicializovat na -1 for (i = 0; i < zadnyZeZnaku; i++) badchar[i] = -1; //Vyplni aktualni hodnotu posledniho vyskytu znaku for (i = 0; i < size; i++) badchar[(int) str[i]] = i; }
true
true
false
false
false
1
exp_interpret_rcfiles(interp,my_rc,sys_rc) Tcl_Interp *interp; int my_rc; int sys_rc; { int rc; if (sys_rc) { char file[200]; int fd; sprintf(file,"%s/expect.rc",SCRIPTDIR); if (-1 != (fd = open(file,0))) { if (TCL_ERROR == (rc = Tcl_EvalFile(interp,file))) { expErrorLog("error executing...
false
false
false
false
false
0
bc_set_occur(BooleanClause *self, enum BC_TYPE occur) { self->occur = occur; switch (occur) { case BC_SHOULD: self->is_prohibited = false; self->is_required = false; break; case BC_MUST: self->is_prohibited = false; self->is_required = ...
false
false
false
false
false
0
filter_update_file(void) { const char *filter; int i, j, cnt, type; FILE_ENTRY *pfe; if (ppanel_file->filt_cnt == 0) return; filter = ppanel_file->pd->filter->line; type = ftype(filter); /* 1 pattern, 0 substring */ if (ppanel_file->filtype != type) { ppanel_file->filtype = type; win_filter(); } if (ty...
false
false
false
false
false
0
parseCData(XMLNode_as* node, xml_iterator& it, const xml_iterator end) { std::string content; if (!parseNodeWithTerminator(it, end, "]]>", content)) { _status = XML_UNTERMINATED_CDATA; return; } XMLNode_as* childNode = new XMLNode_as(_global); childNode->nodeValueSet(conten...
false
false
false
false
false
0
ulCharPos2FileOffsetX(ULONG ulCharPos, list_id_enum *peListID) { static list_id_enum eListIDs[8] = { text_list, footnote_list, hdrftr_list, macro_list, annotation_list, endnote_list, textbox_list, hdrtextbox_list, }; list_mem_type *apAnchors[8]; list_mem_type *pCurr; list_id_enum eListGuess; ULONG ulBestG...
false
false
false
false
false
0
set_obj_ptr(node *obj,char *key,void *n) { node *kv = node_GetItemByKey(obj,key); if(kv==NULL) add_obj_ptr(obj,key,n); else { node_SetUser(kv,n); } }
false
false
false
false
false
0
on_temperature_changed () { if (color_by == &P_PHASE) throttle_update_temperature.queue (sigc::mem_fun (*this, &TableTable::update_colors), true); }
false
false
false
false
false
0
readPmhxCategories(const QString &formUuidOrAbsPath) { // qWarning() << "readPmhxCategories"; Q_UNUSED(formUuidOrAbsPath); // TODO: code here why don't we use the \e formUuidOrAbsPath param? // get all form readers (IFormIO) QList<Form::IFormIO *> list = pluginManager()->getOb...
false
false
false
false
false
0
solve(const Theorem& thm) { DebugAssert(thm.isRewrite() && thm.getLHS().isTerm(), ""); const Expr& lhs = thm.getLHS(); const Expr& rhs = thm.getRHS(); // Check for already solved equalities. // Have to be careful about the types: integer variable cannot be // assigned a real term. Also, watch for e[0] be...
false
false
false
false
false
0
dbop_put(DBOP *dbop, const char *name, const char *data) { DB *db = dbop->db; DBT key, dat; int status; int len; if (!(len = strlen(name))) die("primary key size == 0."); if (len > MAXKEYLEN) die("primary key too long."); key.data = (char *)name; key.size = strlen(name)+1; dat.data = (char *)data; dat.si...
false
false
false
false
false
0
check_hex (IBusEngineSimple *simple, gint n_compose) { IBusEngineSimplePrivate *priv = simple->priv; gint i; GString *str; gulong n; gchar *nptr = NULL; gchar buf[7]; priv->tentative_match = 0; priv->tentative_match_len = 0; str = g_string_new (NULL); ...
false
false
false
false
false
0
acl_check_for_target_macro( aci_t *aci_item, char *value) { char *str = NULL; str = strstr(value, ACL_TARGET_MACRO_DN_KEY /* ($dn) */); if (str != NULL) { char *p0 = NULL, *p1 = NULL; /* Syntax check: * error return if ($dn) is in '[' and ']', e.g., "[($dn)]" */ p0 = strchr(value, '['); if (p0 && ...
false
false
false
false
false
0
fd_pool_send(fd_pool_t *pool,void *buffer,size_t len,int flags) { fd_pool_t *p; ssize_t res; int i,err; for(p=pool,err=0;p;p=p->next) for(i=0;i<FD_POOL_MAX;i++) { if (p->fd[i] == -1) continue; res = send(p->fd[i],buffer,len,flags); if (res...
false
false
false
false
false
0
sprint_realloc_counter64(u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const netsnmp_variable_list * var, const struct enum_list *enums, const char *hint, const char *units) { char ...
true
true
false
false
false
1
xatoi(const char *s) { long out; char *endp; errno = 0; out = strtol(s, &endp, 10); if (endp == s || *endp != '\0' || errno == ERANGE || out > INT_MAX || out < INT_MIN) die("%s: error converting %s to integer\n", prog_name, s); return out; }
false
false
false
false
false
0
maskfeat_FeatSeqMask(AjPSeq seq, const AjPStr type, const AjPStr maskchar, AjBool cvttolower) { AjIList iter = NULL ; AjPFeature gf = NULL ; AjPStr str = NULL; const AjPFeattable feat; char whiteSpace[] = " \t\n\r,;|"; /* skip whitespace and , ; | */ AjPStrTok tokens; AjPStr key =...
false
false
false
false
false
0
ves_icall_Mono_Interop_ComInteropProxy_AddProxy (gpointer pUnk, MonoComInteropProxy* proxy) { #ifndef DISABLE_COM guint32 gchandle = 0; if (!rcw_hash) { mono_cominterop_lock (); rcw_hash = g_hash_table_new (mono_aligned_addr_hash, NULL); mono_cominterop_unlock (); } gchandle = mono_gchandle_new_weakref ((Mon...
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)); UserViewer *_t = static_cast<UserViewer *>(_o); switch (_id) { case 0: _t->setCurrentUser((*reinterpret_cast< const QString(*)>(...
false
false
false
false
false
0
state_protocol0(char ch) { if (ch == ' ' || ch == '\t') { return; } else if (std::isalpha(ch)) { token.reserve(32); token = ch; state = &HeaderParser::state_protocol; return; } else { ...
false
false
false
false
false
0
_print_info(void) { if (!buf) { printf("No data available. Probably slurmctld is not working\n"); return -1; } printf("*******************************************************\n"); printf("sdiag output at %s", ctime(&buf->req_time)); printf("Data since %s", ctime(&buf->req_time_start)); printf("*********...
false
false
false
false
false
0
filename_create(int dfd, struct filename *name, struct path *path, unsigned int lookup_flags) { struct dentry *dentry = ERR_PTR(-EEXIST); struct qstr last; int type; int err2; int error; bool is_dir = (lookup_flags & LOOKUP_DIRECTORY); /* * Note that only LOOKUP_REVAL and LOOKUP_DIRECTORY matter here. Any...
false
false
false
false
false
0
_get_disk(struct isw *isw, struct dev_info *di) { if (di->serial) { int i = isw->num_disks; struct isw_disk *disk = isw->disk; const char *isw_serial = dev_info_serial_to_isw(di->serial); while (i--) { if (!strncmp(isw_serial, (const char *) disk[i].serial, MAX_RAID_SERIAL_LEN)) return disk + ...
false
false
false
false
false
0
parse_hex (GeglColor *color, const gchar *color_string) { gint i; gsize string_length = strlen (color_string); if (string_length == 7 || /* #rrggbb */ string_length == 9) /* #rrggbbaa */ { gint num_iterations = (string_length - 1) / 2; for (i = 0;...
false
false
false
false
false
0
biasSelectionBy( const SigmaProcess* sigmaProcessPtr, const PhaseSpace* phaseSpacePtr, bool inEvent) { // Process code, necessary when some to be treated differently. //int code = sigmaProcessPtr->code(); // Final multiplicity, i.e. whether 2 -> 1 or 2 -> 2. //int nFinal = sigmaProcessPtr->nFinal...
false
false
false
false
false
0
Xacc_blend_srcalphasat( GenefxState *gfxs ) { int w = gfxs->length; GenefxAccumulator *X = gfxs->Xacc; GenefxAccumulator *D = gfxs->Dacc; if (gfxs->Sacc) { GenefxAccumulator *S = gfxs->Sacc; while (w--) { if (!(X->RGB.a & 0xF000)) { ...
false
false
false
false
false
0
alloc_state_update(struct alloc_state *a, INT64_T change) { if(change != 0) { a->inuse += change; if(a->inuse < 0) a->inuse = 0; a->avail = a->size - a->inuse; a->dirty = 1; } }
true
true
true
false
true
1
RewriteControlFile(void) { int fd; char buffer[PG_CONTROL_SIZE]; /* need not be aligned */ /* * Adjust fields as needed to force an empty XLOG starting at * newXlogId/newXlogSeg. */ ControlFile.checkPointCopy.redo.xlogid = newXlogId; ControlFile.checkPointCopy.redo.xrecoff = newXlogSeg * XLogSegSize +...
true
true
false
false
true
1
varpool_node_for_asm (tree asmname) { if (symtab_node node = symtab_node_for_asm (asmname)) if (varpool_node *vnode = dyn_cast <varpool_node> (node)) return vnode; return NULL; }
false
false
false
false
false
0
zalloc (long size) { void *memory = malloc (size); if (memory == NULL) ERROR ("zalloc failed"); memset (memory, 0, size); return memory; }
false
false
false
false
false
0
intel_put_shared_regs_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) { struct hw_perf_event_extra *reg; reg = &event->hw.extra_reg; if (reg->idx != EXTRA_REG_NONE) __intel_shared_reg_put_constraints(cpuc, reg); reg = &event->hw.branch_reg; if (reg->idx != EXTRA_REG_NONE) __intel...
false
false
false
false
false
0
getBestAppending(int32_t missingFields) { UnicodeString resultPattern, tempPattern, formattedPattern; UErrorCode err=U_ZERO_ERROR; int32_t lastMissingFieldMask=0; if (missingFields!=0) { resultPattern=UnicodeString(); const PtnSkeleton* specifiedSkeleton=NULL; tempPattern = *get...
false
false
false
false
false
0
of_changeset_revert(struct of_changeset *ocs) { struct of_changeset_entry *ce; int ret; pr_debug("of_changeset: reverting...\n"); list_for_each_entry_reverse(ce, &ocs->entries, node) { ret = __of_changeset_entry_revert(ce); if (ret) { pr_err("%s: Error reverting changeset (%d)\n", __func__, ret); list_fo...
false
false
false
false
false
0
type(struct nv *nv) { uint8_t stripeWidth = nv->array.stripeWidth; /* Mapping of nv types to generic types */ static struct types types[] = { { NV_LEVEL_JBOD, t_linear }, { NV_LEVEL_0, t_raid0 }, { NV_LEVEL_1, t_raid1 }, /* Treat as 0 here, add mirror later */ { NV_LEVEL_1_0, t_raid0 }, { NV_LEVEL_3, t_r...
false
false
false
false
false
0
GetTrackerIdByUser(char *nickname) { char szWhoisCmd[100]; if(GettingUserTID) { if(Getting_user_tracker_error) { Getting_user_tracker_error = 0; GettingUserTID = 0; return (char *)-1; } if(*User_req_tracker_id) { GettingUserTID = 0; return User_req_tracker_id; } } else { strncpy...
false
false
false
false
false
0
storeRegisterAbort(StoreEntry * e, STABH * cb, void *data) { MemObject *mem = e->mem_obj; assert(mem); assert(mem->abort.callback == NULL); mem->abort.callback = cb; mem->abort.data = data; }
false
false
false
true
false
1
node_add_nix(ofps *s, node *pp, int ix) { if (pp->_nvn == 0) { pp->_nvn = 4; /* Initial allocation */ if ((pp->vn = (int *)malloc(sizeof(int) * pp->_nvn)) == NULL) error("ofps: malloc failed on node index list"); if ((pp->mm = (mid **)malloc(sizeof(mid *) * pp->_nvn)) == NULL) error("ofps: malloc failed ...
false
false
false
false
false
0
readfromstream ( tnstream* stream ) { if ( stream ) { stream->readInt(); used = stream->readInt(); allocated = stream->readInt(); for ( int i = 0; i< 10; i++ ) dummy[i] = stream->readInt(); if ( buf ) { delete[] buf; buf = NULL; ...
false
false
false
false
false
0
z11_enumerate_glyph(gs_font *font, int *pindex, gs_glyph_space_t glyph_space, gs_glyph *pglyph) { gs_font_cid2 *pfont = (gs_font_cid2 *)font; int code0 = z11_CIDMap_proc(pfont, GS_MIN_CID_GLYPH); int code; if(*pindex > pfont->cidata.common.CIDCount) return_error(e_range...
false
false
false
false
false
0
addnode (const char* label, float* zone, float init, float min, float max) { SMessageDriven top = fNodes.size() ? fNodes.top() : fRoot; if (top) { string prefix = top->getOSCAddress(); top->add( FaustNode::create (label, zone, init, min, max, prefix.c_str()) ); } }
false
false
false
false
false
0
reset_prf2(void) /* remove gaps from older alignments (code = gap_pos1) */ { /* EXCEPT for gaps that were INPUT with the seqs.*/ register sint sl; /* which have code = gap_pos2 */ sint i,j; if (struct_penalties2 != NONE) { sl=0; for (j=0;j<seqlen_array[profile1_nseqs+1];++j) { if (ga...
false
false
false
false
false
0
err_fileio() /*! Return Value: pointer to error I/O file Parameters: none /*! Description: `err_fileio` returns a pointer to the file used for error I/O. In typical usage, this would be supplied as the first argument to `fprintf`. The second argument would be supplied by `err_read` (or its equivalent), and ...
false
false
false
false
false
0
pipe_block_generic_setup(void **testdata, int num_threads) { int retval; pthread_t *test_threads; signal(SIGPIPE, sigpipe_handler); retval = init_pipe_struct_array(num_threads/2); if (retval < 0) { test_threads = NULL; goto out; } test_threads = init_pipe_block_threads(num_thread...
false
false
false
false
false
0
borg_activate_dragon(int drag_sval) { /* Check the equipment */ borg_item *item = &borg_items[INVEN_BODY]; /* Skip incorrect mails */ if (item->tval != TV_DRAG_ARMOR) return (FALSE); if (item->sval != drag_sval) return (FALSE); /* Check charge */ if (item->timeout) return ...
false
false
false
false
false
0
fmtNum(char *buf, int bufsize, int num, int divisor, char *suffix) { int whole, point; whole = num / divisor; point = (num % divisor) / (divisor / 10); if (point == 0) { mprSprintf(buf, bufsize, "%6d%s", whole, suffix); } else { mprSprintf(buf, bufsize, "%4d.%d%s", whole, point...
false
false
false
false
false
0
HPCC_InitHPL(HPCC_Params *p) { HPL_pdinfo( &p->test, &p->ns, p->nval, &p->nbs, p->nbval, &p->porder, &p->npqs, p->pval, p->qval, &p->npfs, p->pfaval, &p->nbms, p->nbmval, &p->ndvs, p->ndvval, &p->nrfs, p->rfaval, &p->ntps, p->topval, &p->ndhs, p->ndhval, &p->fswap, &p->tswap, ...
false
false
false
false
false
0
__pmem_label_update(struct nd_region *nd_region, struct nd_mapping *nd_mapping, struct nd_namespace_pmem *nspm, int pos) { u64 cookie = nd_region_interleave_set_cookie(nd_region), rawsize; struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); struct nd_namespace_label *victim_label; struct nd_namespace_label *nd_lab...
false
false
false
false
false
0
sock_recv_string (int fd, char *dest, size_t maxlen) { char *ptr = dest; int recvBytes = 0; if (!dest) return -1; if (maxlen <= 0) return 0; while (1) { int err = read (fd, ptr, 1); if (err == -1) { if (errno == EAGAIN) { if (recvBytes) { // We've begun to read a string, but no bytes are ...
false
false
false
false
false
0
sigaddset(sigset_t *set, int signo) { if ((signo<1)||(signo>SIGRTMAX)) { (*__errno_location())=EINVAL; return -1; } else { unsigned long __mask = __sigmask (signo); unsigned long __word = __sigword (signo); set->sig[__word]|=__mask; return 0; } }
false
false
false
false
false
0
needs_idle_maps(struct drm_device *dev) { #ifdef CONFIG_INTEL_IOMMU /* Query intel_iommu to see if we need the workaround. Presumably that * was loaded first. */ if (IS_GEN5(dev) && IS_MOBILE(dev) && intel_iommu_gfx_mapped) return true; #endif return false; }
false
false
false
false
false
0
divide(const APFloat &rhs, roundingMode rounding_mode) { opStatus fs; assertArithmeticOK(*semantics); sign ^= rhs.sign; fs = divideSpecials(rhs); if (category == fcNormal) { lostFraction lost_fraction = divideSignificand(rhs); fs = normalize(rounding_mode, lost_fraction); if (lost_fraction != lf...
false
false
false
false
false
0
luaX_newstring (LexState *ls, const char *str, size_t l) { lua_State *L = ls->L; TValue *o; /* entry for 'str' */ TString *ts = luaS_newlstr(L, str, l); /* create new string */ setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */ o = luaH_set(L, ls->h, L->top - 1); if (ttisnil(o)) { /* not...
false
false
false
false
false
0
readDate(const QString &str, KLocale::ReadDateFlags flags, bool *ok) const { Q_D(const KCalendarSystem); if (flags & KLocale::ShortFormat) { return readDate(str, locale()->dateFormatShort(), ok); } else if (flags & KLocale::NormalFormat) { return readDate(str, locale()->dateFormat(), ok); ...
false
false
false
false
false
0
axmap_new(unsigned long nr_bits) { struct axmap *axmap; unsigned int i, levels; axmap = smalloc(sizeof(*axmap)); if (!axmap) return NULL; levels = 1; i = (nr_bits + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT; while (i > 1) { i = (i + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT; levels++; } axmap->nr_levels = levels; ...
false
false
false
false
false
0
encode_attr_2( Slapi_PBlock *pb, BerElement *ber, Slapi_Entry *e, Slapi_ValueSet *vs, int attrsonly, const char *attribute_type, const char *returned_type ) { char *attrs[2] = { NULL, NULL }; Slapi_Value *v; int i = slapi_valueset_first_value(vs,&v); if (i==-1) { return( 0 )...
false
false
false
false
false
0
GetFactoryAttributesDocument(ARexGMConfig& config,Arc::XMLNode in,Arc::XMLNode out) { /* GetFactoryAttributesDocument GetFactoryAttributesDocumentResponse FactoryResourceAttributesDocument BasicResourceAttributesDocument (optional) IsAcceptingNewActivities (boolean) CommonName (optional,str...
false
false
false
false
false
0
redraw(void) { if (mapped()==MSTrue&&frozen()==MSFalse) { drawBackground(); drawShadow(); if (showPixmap()==MSTrue) drawPixmap(); if (showLabel()==MSTrue) drawLabel(); if (highlighted()==MSTrue) drawHighlight(); else undrawHighlight(); } }
false
false
false
false
false
0
Go(bool ToFile, FileFd * const File) { // Server has closed the connection if (ServerFd == -1 && (In.WriteSpace() == false || ToFile == false)) return false; fd_set rfds,wfds; FD_ZERO(&rfds); FD_ZERO(&wfds); /* Add the server. We only send more requests if the connection will ...
false
false
false
true
false
1
bad_std_timing(u8 a, u8 b) { return (a == 0x00 && b == 0x00) || (a == 0x01 && b == 0x01) || (a == 0x20 && b == 0x20); }
false
false
false
false
false
0
init(void) { DEV_register_irq(0, "8254 PIT"); DEV_register_ioread_handler(this, read_handler, 0x0040, "8254 PIT", 1); DEV_register_ioread_handler(this, read_handler, 0x0041, "8254 PIT", 1); DEV_register_ioread_handler(this, read_handler, 0x0042, "8254 PIT", 1); DEV_register_ioread_handler(this, read_handler, ...
false
false
false
false
false
0
checkUnknown(const QString& n) { if (n == "???") return _emptyString; return n; }
false
false
false
false
false
0
EA_GetEA(unsigned long *Result, struct _Address *Addr) { switch(Addr->Mode) { case 0: /* Dy */ case 1: /* Ay */ case 3: /* (Ay)+ */ case 4: /* -(Ay) */ ERR("Can't get the EA of a register..\n"); return 0; case 2: /* (Ay) */ case 5: /* (d16,Ay) */ case 6: /* (d8,An,Xi) */ TRACE("Retrieving Effective Addres...
false
false
false
false
false
0