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
list_remove_elt(SparseElementList *l, SparseNode toremove) { if (!l) { if (MATR_DEBUG_MODE) { fprintf(stderr, "list_remove_elt: null list.\n"); } return; } if (null_node(toremove)) { return; } if (!null_node(prev_node(toremove))) { if (l->compact) { toremove.compact->prev-...
false
false
false
false
false
0
ParseFlag(XMLNode el, bool& val, Logger& logger) { if(!el) return true; if (strtobool((std::string)el, val)) { return true; } logger.msg(ERROR, "[ADLParser] %s element must be boolean.", el.Name()); return false; }
false
false
false
false
false
0
ocrdma_poll_scqe(struct ocrdma_qp *qp, struct ocrdma_cqe *cqe, struct ib_wc *ibwc, bool *polled, bool *stop) { int status; bool expand; status = (le32_to_cpu(cqe->flags_status_srcqpn) & OCRDMA_CQE_STATUS_MASK) >> OCRDMA_CQE_STATUS_SHIFT; if (status == OCRDMA_CQE_SUCCESS) expand = ocrdma_poll_success_s...
false
false
false
false
false
0
FindId (void* id) { for (int i = 0; i < _elems.Count(); ++i) { if (Elem(i)->id() == id) { return (UMapElem*) _elems[i]; } } return nil; }
false
false
false
false
false
0
sigar_cpu_core_count(sigar_t *sigar) { #if defined(SIGAR_HAS_CPUID) sigar_cpuid_t id; if (sigar->lcpu == -1) { sigar->lcpu = 1; sigar_cpuid(0, &id); if ((id.ebx == INTEL_ID) || (id.ebx == AMD_ID)) { sigar_cpuid(1, &id); if (id.edx & (1<<28)) { ...
false
false
false
false
false
0
operator()(FWObject *a, FWObject *b) { FWObject *o1 = (follow_references) ? FWReference::getObject(a) : a; FWObject *o2 = (follow_references) ? FWReference::getObject(b) : b; return o1->getName() < o2->getName(); }
false
false
false
false
false
0
etag_mutate(buffer *mut, buffer *etag) { size_t i; uint32_t h; for (h=0, i=0; i < etag->used-1; ++i) h = (h<<5)^(h>>27)^(etag->ptr[i]); buffer_reset(mut); buffer_copy_string_len(mut, CONST_STR_LEN("\"")); buffer_append_long(mut, h); buffer_append_string_len(mut, CONST_STR_LEN("\"")); return 0; }
false
false
false
false
false
0
f6s_process_lp(f6s_t *fil, int *buf, unsigned frames) { int f = fil->f; int dl = fil->dl; int dr = fil->dr; unsigned s; frames <<= 1; for(s = 0; s < frames; s += 2) { dl += (buf[s] - (dl>>12)) * f; dr += (buf[s+1] - (dr>>12)) * f; buf[s] = dl>>12; buf[s+1] = dr>>12; } fil->dl = dl; fil->dr = dr; }
false
false
false
false
false
0
klp_disable_func(struct klp_func *func) { struct klp_ops *ops; if (WARN_ON(func->state != KLP_ENABLED)) return; if (WARN_ON(!func->old_addr)) return; ops = klp_find_ops(func->old_addr); if (WARN_ON(!ops)) return; if (list_is_singular(&ops->func_stack)) { WARN_ON(unregister_ftrace_function(&ops->fops));...
false
false
false
false
false
0
_env_run_all(audio_patch_t *p, audio_channel_t *c, unsigned frames) { audio_voice_t *v = chan_get_first_voice(c); while(v) { __env_run(p, c, v, frames); v = chan_get_next_voice(v); } }
false
false
false
false
false
0
gnc_imap_clear (GncImportMatchMap *imap) { if (!imap) return; xaccAccountBeginEdit (imap->acc); /* Clear the IMAP_FRAME kvp */ kvp_frame_set_slot_path (imap->frame, NULL, IMAP_FRAME); /* Clear the bayes kvp, IMAP_FRAME_BAYES */ kvp_frame_set_slot_path (imap->frame, NULL, IMAP_FRAME_BAYES); ...
false
false
false
false
false
0
_dispatch(omniCallHandle& _handle) { const char* op = _handle.operation_name(); if( omni::strMatch(op, "_get_def_search_card") ) { _0RL_cd_6b2f9da8b63bbcbb_01000000 _call_desc(_0RL_lcfn_6b2f9da8b63bbcbb_11000000, "_get_def_search_card", 21, 1); _handle.upcall(this,_call_desc); return 1; } if...
false
false
false
false
false
0
base_clear() { while(listSize) base_erase(afterLast->next); }
false
false
false
false
true
1
bu_longlong(const char *p, const formatdef *f) { #ifdef HAVE_LONG_LONG PY_LONG_LONG x = 0; Py_ssize_t i = f->size; const unsigned char *bytes = (const unsigned char *)p; do { x = (x<<8) | *bytes++; } while (--i > 0); /* Extend the sign bit. */ if (SIZEOF_LONG_LONG > f->size) ...
false
false
false
false
false
0
test_lf_alloc(void *arg) { int m= (*(int *)arg)/2; int32 x,y= 0; LF_PINS *pins; if (with_my_thread_init) my_thread_init(); pins= lf_alloc_get_pins(&lf_allocator); for (x= ((int)(intptr)(&m)); m ; m--) { TLA *node1, *node2; x= (x*m+0x87654321) & INT_MAX32; node1= (TLA *)lf_alloc_new(p...
false
false
false
false
false
0
_folks_backends_tp_backend_store_removed_cb (FolksBackendsTpBackend* self, FolksPersonaStore* store) { FolksPersonaStore* _tmp0_ = NULL; g_return_if_fail (self != NULL); g_return_if_fail (store != NULL); _tmp0_ = store; _folks_backends_tp_backend_remove_store (self, _tmp0_, TRUE); }
false
false
false
false
false
0
gx1_frame_buffer_size(void) { void __iomem *mc_regs; u32 bank_cfg; int d; unsigned dram_size = 0, fb_base; mc_regs = ioremap(gx1_gx_base() + 0x8400, 0x100); if (!mc_regs) return -ENOMEM; /* Calculate the total size of both DIMM0 and DIMM1. */ bank_cfg = readl(mc_regs + MC_BANK_CFG); for (d = 0; d < 2; d+...
false
false
false
false
false
0
rgba_to_packed( FL_IMAGE * im ) { int npix, i; FL_PACKED *p; unsigned char *r, *g, *b, *a; r = im->red[ 0 ]; g = im->green[ 0 ]; b = im->blue[ 0 ]; a = im->alpha[ 0 ]; p = im->packed[ 0 ]; for ( i = 0, npix = im->w * im->h; ...
false
false
false
false
false
0
GetChatUserList() { int iuser_list_length = 0;; if(User_list) { vm_free(User_list); User_list = NULL; } if(!Socket_connected) return NULL; Curruser = Firstuser; while(Curruser) { iuser_list_length += strlen(Curruser->nick_name)+1; Curruser = Curruser->next; } Curruser = Firstuser; User_list = (cha...
false
false
false
false
false
0
getLongestEntryLength(const SubtargetFeatureKV *Table, size_t Size) { size_t MaxLen = 0; for (size_t i = 0; i < Size; i++) MaxLen = std::max(MaxLen, std::strlen(Table[i].Key)); return MaxLen; }
false
false
false
false
false
0
print_layer_info( FILE *info_fp, Module_table *module_head, Module_hmdf_information *module_hmdf_info_list ) { Module_table *mpt, *cp_mpt; Module_hmdf_information *m_hmdf_info, *cp_m_hmdf_info; Inline_information *inline_info; char *cha0; Hmdf_table *shmdf; for( mpt = module_h...
false
false
false
false
false
0
fldstd(field_t field) { const double missval = field.missval; double rvar, rstd; rvar = fldvar(field); if ( DBL_IS_EQUAL(rvar, missval) || rvar < 0 ) { rstd = missval; } else { rstd = IS_NOT_EQUAL(rvar, 0) ? sqrt(rvar) : 0; } return (rstd); }
false
false
false
false
false
0
midnamecmp(const void *str1, const void *str2, size_t size){ int res, matches = 0, missing=0; double raw = 0; char* delim=" "; char *name1 = (char*)malloc(size); char *name2 = (char*)malloc(size); char *n1, *n2, *n1_last, *n2_last; int num_names_1=0, num_names_2=0; memcpy(name1, (char*)s...
false
true
false
false
false
1
ContinueSSL() { LOG(LS_INFO) << "ContinueSSL"; ASSERT(state_ == SSL_CONNECTING); // Clear the DTLS timer Thread::Current()->Clear(this, MSG_TIMEOUT); int code = (role_ == SSL_CLIENT) ? SSL_connect(ssl_) : SSL_accept(ssl_); int ssl_error; switch (ssl_error = SSL_get_error(ssl_, code)) { case SSL_ERRO...
false
false
false
false
false
0
createPic(const VehicleType& vt, ASCString filePath) { Surface s = Surface::createSurface(100, 100, 32, 0xf8f4f0); vt.paint( s, SPoint(0,0)); convert(constructImgFileName(vt), s, filePath ); return (constructImgPath(vt, RELATIVEIMGPATH)) ; }
false
false
false
false
false
0
sec_pkcs12_decoder_safe_contents_init_decode(SEC_PKCS12DecoderContext *p12dcx, PRBool nestedSafe) { sec_PKCS12SafeContentsContext *safeContentsCtx = NULL; const SEC_ASN1Template *theTemplate; if(!p12dcx || p12dcx->error) { return NULL; } /* allocate a new safeContents list or grow the e...
false
false
false
false
false
0
Collect(const WordReference& wordRef) { WordCursor *search = Cursor(wordRef.Key(), HTDIG_WORDLIST_COLLECTOR); if(search->Walk() != OK) return 0; List* result = search->GetResults(); delete search; return result; }
false
false
false
false
false
0
flush_window() { if (outcnt == 0) return; updcrc(window, outcnt); if (!test) { write_buf(ofd, (char *)window, outcnt); } bytes_out += (ulg)outcnt; outcnt = 0; }
false
false
false
false
false
0
bfa_fcs_lport_fdmi_init(struct bfa_fcs_lport_ms_s *ms) { struct bfa_fcs_lport_fdmi_s *fdmi = &ms->fdmi; fdmi->ms = ms; if (ms->port->fcs->fdmi_enabled) bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_offline); else bfa_sm_set_state(fdmi, bfa_fcs_lport_fdmi_sm_disabled); }
false
false
false
false
false
0
gsapi_revision(gsapi_revision_t *pr, int rvsize) { if (rvsize < sizeof(gsapi_revision_t)) return sizeof(gsapi_revision_t); pr->product = gs_product; pr->copyright = gs_copyright; pr->revision = gs_revision; pr->revisiondate = gs_revisiondate; return 0; }
false
false
false
false
false
0
wrapText(const wxString& text, size_t maxWidth, size_t indent) { wxString indentStr; bool eol(false); wxString wrappedText; wxString line; wxString::const_iterator lastSpace = text.end(); wxString::const_iterator lineStart = text.begin(); for (wxString::const_iterator it = lineStart; ; ++it...
false
false
false
false
false
0
_cleanup() { if (locks) { struct shmid_ds buf; int shmid = locks->_shmid; if (shmctl(shmid, IPC_STAT, &buf) == 0) if (buf.shm_nattch == 1) { int i; for (i = 0; i < locks->_nbuf; i++) semctl(locks->_sbufs[i]._semid, 0, IPC_RMID, NULL); shmctl(shmid, IPC_RMID, 0); } shmdt(l...
false
false
false
false
false
0
gpt_mknew_pmbr(struct fdisk_context *cxt) { struct gpt_legacy_mbr *pmbr = NULL; int rc; if (!cxt || !cxt->firstsector) return -ENOSYS; if (fdisk_has_protected_bootbits(cxt)) rc = fdisk_init_firstsector_buffer(cxt, 0, MBR_PT_BOOTBITS_SIZE); else rc = fdisk_init_firstsector_buffer(cxt, 0, 0); if (rc) retu...
false
false
false
false
false
0
ReplayTileEvent( const HistEvent &event, MapWindow *mapwin ) { MapView *mv = mapwin->GetMapView(); Map *map = mv->GetMap(); Point pos( event.data[1], event.data[2] ); if ( mv->Enabled() ) { const TerrainType *tt = Gam->GetMission()->GetTerrainSet().GetTerrainInfo( event.data[0] ); mapwin->DisplayHex( p...
false
false
false
false
false
0
characters( const QString & ch ) { QString ch_simplified = ch.simplified(); if( ch_simplified.isEmpty() ) { return true; } switch( _state ) { case StateName: _base->setModelName( ch_simplified ); break; case StateDisposition: { QStringList li = ch_simplified.split( " " ); GenericMapDisposition::Disposi...
false
false
false
false
false
0
aarch64_is_extend_from_extract (enum machine_mode mode, rtx mult_imm, rtx extract_imm) { HOST_WIDE_INT mult_val, extract_val; if (! CONST_INT_P (mult_imm) || ! CONST_INT_P (extract_imm)) return false; mult_val = INTVAL (mult_imm); extract_val = INTVAL (extract_imm); if (extract_val > 8 && ext...
false
false
false
false
false
0
permute(struct csa *csa) { int i, j, tmp; for (i = 1; i < AA; i++) { j = RANDOM(i, AA); tmp = Parr[i]; Parr[i] = Parr[j]; Parr[j] = tmp; } return; }
false
false
false
false
false
0
i40e_up_complete(struct i40e_vsi *vsi) { struct i40e_pf *pf = vsi->back; int err; if (pf->flags & I40E_FLAG_MSIX_ENABLED) i40e_vsi_configure_msix(vsi); else i40e_configure_msi_and_legacy(vsi); /* start rings */ err = i40e_vsi_control_rings(vsi, true); if (err) return err; clear_bit(__I40E_DOWN, &vsi->s...
false
false
false
false
false
0
drm_fb_helper_restore_work_fn(struct work_struct *ignored) { bool ret; ret = drm_fb_helper_force_kernel_mode(); if (ret == true) DRM_ERROR("Failed to restore crtc configuration\n"); }
false
false
false
false
false
0
Efuse_PowerSwitch(struct rtw_adapter *padapter, u8 bWrite, u8 PwrState) { u8 tempval; u16 tmpV16; if (PwrState == true) { rtl8723au_write8(padapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON); /* * 1.2V Power: From VDDON with Power * Cut(0x0000h[15]), default valid */ tmpV16 = rtl8723au_read16(pada...
false
false
false
false
false
0
kmod_list_next(const struct kmod_list *list, const struct kmod_list *curr) { if (list == NULL || curr == NULL) return NULL; if (curr->node.next == &list->node) return NULL; return container_of(curr->node.next, struct kmod_list, node); }
false
false
false
false
false
0
ldup(char *s) { int i; char *n, *p; p = n = malloc(strlen(s)); for (i = 0; s[i]; i++) if (isalnum(s[i])) *(p++) = tolower(s[i]); *p = 0; return n; }
false
false
false
false
false
0
rd_monster_memory_2(void) { int r_idx; u16b tmp16u; /* Monster Memory */ rd_u16b(&tmp16u); /* Incompatible save files */ if (tmp16u > z_info->r_max) { note(format("Too many (%u) monster races!", tmp16u)); return (-1); } /* Read the available records */ for (r_idx = 0; r_idx < tmp16u; r_idx++) { s...
false
false
false
false
false
0
getSequenceTypes(const SequencePtr& seq, const string& package, const StringList& metaData, string& concreteType, string& abstractType) const { bool customType ...
false
false
false
false
false
0
pixScaleGrayRankCascade(PIX *pixs, l_int32 level1, l_int32 level2, l_int32 level3, l_int32 level4) { PIX *pixt1, *pixt2, *pixt3, *pixt4; PROCNAME("pixScaleGrayRankCascade"); if (!pixs) return (PIX ...
false
false
false
false
false
0
run_search (GtrView * view, gboolean follow) { GtkSourceBuffer *doc; GtkTextIter start_iter; GtkTextIter match_start; GtkTextIter match_end; gboolean found = FALSE; g_return_val_if_fail (GTR_IS_VIEW (view), FALSE); doc = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view))); if (!follow...
false
false
false
false
false
0
saveAllPersonalFragments(PersonalFragments* personnalFragments,gchar* filename) { FILE* file; file = FOpen(filename,"w"); if(personnalFragments == NULL) return FALSE; if(file == NULL) return FALSE; else { saveTitlePesoFrag(file); saveGroupesList(personnalFragments,file); saveAllFragmentsList(personnalF...
false
false
false
false
false
0
matrix_series_calc (NODE *l, NODE *r, int op, parser *p) { NODE *ret = aux_matrix_node(p); if (ret != NULL && starting(p)) { gretl_matrix *a = NULL; gretl_matrix *b = NULL; gretl_matrix *c = NULL; if (l->t == VEC) { a = tmp_matrix_from_series(l, p); c = a; b = r->v.m; } else { a = l->...
false
false
false
false
false
0
tg3_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *data) { struct tg3 *tp = netdev_priv(dev); bool doextlpbk = etest->flags & ETH_TEST_FL_EXTERNAL_LB; if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) { if (tg3_power_up(tp)) { etest->flags |= ETH_TEST_FL_FAILED; memset(data, 1, sizeof(u6...
false
false
false
false
false
0
emacs(int c) { el_status_t s; el_keymap_t *kp; /* Save point before interpreting input character 'c'. */ old_point = rl_point; if (isutf8(c)) { return utf8(c); } if (rl_meta_chars && ISMETA(c)) { tty_push(UNMETA(c)); return meta(); } for (kp = Map; kp->Function; kp++) ...
false
false
false
false
false
0
mmc_get_drive_cap_buf(const uint8_t *p, /*out*/ cdio_drive_read_cap_t *p_read_cap, /*out*/ cdio_drive_write_cap_t *p_write_cap, /*out*/ cdio_drive_misc_cap_t *p_misc_cap) { /* Reader */ if (p[2] & 0x01) *p_read_cap |= CDIO_DRIVE_CAP_READ_CD_R; i...
false
false
false
false
false
0
btdm_1AntWifiParaAdjust(struct rtw_adapter *padapter, u8 bEnable) { struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); struct btdm_8723a_1ant *pBtdm8723 = &pHalData->bt_coexist.halCoex8723.btdm1Ant; if (bEnable) { pBtdm8723->curWifiPara = 1; if (pBtdm8723->preWifiPara != pBtdm8723->curWifiPara) BTDM_S...
false
false
false
false
false
0
unparse(char *s) const { if (s) { const unsigned char *p = _saddr.data(); const unsigned char *q = _daddr.data(); return sprintf(s, "(%d.%d.%d.%d, %hu, %d.%d.%d.%d, %hu)", p[0], p[1], p[2], p[3], ntohs(_sport), q[0], q[1], q[2], q[3], ntohs(_dport)); } else return 0; }
false
false
false
false
false
0
ReConfigure(void) { Window root; unsigned border_width, depth; int n,m,w,h,n1,m1,x,y,i,j,k; XGetGeometry(dpy,Scr.Pager_w,&root,&x,&y, (unsigned *)&window_w,(unsigned *)&window_h, &border_width,&depth); n1 = Scr.Vx/Scr.MyDisplayWidth; m1 = Scr.Vy/Scr.MyDisplayHeight; n = (Scr.VxMax)/Scr....
false
false
false
false
false
0
file_open_fasta(t_TEXT *Text, char* c_file, size_t begin){ Text->f_in = fopen(c_file, "r"); if(!Text->f_in) perror ("open_fasta"); fseek (Text->f_in, 0, SEEK_END); Text->length = ftell (Text->f_in); Text->c_buffer = (int8*) malloc((Text->length+PREFIX_SIZE) * sizeof(int8)); fseek (Text->f_in , begin , SEE...
false
true
false
false
true
1
p_bool_xor_imp(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) { BoolVar b0 = s.arg2BoolVar(ce[0]); BoolVar b1 = s.arg2BoolVar(ce[1]); BoolVar b2 = s.arg2BoolVar(ce[2]); clause(s, BOT_OR, BoolVarArgs()<<b0<<b1, BoolVarArgs()<<b2, 1, s.ann2icl(ann)); clause(s, BOT_OR, Bool...
false
false
false
false
false
0
getParent () const { if (value->parent) return Logger (value->parent.get ()); else { value->getLogLog().error(LOG4CPLUS_TEXT("********* This logger has no parent: " + getName())); return *this; } }
false
false
false
false
false
0
DecodePALIGNRMask(MVT VT, unsigned Imm, SmallVectorImpl<int> &ShuffleMask) { unsigned NumElts = VT.getVectorNumElements(); unsigned Offset = Imm * (VT.getVectorElementType().getSizeInBits() / 8); unsigned NumLanes = VT.getSizeInBits() / 128; unsigned NumLaneElts = NumElts / NumLanes; ...
false
false
false
false
false
0
newRow() { bool sort = table->isSortingEnabled(); if (sort) table->setSortingEnabled(false); appendRow(QString(), QString(), QString()); table->setCurrentCell(table->rowCount()-1, 0); table->editItem(table->currentItem()); table->setSortingEnabled(sort); }
false
false
false
false
false
0
vGet6HdrFtrInfo(FILE *pFile, ULONG ulStartBlock, const ULONG *aulBBD, size_t tBBDLen, const UCHAR *aucHeader) { ULONG *aulCharPos; UCHAR *aucBuffer; ULONG ulHdrFtrOffset, ulBeginHdrFtrInfo; size_t tHdrFtrInfoLen, tIndex, tOffset, tLen; fail(pFile == NULL || aucHeader == NULL); fail(ulStartBlock > MAX_BLOCKNUMB...
false
false
false
false
false
0
layout_color_menu_enable_cb(GtkToggleAction *action, gpointer data) { #ifdef HAVE_LCMS LayoutWindow *lw = data; if (layout_image_color_profile_get_use(lw) == gtk_toggle_action_get_active(action)) return; layout_image_color_profile_set_use(lw, gtk_toggle_action_get_active(action)); layout_util_sync_color(lw); lay...
false
false
false
false
false
0
fm_places_view_init(FmPlacesView *self) { GtkTreeViewColumn* col; GtkCellRenderer* renderer; AtkObject *obj; guint handler; if(G_UNLIKELY(!model)) { model = fm_places_model_new(); g_object_add_weak_pointer(G_OBJECT(model), (gpointer*)&model); } else g_object_ref(...
false
false
false
false
false
0
zwinkerSchritt() { if (mAugenZu >= 0) mUpdateNoetig = true; /* Hat mir mal jemand einen Pseudozufalls-Algorithmus? */ gRandSeed = (gRandSeed * 2369) % 8191; //fprintf(stderr, "%d\n", gRandSeed); if (gRandSeed < 300) { mAugenZu = gRandSeed / 60; mUpdateNoetig = true; } else mAugenZu = -1; }
false
false
false
false
false
0
uea_send_cmvs_e1(struct uea_softc *sc) { int i, ret, len; void *cmvs_ptr; const struct firmware *cmvs_fw; int ver = 1; /* we can handle v1 cmv firmware version; */ /* Enter in R-IDLE (cmv) until instructed otherwise */ ret = uea_write_cmv_e1(sc, E1_SA_CNTL, 0, 1); if (ret < 0) return ret; /* Dump firmware v...
false
false
false
false
false
0
dma_data_view_goto_key_press_event (GtkWidget *widget, GdkEventKey *event, DmaDataView *view) { g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); g_return_val_if_fail (IS_DMA_DATA_VIEW (view), FALSE); /* Close window */ if (event->keyval == GDK_KEY_Escape || event->keyval == GDK_KEY_Tab || ...
false
false
false
false
false
0
sneaking_thread_init(void) { GModule *main_module; const gchar *version_mismatch; GDestroyNotify thread_init_func = NULL; if ((version_mismatch = glib_check_version(2, 24, 0))) { gwy_debug("GLib is not >= 2.24.0; says %s", version_mismatch); return; } if (glib_check_version(2, 3...
false
false
false
false
false
0
RunScript() { try { scripts_[currentScriptNumber_-1]->Run(); if( pausingScript_ )return; StopScript(); } catch( std::runtime_error const &e ) { throw; } }
false
false
false
false
false
0
extractNumberFromFilename(const char *fname, l_int32 numpre, l_int32 numpost) { char *tail, *basename; l_int32 len, nret, num; PROCNAME("extractNumberFromFilename"); if (!fname) return ERROR_INT("fname not defined", procName, -1); ...
false
false
false
false
false
0
match_repr(MatchObject *self) { PyObject *result; PyObject *group0 = match_getslice_by_index(self, 0, Py_None); if (group0 == NULL) return NULL; result = PyUnicode_FromFormat( "<%s object; span=(%d, %d), match=%.50R>", Py_TYPE(self)->tp_name, self->mark[0], se...
false
false
false
false
false
0
eq_shape(A x, A y) { if (AR(x) != AR(y)) R 0; if (AS(x) == AS(y)) R 1; if (AS(x) == NULL || AS(y) == NULL) R 0; DO(AR(x), if (AS(x)[i] != AS(y)[i]) R 0); R 1; }
false
false
false
false
true
1
xmalloc_dump_usage_log(struct logagent *la, unsigned options) { if (NULL == xstats.user_mem) { log_warning(la, "XM user memory usage stats not configured"); } else { memusage_summary_dump_log(xstats.user_mem, la, options); } }
false
false
false
false
false
0
input_data_mixed_int16 (const guint8 * _in, gfloat * out, guint len, guint channels, gfloat max_value, guint op, guint nfft) { guint i, j, ip = 0; gint16 *in = (gint16 *) _in; gfloat v; for (j = 0; j < len; j++) { v = in[ip++] * 2 + 1; for (i = 1; i < channels; i++) v += in[ip++] * 2 + 1; ...
false
false
false
false
false
0
storech(char *buf, int i, int ch) { if (i < STRMAX) buf[i++] = ch; return (i); }
false
false
false
false
false
0
dsgw_next_html_line(FILE *f, char *line) { char *p, *incfile; int linelen; static FILE *incfp = NULL; static FILE *parentfp = NULL; static int incset_index = 0; static dsgwinclset *incsetp = NULL; if ( incfp != NULL && parentfp == f ) { /* we're in the midst of an include -- read fro...
false
false
false
false
false
0
MV_SetFrequency ( int handle, int frequency ) { VoiceNode *voice; if ( !MV_Installed ) { MV_SetErrorCode( MV_NotInstalled ); return( MV_Error ); } voice = MV_GetVoice( handle ); if ( voice == NULL ) { MV_SetErrorCode( MV_VoiceNotFound ); return( MV...
false
false
false
false
false
0
bch_journal(struct cache_set *c, struct keylist *keys, struct closure *parent) { struct journal_write *w; atomic_t *ret; if (!CACHE_SYNC(&c->sb)) return NULL; w = journal_wait_for_write(c, bch_keylist_nkeys(keys)); memcpy(bset_bkey_last(w->data), keys->keys, bch_keylist_bytes(keys)); w->data-...
false
false
false
false
false
0
getByte(unsigned char *ch) { if (fileBufPos >= fileBuf.size()) { error("unexpected end of data"); return false; } *ch = fileBuf[fileBufPos++]; return true; }
false
false
false
false
false
0
mbm_cleanup(void) { if (!mbm_enabled) return; kfree(mbm_local); kfree(mbm_total); mbm_enabled = false; }
false
false
false
false
false
0
nfs3_fill_lookup3res_error (lookup3res *res, nfsstat3 stat, struct iatt *dirstat) { memset (res, 0, sizeof (*res)); res->status = stat; if (!dirstat) { res->lookup3res_u.resfail.dir_attributes.attributes_follow = FALSE; } }
false
false
false
false
false
0
write_little_endian_uint64(FILE *f, FLAC__uint64 val) { FLAC__byte *b = (FLAC__byte*)(&val); if(is_big_endian_host_) { FLAC__byte tmp; tmp = b[7]; b[7] = b[0]; b[0] = tmp; tmp = b[6]; b[6] = b[1]; b[1] = tmp; tmp = b[5]; b[5] = b[2]; b[2] = tmp; tmp = b[4]; b[4] = b[3]; b[3] = tmp; } return flac__utils_fw...
false
false
false
false
false
0
create_description() { if ( partition_original.type == GParted::TYPE_LOGICAL ) description = _("Logical Partition") ; else description = partition_original .get_path() ; /*TO TRANSLATORS: looks like Delete /dev/hda2 (ntfs, 345 MiB) from /dev/hda */ description = String::ucompose( _("Delete %1 (%2, %3) from ...
false
false
false
false
false
0
gdl_dock_layout_build_doc (GdlDockLayout *layout) { g_return_if_fail (layout->priv->doc == NULL); xmlIndentTreeOutput = TRUE; layout->priv->doc = xmlNewDoc (BAD_CAST "1.0"); layout->priv->doc->children = xmlNewDocNode (layout->priv->doc, NULL, BAD_CAST ...
false
false
false
false
false
0
gchar_cursor() { #ifdef FEAT_MBYTE if (has_mbyte) return (*mb_ptr2char)(ml_get_cursor()); #endif return (int)*ml_get_cursor(); }
false
false
false
false
false
0
nv_vreplace(cap) cmdarg_T *cap; { # ifdef FEAT_VISUAL if (VIsual_active) { cap->cmdchar = 'r'; cap->nchar = cap->extra_char; nv_replace(cap); /* Do same as "r" in Visual mode for now */ } else # endif if (!checkclearopq(cap->oap)) { if (!curbuf->b_p_ma) EMSG(_(e_modifiable)); else { ...
false
false
false
false
false
0
test_object_raw_convert__succeed_on_oid_to_string_conversion(void) { const char *exp = "16a0123456789abcdef4b775213c23a8bd74f5e0"; git_oid in; char out[GIT_OID_HEXSZ + 1]; char *str; int i; cl_git_pass(git_oid_fromstr(&in, exp)); /* NULL buffer pointer, returns static empty string */ str = git_oid_tostr(NULL,...
true
true
false
true
false
1
g_tls_connection_gnutls_request_certificate (GTlsConnectionGnutls *self, GError **error) { GTlsInteractionResult res = G_TLS_INTERACTION_UNHANDLED; GTlsInteraction *interaction; GTlsConnection *conn; g_return_val_if_fail (G_IS_TLS_CONNECTION_GNUTLS (self), FALSE); conn = G_TLS_CONNE...
false
false
false
false
false
0
create(const AST* tr) { if (!tr) return nullAST; // create(null) == null RefAST t = create(); t->initialize(tr); return t; }
false
false
false
false
false
0
setup_shmem_window(struct pcmcia_device *link, int start_pg, int stop_pg, int cm_offset) { struct net_device *dev = link->priv; struct pcnet_dev *info = PRIV(dev); int i, window_size, offset, ret; window_size = (stop_pg - start_pg) << 8; if (window_size > 32 * 1024) window_size = 32 * 102...
false
false
false
false
false
0
fstate_src_write_xml(const output::pointer &fp, const char *name, fstate_src_ty *this_thing) { if (!this_thing) return; trace(("fstate_src_write_xml(name = \"%s\", this_thing = %08lX)\n{\n", name, (long)this_thing)); assert(name); assert(((fstate_src_ty *)this_thing)->reference_count > 0); trace(("...
false
false
false
false
false
0
moveSelectedScenes(int movement) { // Find scenes to move QModelIndexList indexes = m_filter_model->mapSelectionToSource(m_scenes->selectionModel()->selection()).indexes(); if (indexes.isEmpty()) { return; } QList<int> scenes; // Find target row int first_row = INT_MAX; int last_row = 0; int index_row = 0; ...
false
false
false
false
false
0
setFunction(QString s) { if (!_data) return false; ProfileCostArray* f = _data->search(ProfileContext::Function, s, _eventType); if (!f) return false; return setFunction((TraceFunction*)f); }
false
false
false
false
false
0
init_key_from_file(const char *fname, int generate, int severity) { crypto_pk_t *prkey = NULL; if (!(prkey = crypto_pk_new())) { log(severity, LD_GENERAL,"Error constructing key"); goto error; } switch (file_status(fname)) { case FN_DIR: case FN_ERROR: log(severity, LD_FS,"Can't read key...
false
false
false
false
false
0
u_execmem_alloc(unsigned int size) { void *addr = NULL; u_mutex_lock(exec_mutex); if (!init_map()) goto bail; /* free space check, assumes no integer overflow */ if (head + size > EXEC_MAP_SIZE) goto bail; /* allocation, assumes proper addr and size alignement */ addr = exec_mem + h...
false
false
false
false
false
0
gent_split_file(void) { hid_t fapl, fid, root, attr, space, dataset, atype; char meta[] = "this is some metadata on this file"; hsize_t dims[2]; int i, j, dset[10][15]; fapl = H5Pcreate(H5P_FILE_ACCESS); H5Pset_fapl_split(fapl, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT); fid = H5Fcreate(FI...
false
false
false
false
false
0
hmm2ij_prestate_step3_preset_node_splits(int n, int *nis_imin, int *nis_imax, int *nis_jmin, int *nis_jmax, int *nss_imin, int *nss_imax, int *nss_jmin, int *nss_jmax, int *pn_min_m, int *pn_max_m, int *pn_min_d, int *pn_max_d, CP9Map_t *cp9map) { if(cp9map->nd2lpos[n] != -1) ...
false
false
false
false
false
0
window_tab_set_title (DhWindow *window, WebKitWebView *web_view, const gchar *title) { DhWindowPriv *priv; gint num_pages, i; GtkWidget *page; GtkWidget *hbox; GtkWidget *label; GtkWidget *page_web_vi...
false
false
false
false
false
0
IsTopScroll(wxPoint p) const { wxRect itemRect; if (!m_pListCtrl->GetItemRect(m_pListCtrl->GetTopItem(), itemRect)) return false; wxRect windowRect = m_pListCtrl->GetListRect(); if (itemRect.GetHeight() > windowRect.GetHeight() / 4 ) { itemRect.SetHeight( wxMax( windowRect.GetHeight() / 4, 8 ) ); } if (p.y...
false
false
false
false
false
0
resp_hdr_cb(void *ptr, size_t size, size_t nmemb, void *user_data) { struct header_info *hi = user_data; size_t remlen, slen, ptrlen = size * nmemb; char *rem, *val = NULL, *key = NULL; void *tmp; val = cgcalloc(1, ptrlen); key = cgcalloc(1, ptrlen); tmp = memchr(ptr, ':', ptrlen); if (!tmp || (tmp == ptr)) /...
false
false
false
false
false
0
cib_connection_destroy(gpointer user_data) { if (stonith_shutdown_flag) { crm_info("Connection to the CIB closed."); return; } else { crm_notice("Connection to the CIB terminated. Shutting down."); } if (cib_api) { cib_api->cmds->signoff(cib_api); } stonith_shutdo...
false
false
false
false
false
0
ffgnxk( fitsfile *fptr, /* I - FITS file pointer */ char **inclist, /* I - list of included keyword names */ int ninc, /* I - number of names in inclist */ char **exclist, /* I - list of excluded keyword names */ int nexc, ...
false
false
false
false
false
0