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
xgbe_config_dma_bus(struct xgbe_prv_data *pdata) { /* Set enhanced addressing mode */ XGMAC_IOWRITE_BITS(pdata, DMA_SBMR, EAME, 1); /* Set the System Bus mode */ XGMAC_IOWRITE_BITS(pdata, DMA_SBMR, UNDEF, 1); XGMAC_IOWRITE_BITS(pdata, DMA_SBMR, BLEN_256, 1); }
false
false
false
false
false
0
netsys_timer_delete(value timer) { #if defined(HAVE_CLOCK) && defined(HAVE_POSIX_TIMER) timer_t tm; int code; switch (Tag_val(Field(timer, 0))) { case 0: /* POSIX timer */ extract_timer(Field(Field(timer, 0), 0), &tm); code = timer_delete(tm); if (code == -1) uerror("timer_delete", Nothing); break...
false
false
false
false
false
0
gather_memory_references_ref (struct loop *loop, struct mem_ref_group **refs, tree ref, bool write_p, gimple stmt) { tree base, step; HOST_WIDE_INT delta; struct mem_ref_group *agrp; if (get_base_address (ref) == NULL) return false; if (!analyze_ref (loop, &ref, &base, &step, &delta, stmt)) ...
false
false
false
false
false
0
column(double f(double), unsigned int n) const { // must copy data std::vector<double> value(m_data.at(0).size()); unsigned int col(n); if (col < 1 || m_data.size() < col) { if (0 < m_data.size()) { epix_warning("Out of range argument to data_file::column()"); col=1; } else ...
false
false
false
false
false
0
startree_check_inverse_perm(startree_t* s) { // ensure that each value appears exactly once. int i, N; uint8_t* counts; N = Ndata(s); counts = calloc(Ndata(s), sizeof(uint8_t)); for (i=0; i<N; i++) { assert(s->inverse_perm[i] >= 0); assert(s->inverse_perm[i] < N); counts[s->inverse_perm[i]]++; } for (i=0;...
false
false
false
false
false
0
set_scrub_rate(struct mem_ctl_info *mci, u32 bw) { struct amd64_pvt *pvt = mci->pvt_info; u32 min_scrubrate = 0x5; if (pvt->fam == 0xf) min_scrubrate = 0x0; if (pvt->fam == 0x15) { /* Erratum #505 */ if (pvt->model < 0x10) f15h_select_dct(pvt, 0); if (pvt->model == 0x60) min_scrubrate = 0x6; } re...
false
false
false
false
false
0
notify(SoNotList *list) // //////////////////////////////////////////////////////////////////////// { if (getNumChildren() != nchildren) { nchildren = getNumChildren(); childrenSensor->schedule(); } SoNotRec *rec = list->getFirstRec(); // only interested in a field-to-container notification if (...
false
false
false
false
false
0
stPinchThreadSet_getLabelIntervalsP(stPinchThread *thread, stHash *pinchEndsToLabels, stSortedSet *pinchIntervals) { stPinchSegment *segment = stPinchThread_getFirst(thread); if (segment == NULL) { return; } int64_t start = stPinchSegment_getStart(segment); void *label = NULL; do { ...
false
false
false
false
false
0
fish_escape (FishItem *fishitem) { item2del_list = g_list_append (item2del_list, fishitem); gc_sound_play_ogg ("sounds/youcannot.wav", NULL); if (gcomprisBoard->sublevel) { --gcomprisBoard->sublevel; gc_score_set(gcomprisBoard->sublevel); } }
false
false
false
false
false
0
find_right_word_border(int idx) { if (idx == -1) { return -1; } while (idx < corpus_info.array_size - 2) { int val; idx ++; val = ntohl(corpus_info.array[idx * 2]); if (val & ELM_BOS) { return -1; } if (val & ELM_WORD_BORDER) { return idx; } } return -1; }
false
false
false
false
false
0
CuAssertDblEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message, double expected, double actual, double delta) { char buf[STRING_MAX]; if (fabs(expected - actual) <= delta) return; sprintf(buf, "expected <%f> but was <%f>", expected, actual); CuFail_Line(tc, file, line, message, buf); }
false
false
false
false
false
0
findFromMode( const QString& path /*only used if is_local_file*/, mode_t mode /*0 if unknown*/, bool is_local_file ) { if ( is_local_file && (mode == 0 || mode == (mode_t)-1) ) { KDE_struct_stat buff; if ( KDE::stat( path, &buff...
false
false
false
false
false
0
mapAllowDenyList( List(TSrvCfgClientClass) clientClassLst) { // Log(Info)<<"Mapping allow, deny list inside interface "<<Name<<LogEnd; SPtr<TSrvCfgAddrClass> ptrClass; this->SrvCfgAddrClassLst.first(); while(ptrClass=SrvCfgAddrClassLst.get()){ ptrClass->mapAllowDenyList(clientClassLst); } ...
false
false
false
false
false
0
unlink(void) { if(engine) { if(engine->windows == this) engine->windows = next; if(engine->surface() == surface) surface = NULL; } if(next) next->prev = prev; if(prev) prev->next = next; }
false
false
false
false
false
0
c_tmap_scanline_per_nolight() { ubyte *dest; uint c; int x, index = fx_xleft + (bytes_per_row * fx_y); fix u,v,z,dudx, dvdx, dzdx; u = fx_u; v = fx_v*64; z = fx_z; dudx = fx_du_dx; dvdx = fx_dv_dx*64; dzdx = fx_dz_dx; dest = (ubyte *)(write_buffer + fx_xleft + (bytes_per_row * fx_y) ); if (!Transparen...
false
false
false
false
false
0
configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data) { if(bheading_auto_calc){ num_heading = (tree_scroll->allocation.height - 12) / (font_height + 10); if(num_heading < 1) num_heading = 1; } else { num_heading = max_heading; } return(FALSE); }
false
false
false
false
false
0
dma_variable_packet_free (DmaVariablePacket* pack) { if (pack->data != NULL) { /* Remove from packet data list */ DmaVariablePacket **find; for (find = &pack->data->packet; *find != NULL; find = &(*find)->next) { if (*find == pack) { *find = pack->next; break; } } } gtk_tree_row_refe...
false
false
false
false
false
0
elvin_subscription_set_expr (Subscription *subscription, const char *subscription_expr) { alloc_message (sub_mod_rqst); alloc_message (sub_rply); avis_message_init (sub_mod_rqst, MESSAGE_ID_SUB_MOD_RQST, subscription->id, subscription_expr, subscription->sec...
false
false
false
false
false
0
be_queue_alloc(struct be_adapter *adapter, struct be_queue_info *q, u16 len, u16 entry_size) { struct be_dma_mem *mem = &q->dma_mem; memset(q, 0, sizeof(*q)); q->len = len; q->entry_size = entry_size; mem->size = len * entry_size; mem->va = dma_zalloc_coherent(&adapter->pdev->dev, mem->size, &mem->dma, ...
false
false
false
false
false
0
number_blocks (tree fn) { int i; int n_blocks; tree *block_vector; /* For SDB and XCOFF debugging output, we start numbering the blocks from 1 within each function, rather than keeping a running count. */ #if defined (SDB_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) if (write_symbols == SDB_D...
false
false
false
false
false
0
GetData(void) { TclData *dataPtr; int tid, new; dataPtr = Ns_TlsGet(&tls); if (dataPtr == NULL) { dataPtr = ns_malloc(sizeof(TclData)); dataPtr->cancel = Tcl_AsyncCreate(AsyncCancel, NULL); Tcl_InitHashTable(&dataPtr->interps, TCL_ONE_WORD_KEYS); tid = Ns_ThreadId(); Ns_MutexLock(&tlock); dataPtr...
false
false
false
false
false
0
glfwGetInstanceProcAddress(VkInstance instance, const char* procname) { GLFWvkproc proc; assert(procname != NULL); _GLFW_REQUIRE_INIT_OR_RETURN(NULL); if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER)) return NULL; proc = (GLFWvkproc) vkGetInstancePr...
false
false
false
false
false
0
NITFExtractMetadata( char ***ppapszMetadata, const char *pachHeader, int nStart, int nLength, const char *pszName ) { char szWork[400]; char* pszWork; if (nLength >= sizeof(szWork) - 1) pszWork = (char*)CPLMalloc(nLength + 1); else pszWork = szWork; /* tr...
true
true
false
false
true
1
sis190_alloc_rx_iob(struct RxDesc *desc) { struct io_buffer *iob; iob = alloc_iob(RX_BUF_SIZE); if (iob) { u32 mapping; mapping = virt_to_bus(iob->data); sis190_map_to_asic(desc, mapping); } else { DBG("sis190: alloc_iob failed\n"); sis190_make_unusable_by_asic(desc); } return iob; }
false
false
false
false
false
0
skipmnemonic (char *rcline) { char *help = rcline; while(*help != '\0') { /* leading spaces */ if (isgap(*help)) help++; else break; } while(*help != '\0') { if (!isspace(OFstatic_cast(unsigned char, *help))) help++; /* Mnemonic */ else break; } while...
false
false
false
false
false
0
CmdVerbatim(int code) /****************************************************************************** convert characters 1:1 until \end{verbatim} or \end{Verbatim} is reached VERBATIM_1 for \begin{verbatim} ... \end{verbatim} VERBATIM_2 for \begin{Verbatim} ... \end{Verbatim} **************************...
false
false
false
false
false
0
gcr_trust_add_pinned_certificate_async (GcrCertificate *certificate, const gchar *purpose, const gchar *peer, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GSimpleAsyncResult *async; trust_closure *closure...
false
false
false
false
false
0
notail() const { size_t p = rfind( '/' ); return ( p == String::npos ) ? "" : substr( 0, p ); }
false
false
false
false
false
0
exfat_stat(const struct exfat* ef, const struct exfat_node* node, struct stat* stbuf) { memset(stbuf, 0, sizeof(struct stat)); if (node->flags & EXFAT_ATTRIB_DIR) stbuf->st_mode = S_IFDIR | (0777 & ~ef->dmask); else stbuf->st_mode = S_IFREG | (0777 & ~ef->fmask); stbuf->st_nlink = 1; stbuf->st_uid = ef->uid;...
false
false
false
false
false
0
smp_fetch_ssl_x_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt, const struct arg *args, struct sample *smp, const char *kw) { int cert_peer = (kw[4] == 'c') ? 1 : 0; X509 *crt; int nid; struct connection *conn; if (!l4) return 0; conn = objt_conn(l4->si[0].end...
false
false
false
false
false
0
__igb_close(struct net_device *netdev, bool suspending) { struct igb_adapter *adapter = netdev_priv(netdev); struct pci_dev *pdev = adapter->pdev; WARN_ON(test_bit(__IGB_RESETTING, &adapter->state)); if (!suspending) pm_runtime_get_sync(&pdev->dev); igb_down(adapter); igb_free_irq(adapter); igb_free_all_tx...
false
false
false
false
false
0
InvalidateTSCacheCallBack(Datum arg, int cacheid, ItemPointer tuplePtr) { HTAB *hash = (HTAB *) DatumGetPointer(arg); HASH_SEQ_STATUS status; TSAnyCacheEntry *entry; hash_seq_init(&status, hash); while ((entry = (TSAnyCacheEntry *) hash_seq_search(&status)) != NULL) entry->isvalid = false; /* Also invalida...
false
false
false
false
false
0
ParsePayloadTypeParameters(const buzz::XmlElement* element, std::map<std::string, std::string>* paramap) { for (const buzz::XmlElement* param = element->FirstNamed(QN_PARAMETER); param != NULL; param = param->NextNamed(QN_PARAMETER)) { std::string name = GetXmlAttr(param, Q...
false
false
false
false
false
0
gt_strgraph_largest_count(GtStrgraph *strgraph) { GtStrgraphCount count, maxcount; GtStrgraphVnum i; maxcount = 0; for (i = 0; i < (GT_STRGRAPH_NOFVERTICES(strgraph)); i++) { count = GT_STRGRAPH_GET_COUNT(strgraph, i); if (count > maxcount) maxcount = count; } return maxcount; }
false
false
false
false
false
0
xyexponent_changed_cb(GtkWidget *combo, CCViewControls *controls) { CCViewArgs *args = controls->args; if (controls->in_update) return; controls->in_update = TRUE; args->xyexponent = gwy_enum_combo_box_get_active(GTK_COMBO_BOX(combo)); args->xoffset = gtk_adjustment_g...
false
false
false
false
false
0
startElement( const QString& /* namespaceURI */, const QString& /* localName */, const QString& qName, const QXmlAttributes& atts ) { int number; bool ret = true; if( qName == "scenario" && _state == StateInit ) { _state = StateDocument; _otherCpt = 0; _desc->clear(); _desc->setNbPlayers( atts.value( "nbPla...
false
false
false
false
false
0
tick_nohz_update_jiffies(ktime_t now) { unsigned long flags; __this_cpu_write(tick_cpu_sched.idle_waketime, now); local_irq_save(flags); tick_do_update_jiffies64(now); local_irq_restore(flags); touch_softlockup_watchdog(); }
false
false
false
false
false
0
vm_get_game_arg(int argc, const char *const *argv, char *buf, size_t buflen) { int i; const char *restore_file; /* presume we won't find a file to restore */ restore_file = 0; /* * Scan the arguments for the union of the TADS 2 and TADS 3 command * lin...
false
false
false
false
false
0
ShowDialog(const wxString& xrc, const wxString& dlgName, const wxString& callback) { wxString actual = ConfigManager::LocateDataFile(xrc, sdScriptsUser | sdScriptsGlobal); // Manager::Get()->GetLogManager()->DebugLog(F(_T("Original parameter is: ") + xrc)); Manager::Get()->GetLogManager()->De...
false
false
false
false
false
0
suggestions(const QString& word) const { QStringList result; if (!d) { return result; } QString check = word; check.replace(QChar(0x2019), QLatin1Char('\'')); QByteArray word_utf8 = check.toUtf8(); size_t count; char** suggestions = enchant_dict_suggest((*d)->dictionary(), word_utf8.constData(), word_utf8.l...
false
false
false
false
false
0
ungrab() { if (! --m_server_grabs) XUngrabServer(display()); if (m_server_grabs < 0) m_server_grabs = 0; }
false
false
false
false
false
0
SDL_VIDEO_QuitSDL(void) { #if HAVE_OPENGL if (currently_opengl) SDL_VIDEO_GL_Cleanup(); #endif SDL_VIDEO_screen = NULL; SDL_QuitSubSystem(SDL_INIT_VIDEO); }
false
false
false
false
false
0
is_64bit_pcrel_reloc (unsigned int reloc_type) { switch (elf_header.e_machine) { case EM_ALPHA: return reloc_type == 11; /* R_ALPHA_SREL64 */ case EM_IA_64: return reloc_type == 0x4f; /* R_IA64_PCREL64LSB */ case EM_PARISC: return reloc_type == 72; /* R_PARISC_PCREL64 */ case EM_...
false
false
false
false
false
0
match_pci_dev_by_id(struct device *dev, void *data) { struct pci_dev *pdev = to_pci_dev(dev); struct pci_device_id *id = data; if (pci_match_one_device(id, pdev)) return 1; return 0; }
false
false
false
false
false
0
PostGarbageCollectionProcessing() { // Process weak global handle callbacks. This must be done after the // GC is completely done, because the callbacks may invoke arbitrary // API functions. // At the same time deallocate all DESTROYED nodes. ASSERT(Heap::gc_state() == Heap::NOT_IN_GC); const int initial_p...
false
false
false
false
false
0
digitv_alps_tded4_tuner_calc_regs(struct dvb_frontend *fe, u8 *pllbuf, int buf_len) { u32 div; struct dtv_frontend_properties *c = &fe->dtv_property_cache; if (buf_len < 5) return -EINVAL; div = (((c->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; pllbuf[0] = 0x61; pllbuf[1] = (div >> 8) & 0x7F; pllbu...
false
false
false
false
false
0
art_search(long *arts, long n_arts, long no) { long i; for (i = 0 ; i < n_arts ; i++) if (arts[i] == no) return i; return -1; }
false
false
false
false
false
0
turret_driver_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) { edict_t *ent; // level the gun self->target_ent->move_angles[0] = 0; // remove the driver from the end of them team chain for (ent = self->target_ent->teammaster; ent->teamchain != self; ent = ent->teamchain) ;...
false
false
false
false
false
0
decode_run_2bit(GetBitContext *gb, int *color) { unsigned int v, t; v = 0; for (t = 1; v < t && t <= 0x40; t <<= 2) v = (v << 4) | get_bits(gb, 4); *color = v & 3; if (v < 4) { /* Code for fill rest of line */ return INT_MAX; } return v >> 2; }
false
false
false
false
false
0
stage_revert(struct view *view, struct line *line) { struct line *chunk = NULL; if (!is_initial_commit() && stage_line_type == LINE_STAT_UNSTAGED) chunk = stage_diff_find(view, line, LINE_DIFF_CHUNK); if (chunk) { if (!prompt_yesno("Are you sure you want to revert changes?")) return FALSE; if (!stage_app...
false
false
false
false
false
0
config_set_pagedsizelimit( const char *attrname, char *value, char *errorbuf, int apply ) { int retVal = LDAP_SUCCESS; long pagedsizelimit; char *endp = NULL; Slapi_Backend *be; char *cookie; slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); if ( config_value_is_null( attrname, value, ...
false
false
false
false
false
0
GetNext() const { if (CHECK_CLOSINGINPROGRESS()) { // Cancel Event Detected return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE); } else if (GetProjectAttachSucceeded()) { // We were successful in creating or retrieving an account return PAGE_TRANSITION_NEXT(ID_COMPLETIONPAGE); ...
false
false
false
false
false
0
compute_period(size_t count, random_fn_t fn, unsigned mask, unsigned min_period) { size_t n; size_t idx; /* Filling index */ size_t didx = 0; /* Duplicate index */ unsigned *values, *window; unsigned period; XMALLOC_ARRAY(values, count); XMALLOC_ARRAY(window, count); if (min_period < MIN_PERIOD) { war...
false
false
false
false
false
0
kmc_set_mode_to_DISPLAY(int fd) { int dmode, rmode, smode; dmode = kmc_get_display_mode(fd); rmode = kmc_get_record_ready(fd); smode = kmc_get_setup_mode(fd); if ( kmc_get_setup_mode(fd) == 1) kmc_press_stop_escape_button(fd); if ( kmc_get_record_ready(fd) == 1) kmc_press_record_ready_button(fd); if ( kmc_...
false
false
false
false
false
0
gf_sg_vrml_mf_reset(void *mf, u32 FieldType) { GenMFField *mffield = (GenMFField *)mf; if (!mffield->array) return GF_OK; //field we can't copy if (gf_sg_vrml_is_sf_field(FieldType)) return GF_BAD_PARAM; if (!gf_sg_vrml_get_sf_size(FieldType)) return GF_BAD_PARAM; switch (FieldType) { case GF_SG_VRML_MFSTRING:...
false
false
false
false
false
0
SetEnabled(int enabling) { // We defer enabling the handles until the selection process begins if ( enabling ) { if ( ! this->CurrentRenderer ) { int X=this->Interactor->GetEventPosition()[0]; int Y=this->Interactor->GetEventPosition()[1]; this->SetCurrentRenderer(this->Interactor-...
false
false
false
false
false
0
scsi_inquiry(cdrom_drive *d){ unsigned char sense[SG_MAX_SENSE]; unsigned char cmd[6]={ 0x12,0,0,0,56,0 }; if(handle_scsi_cmd(d,cmd,6, 0, 56,'\377',1,sense)) { cderror(d,"008: Unable to identify CDROM model\n"); return(NULL); } return (d->private_data->sg_buffer); }
false
false
false
false
false
0
APar_ForcePadding(uint32_t padding_amount) { if (tree_display_only || padding_amount == 0) { return; } if (udta_dynamics.free_atom_repository) { parsedAtoms[udta_dynamics.free_atom_repository].AtomicLength = padding_amount; parsedAtoms[udta_dynamics.free_atom_repository].AtomicData...
false
true
false
false
false
1
rtw_reordering_ctrl_timeout_handler23a(unsigned long pcontext) { struct recv_reorder_ctrl *preorder_ctrl; struct rtw_adapter *padapter; struct rtw_queue *ppending_recvframe_queue; preorder_ctrl = (struct recv_reorder_ctrl *)pcontext; padapter = preorder_ctrl->padapter; ppending_recvframe_queue = &preorder_ctrl->...
false
false
false
false
false
0
aarch64_regno_ok_for_index_p (int regno, bool strict_p) { if (!HARD_REGISTER_NUM_P (regno)) { if (!strict_p) return true; if (!reg_renumber) return false; regno = reg_renumber[regno]; } return GP_REGNUM_P (regno); }
false
false
false
false
false
0
HPDF_CreateExtGState (HPDF_Doc pdf) { HPDF_ExtGState ext_gstate; if (!HPDF_HasDoc (pdf)) return NULL; pdf->pdf_version = HPDF_VER_14; ext_gstate = HPDF_ExtGState_New (pdf->mmgr, pdf->xref); if (!ext_gstate) HPDF_CheckError (&pdf->error); return ext_gstate; }
false
false
false
false
false
0
test_toplevel_order (gconstpointer userdata) { gchar **data = (gpointer) userdata; gchar *project_path = *data; gchar **names = &data[1]; GladeProject *project; GList *toplevels, *l; gchar *temp_path; const gchar *xml_data; gsize xml_size; GBytes *xml; g_assert (g_close (g_file_open_tmp ("glade-top...
false
false
false
false
false
0
expanding_array_clear(ExpandingArray *A) { if (!A) { if (MATR_DEBUG_MODE) { fprintf(stderr, "expanding_array_clear: null array.\n"); } return; } A->last_elt = -1; if (A->first_elt > 0) { A->first_elt = A->length/2; } A->n_elts = 0; }
false
false
false
false
false
0
asLinearRing() const { return parentLine->getFactory()->createLinearRing( getResultCoordinates()); }
false
false
false
false
false
0
from_unicode (CHARSET charset, int u) { short int *p; /* This is really assignment, not comparation */ if ((p=charset[(unsigned)u>>8])) { return p[u & 0xff]; } else { return -1; } }
false
false
false
false
false
0
template_get(const char *name) { struct ra_template *template = templates; struct stat st[1]; while(template) { if(strcmp(template->name, name) == 0) { if(stat(name, st) >= 0 && template->mtime < st->st_mtime) { template_compile(template); } return...
false
false
false
false
false
0
e1000_setup_fiber_serdes_link(struct e1000_hw *hw) { u32 ctrl; u32 status; u32 txcw = 0; u32 i; u32 signal = 0; s32 ret_val; /* On adapters with a MAC newer than 82544, SWDP 1 will be * set when the optics detect a signal. On older adapters, it will be * cleared when there is a signal. This applies to fibe...
false
false
false
false
false
0
matches (CTypeInfo *ctype) const { return ctype->TypeAddress () && base ()->matches (ctype->BaseType ()); }
false
false
false
false
false
0
ximCloseProc(conn, major, minor, arglen) IMConnection *conn; int major; int minor; int arglen; { IMIM *imp; TRACE(("ximCloseProc(#%d)\n", conn->serial)); if ((imp = IMGetIM(conn, arglen)) == NULL) return; if (arglen != 4) { DPRINT(("ximCloseProc: arglen != 4\n")); IMSendBadLength(conn, imp->id, 0); ...
false
false
false
false
false
0
dlmunmap (void *start, size_t length) { /* We don't bother decreasing execsize or truncating the file, since we can't quite tell whether we're unmapping the end of the file. We don't expect frequent deallocation anyway. If we did, we could locate pages in the file by writing to the pages being de...
false
false
false
false
false
0
find_dirent_proc (void *callerdat, const char *dir, const char *repository, const char *update_dir, List *entries) { struct find_data *find_data = callerdat; /* This check seems to slowly be creeping throughout CVS (update and send_dirent_proc by CVS 1.5, diff in 31 Oct 1995. My guess...
false
false
false
false
false
0
setup(int argc, const char **argv) { char **retval = NULL; const char *val; int opt_quiet = 0; int argi; val = getenv("CRUT_TIMEOUT"); if (val && (atoi(val) > 0)) { test_timeout = atoi(val); } test_path = crut_find_testsdir(argv[0]); argv0 = argv[0]; for (argi = 1; argi < arg...
false
false
true
true
false
1
stac_init(struct hda_codec *codec) { struct sigmatel_spec *spec = codec->spec; int i; /* override some hints */ stac_store_hints(codec); /* set up GPIO */ /* turn on EAPD statically when spec->eapd_switch isn't set. * otherwise, unsol event will turn it on/off dynamically */ if (!spec->eapd_switch) spec-...
false
false
false
false
false
0
scontrol_encode_hostlist(char *hostlist, bool sorted) { char *io_buf = NULL, *tmp_list, *ranged_string; int buf_size = 1024 * 1024; hostlist_t hl; if (!hostlist) { fprintf(stderr, "Hostlist is NULL\n"); return SLURM_ERROR; } if (hostlist[0] == '/') { ssize_t buf_read; int fd = open(hostlist, O_RDONLY); ...
false
false
false
false
false
0
allocrest() { long i; x = (vector *)Malloc(spp*sizeof(vector)); for (i = 0; i < spp; i++) x[i] = (vector)Malloc(spp*sizeof(double)); reps = (intvector *)Malloc(spp*sizeof(intvector)); for (i = 0; i < spp; i++) reps[i] = (intvector)Malloc(spp*sizeof(long)); nayme = (naym *)Malloc(spp*sizeof(naym)); ...
false
false
false
false
false
0
SMprintfiles(FILE *file, TOKEN token, char **xref, int ngroups) { if (method_data[typetoindex[token.type]].initialized == INIT_FAIL) return; if (method_data[typetoindex[token.type]].initialized == INIT_NO && !InitMethod(typetoindex[token.type])) { SMseterror(SMERR_UNINIT, NULL); warn("SM: can't print...
false
false
false
false
false
0
addChunk(ucvector* out, const char* chunkName, const unsigned char* data, size_t length) { unsigned char* chunk = LodePNG_create_chunk(&out->data, &out->size, (unsigned)length, chunkName, data); if(chunk) out->allocsize = out->size; /*fix the allocsize again*/ return chunk ? 0 : 70; /*if realloc failed, return er...
false
false
false
false
false
0
__env_set_timeout(dbenv, timeout, flags) DB_ENV *dbenv; db_timeout_t timeout; u_int32_t flags; { int ret; ret = 0; if (flags == DB_SET_REG_TIMEOUT) dbenv->envreg_timeout = timeout; else ret = __lock_set_env_timeout(dbenv, timeout, flags); return (ret); }
false
false
false
false
false
0
hydra_address2string(char *address) { struct sockaddr_in target; struct sockaddr_in6 target6; if (address[0] == 4) { memcpy(&target.sin_addr.s_addr, &address[1], 4); return inet_ntoa((struct in_addr) target.sin_addr); } else #ifdef AF_INET6 if (address[0] == 16) { memcpy(&target6.sin6_addr, &addr...
false
false
false
false
false
0
get_color(unsigned i, unsigned j) const { if (i >= h || j >= w) return INVALID_SITE; return tab[i][j].m.color; }
false
false
false
false
false
0
match_uprobe(struct uprobe *l, struct uprobe *r) { if (l->inode < r->inode) return -1; if (l->inode > r->inode) return 1; if (l->offset < r->offset) return -1; if (l->offset > r->offset) return 1; return 0; }
false
false
false
false
false
0
xfs_bmdr_to_bmbt( struct xfs_inode *ip, xfs_bmdr_block_t *dblock, int dblocklen, struct xfs_btree_block *rblock, int rblocklen) { struct xfs_mount *mp = ip->i_mount; int dmxr; xfs_bmbt_key_t *fkp; __be64 *fpp; xfs_bmbt_key_t *tkp; __be64 *tpp; if (xfs_sb_version_hascrc(&mp->m_sb)) xfs_btree_i...
false
true
false
false
false
1
fl_gap() { while (n>gap+2 && p[n-1].x == p[gap].x && p[n-1].y == p[gap].y) n--; if (n > gap+2) { fl_transformed_vertex((COORD_T)p[gap].x, (COORD_T)p[gap].y); #ifdef WIN32 counts[numcount++] = n-gap; #endif gap = n; } else { n = gap; } }
false
false
false
false
false
0
swrun_count_processes( void ) { netsnmp_cache_check_and_reload(swrun_cache); return ( swrun_container ? CONTAINER_SIZE(swrun_container) : 0 ); }
false
false
false
false
false
0
parse_attrs(const char *str, attr_t *attrp, int delimiter) { int color, len; const char *name; char buf[16]; char reject[3] = {',', '\0', '\0'}; reject[1] = delimiter; *attrp = 0; if (!str) return ""; while (*str && *str != delimiter) { ++str; switch(str[-1]) { ...
false
false
false
false
false
0
BezierDice(Bezier *bezier, int nu, int nv) { if(nu < 2) nu = BEZ_DEFAULT_MESH_SIZE; if(nv < 2) nv = BEZ_DEFAULT_MESH_SIZE; if(nu != bezier->nu || nv != bezier->nv) { bezier->geomflags |= BEZ_REMESH; bezier->nu = nu; bezier->nv = nv; } return bezier; }
false
false
false
false
false
0
removeElement(Elements* elements, Element* element) { GList* l = NULL;; for( l = elements->listOfElements; l != NULL; l = l->next) { if(l->data && element->equals(element,(Element*) l->data)) { elements->listOfElements = g_list_remove(elements->listOfElements, (gpointer) l->data); elements->nElements--; ...
false
false
false
false
false
0
fn_AdOt_evaluate(const gs_function_t *pfn_common, const float *in0, float *out) { const gs_function_AdOt_t *const pfn = (const gs_function_AdOt_t *)pfn_common; const float *in = in0; #define MAX_ADOT_IN 16 float in_buf[MAX_ADOT_IN]; int i; /* * We have to take special care to handle th...
false
false
false
false
false
0
_wrap_svm_node_array_set(PyObject *self, PyObject *args) { int argc; PyObject *argv[5]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = args ? (int)PyObject_Length(args) : 0; for (ii = 0; (ii < 4) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; ...
false
false
false
false
false
0
update_store (const gchar *sparql) { GError *error = NULL; /* Run a synchronous update query */ tracker_sparql_connection_update (connection, sparql, G_PRIORITY_DEFAULT, NULL, ...
false
false
false
false
false
0
getobjname (lua_State *L, CallInfo *ci, int stackpos, const char **name) { if (isLua(ci)) { /* a Lua function? */ Proto *p = ci_func(ci)->l.p; int pc = currentpc(L, ci); Instruction i; *name = luaF_getlocalname(p, stackpos+1, pc); if (*name) /* is a local? */ ...
false
false
false
false
false
0
getCompareAndBranch(unsigned Opcode, const MachineInstr *MI) const { switch (Opcode) { case SystemZ::CR: return SystemZ::CRJ; case SystemZ::CGR: return SystemZ::CGRJ; case SystemZ::CHI: return MI && isInt<8>(MI->getOperand(1).getImm()) ? SystemZ::CIJ : ...
false
false
false
false
false
0
getdoubles2ptf(graph_t * g, char *name, pointf * result) { char *p; int i; double xf, yf; char c = '\0'; boolean rv = FALSE; if ((p = agget(g, name))) { i = sscanf(p, "%lf,%lf%c", &xf, &yf, &c); if ((i > 1) && (xf > 0) && (yf > 0)) { result->x = POINTS(xf); result->y = POINTS(yf); ...
false
false
false
false
false
0
__lltostr(char *s, int size, unsigned long long i, int base, char UpCase) { char *tmp; unsigned int j=0; s[--size]=0; tmp=s+size; if ((base==0)||(base>36)) base=10; j=0; if (!i) { *(--tmp)='0'; j=1; } while((tmp>s)&&(i)) { tmp--; if ((*tmp=i%base+'0')>'9') *tmp+=(UpCase?'A':'a...
false
false
false
false
false
0
visualize_missing_recorder_program_dialog (GtkWindow *parent) { GtkWidget *miss_dialog = (GtkWidget *) NULL; miss_dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK...
false
false
false
false
false
0
NewExecuteContext(void) { execute_context_t *result; result = malloc(sizeof(execute_context_t)); result->response_file = TempFile("chocolat.rsp"); result->stream = fopen(result->response_file, "w"); if (result->stream == NULL) { fprintf(stderr, "Error opening response file\n"); ...
false
false
false
false
false
0
FunctionCall9(FmgrInfo *flinfo, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7, Datum arg8, Datum arg9) { FunctionCallInfoData fcinfo; Datum result; InitFunctionCallInfoData(fcinfo, flinfo, 9, NULL, NULL); fcinfo.arg[0] = arg1; fcinfo.arg[1] = arg2; fcinfo.arg...
false
false
false
false
false
0
Sop_argb6666_to_Dacc( GenefxState *gfxs ) { int w = gfxs->length; GenefxAccumulator *D = gfxs->Dacc; u8 *S = gfxs->Sop[0]; while (w--) { u8 b = S[0] & 0x3F; u8 g = ((S[0] & 0xC0) >> 6) | ((S[1] & 0x0F) << 2); u8 r = ((S[1] & 0xF0) >> 4) | ((S[2] & 0...
false
false
false
false
false
0
replace_oldest_value_reg (rtx *loc, enum reg_class cl, rtx insn, struct value_data *vd) { rtx new_rtx = find_oldest_value_reg (cl, *loc, vd); if (new_rtx) { if (DEBUG_INSN_P (insn)) { struct queued_debug_insn_change *change; if (dump_file) fprintf (dump_file, "debug_insn %u: queued repla...
false
false
false
false
false
0
ReadImage (gGraphImagePtr img, xgdIOCtx * fd, unsigned char (*cmap)[256], int interlace, int *ZeroDataBlockP) { unsigned char c; int v; int xpos = 0, ypos = 0, pass = 0; int i; int red[256]; int green[256]; int blue[256]; unsigned char *p_out; int len = img->width; int height...
false
false
false
false
true
1