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
strscan_peek(VALUE self, VALUE vlen) { struct strscanner *p; long len; GET_SCANNER(self, p); len = NUM2LONG(vlen); if (EOS_P(p)) return infect(str_new(p, "", 0), p); if (p->curr + len > S_LEN(p)) len = S_LEN(p) - p->curr; return extract_beg_len(p, p->curr, len); }
false
false
false
false
false
0
pycann_neuron_internal(pycann_t *net, unsigned int i) { unsigned int j; pycann_float_t o, u, v, w, dw, m, mw, t; t = net->thresholds[i]; // propagation if (i<net->num_inputs) { o = net->inputs[i]; } else { u = net->activations[i]; o = 0.0; mw = net->mod_weights[i]; m = (*net->mod_neu...
false
false
false
false
false
0
L14__BREAK_HELP__clcs_top_patches() {register object *base=vs_base; register object *sup=base+VM14; VC14 vs_check; vs_top=sup; goto TTL; TTL:; base[0]= (((object)VV[41])->s.s_dbind); base[1]= ((object)VV[70]); vs_top=(vs_base=base+0)+2; Lformat(); vs_top=sup; vs_base=vs_top=base+0; vs_base[0]=Cnil; return; ...
false
false
false
false
false
0
decode_hazmat(unsigned char *element, int element_len) { /* 0x0300 - HAZMAT (UN ID in lower 14 bits) */ int un_id; if (element_len < 2) { lprintf(T_OPENTRAC, "HAZMAT: Unknown Material\r\n"); } else { un_id = get16(element) & 0x3fff; lprintf(T_OPENTRAC, "HAZMAT: UN%04d\r\n", un_id); } return 0; }
false
false
false
false
false
0
_throttle_fini(int *active_rpc_cnt) { slurm_mutex_lock(&throttle_mutex); (*active_rpc_cnt)--; pthread_cond_broadcast(&throttle_cond); slurm_mutex_unlock(&throttle_mutex); }
false
false
false
false
false
0
deleteHash(Hashtable* htable) { int32_t pos = -1; const UHashElement* element = NULL; if ( htable ) { while ( (element = htable->nextElement(pos)) != NULL ) { const UHashTok valueTok = element->value; const MessageFormat** value = (const MessageFormat**)valueTok.pointer; ...
false
false
false
false
false
0
unshift_special(cap) cmdarg_T *cap; { switch (cap->cmdchar) { case K_S_RIGHT: cap->cmdchar = K_RIGHT; break; case K_S_LEFT: cap->cmdchar = K_LEFT; break; case K_S_UP: cap->cmdchar = K_UP; break; case K_S_DOWN: cap->cmdchar = K_DOWN; break; case K_S_HOME: cap->cmdchar = K_HOME; break; case K_S_END: cap...
false
false
false
false
false
0
build_predikt_table(int pos){ int b1, b2; double tt = pos_2_tt(pos); build_exptteig(tt); akt_slopes = slopes[pos] = (di_pml_matrix *) calloc(sizeof(di_pml_matrix), 1); akt_curves = curves[pos] = (di_pml_matrix *) calloc(sizeof(di_pml_matrix), 1); akt_infs = infs[pos] = (di_bool_matri...
false
false
false
false
false
0
gdm_wimax_cleanup_ioctl(struct net_device *dev) { struct nic *nic = netdev_priv(dev); int i; for (i = 0; i < SIOC_DATA_MAX; i++) kdelete(&nic->sdk_data[i].buf); }
false
false
false
false
false
0
_gss_ntlm_wrap (OM_uint32 * minor_status, gss_const_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, const gss_buffer_t input_message_buffer, int * conf_state, gss_buffer_t output_message_buffer ) { ntlm_ctx ctx = (ntlm_ctx)context_handle; OM_uint32 ret; *minor_status = 0; if (c...
false
false
false
false
false
0
remove_handler (int signum, ACE_Sig_Action *new_disp, ACE_Sig_Action *old_disp, int sigkey) { ACE_TRACE ("ACE_Sig_Handlers::remove_handler"); ACE_MT (ACE_Recursive_Thread_Mutex *lock = ACE_Managed_Object<ACE_Re...
false
false
false
false
false
0
manager_set_system_idle_hint (CkManager *manager, gboolean idle_hint) { if (manager->priv->system_idle_hint != idle_hint) { manager->priv->system_idle_hint = idle_hint; /* FIXME: can we get a time from the dbus message? */ g_get_cu...
false
false
false
false
false
0
ApplyOCSTransformer( OGRGeometry *poGeometry ) { if( oStyleProperties.count("210_N.dX") == 0 || oStyleProperties.count("220_N.dY") == 0 || oStyleProperties.count("230_N.dZ") == 0 ) return; if( poGeometry == NULL ) return; double adfN[3]; adfN[0] = CPLAtof(oStyleProper...
false
false
false
false
false
0
parse(Array *arr, Gfx *gfx) { GfxPatternColorSpace *cs; GfxColorSpace *underA; Object obj1; if (arr->getLength() != 1 && arr->getLength() != 2) { error(-1, "Bad Pattern color space"); return NULL; } underA = NULL; if (arr->getLength() == 2) { arr->get(1, &obj1); if (!(underA = GfxColorSpa...
false
false
false
false
false
0
CZipReader(IReadFile* file, bool ignoreCase, bool ignorePaths, bool isGZip) : CFileList((file ? file->getFileName() : io::path("")), ignoreCase, ignorePaths), File(file), IsGZip(isGZip) { #ifdef _DEBUG setDebugName("CZipReader"); #endif if (File) { File->grab(); // load file entries if (IsGZip...
false
false
false
false
false
0
MarkMapContents(Map* map) { MarkDescriptorArray(reinterpret_cast<DescriptorArray*>( *HeapObject::RawField(map, Map::kInstanceDescriptorsOffset))); // Mark the Object* fields of the Map. // Since the descriptor array has been marked already, it is fine // that one of these fields contains a pointer to it....
false
false
false
false
true
1
VisitSharedFunctionInfoFields(Heap* heap, HeapObject* object, bool flush_code_candidate) { VisitPointer(heap, SLOT_ADDR(object, SharedFunctionInfo::kNameOffset)); if (!flush_code_candidate) { VisitPointer(heap, SLOT_A...
false
false
false
false
false
0
test_array_append_zero_terminated () { GArray *array = g_array_new (TRUE, FALSE, sizeof (int)); int v; v = 27; g_array_append_val (array, v); if (27 != g_array_index (array, int, 0)) return FAILED ("g_array_append_val failed"); if (0 != g_array_index (array, int, 1)) return FAILED ("zero_terminated didn't ...
false
false
false
false
false
0
ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar, enum ieee80211_band band, const struct cfg80211_bitrate_mask *mask, int *nss) { struct ieee80211_supported_band *sband = &ar->mac.sbands[band]; u16 vht_mcs_map = le16_to_cpu(sband->vht_cap.vht_mcs.tx_mcs_map); u8 ht_nss_mask =...
false
false
false
false
false
0
arg_assoc_class (struct arg_lookup *k, tree type) { tree list, friends, context; int i; /* Backend build structures, such as __builtin_va_list, aren't affected by all this. */ if (!CLASS_TYPE_P (type)) return false; if (purpose_member (type, k->classes)) return false; k->classes = tree_con...
false
false
false
false
true
1
rsvg_css_parse_color (const char *str, gboolean * inherit) { gint val = 0; SETINHERIT (); if (str[0] == '#') { int i; for (i = 1; str[i]; i++) { int hexval; if (str[i] >= '0' && str[i] <= '9') hexval = str[i] - '0'; else if (str[i] >= 'A'...
false
false
false
false
false
0
L2() {register object *base=vs_base; register object *sup=base+VM2; VC2 vs_reserve(VM2); ihs_check; {object V9; object V10; check_arg(2); V9=(base[0]); V10=(base[1]); vs_top=sup; goto TTL; TTL:; base[2]=symbol_function(((object)VV[27])); base[3]= (V9); base[4]= (V10); vs_top=(vs_base=base+3)+2; funcall_w...
false
false
false
false
false
0
r_byte(arg) struct load_arg *arg; { int c; if (TYPE(arg->src) == T_STRING) { if (RSTRING(arg->src)->len > arg->offset) { c = (unsigned char)RSTRING(arg->src)->ptr[arg->offset++]; } else { rb_raise(rb_eArgError, "marshal data too short"); } } else { VALUE src = arg->src; VALUE v = rb...
false
false
false
false
true
1
gfxw_new_view(gfx_state_t *state, point_t pos, int view_nr, int loop, int cel, int palette, int priority, int control, gfx_alignment_t halign, gfx_alignment_t valign, int flags) { gfxw_view_t *view; if (flags & GFXW_VIEW_FLAG_DONT_MODIFY_OFFSET) { int foo; point_t offset; gfxop_get_cel_parameters(state,...
false
false
false
false
false
0
FMsave_state_channel(const char *name,int num,FM_CH *CH,int num_ch) { int slot , ch; char state_name[20]; const char slot_array[4] = { 1 , 3 , 2 , 4 }; for(ch=0;ch<num_ch;ch++,CH++) { /* channel */ sprintf(state_name,"%s.CH%d",name,ch); state_save_register_INT32(state_name, num, "feedback" , CH->o...
false
false
false
false
false
0
usb_stor_access_xfer_buf(unsigned char *buffer, unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **sgptr, unsigned int *offset, enum xfer_buf_dir dir) { unsigned int cnt = 0; struct scatterlist *sg = *sgptr; struct sg_mapping_iter miter; unsigned int nents = scsi_sg_count(srb); if (sg) nents = s...
false
false
false
false
false
0
gs_manager_deactivate (GSManager *manager) { g_return_val_if_fail (manager != NULL, FALSE); g_return_val_if_fail (GS_IS_MANAGER (manager), FALSE); if (! manager->priv->active) { gs_debug ("Trying to deactivate a screensaver that is not active"); return FALSE; ...
false
false
false
false
false
0
hpt37x_pre_reset(struct ata_link *link, unsigned long deadline) { struct ata_port *ap = link->ap; struct pci_dev *pdev = to_pci_dev(ap->host->dev); static const struct pci_bits hpt37x_enable_bits[] = { { 0x50, 1, 0x04, 0x04 }, { 0x54, 1, 0x04, 0x04 } }; if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->...
false
false
false
false
false
0
cryptd_aead_crypt(struct aead_request *req, struct crypto_aead *child, int err, int (*crypt)(struct aead_request *req)) { struct cryptd_aead_request_ctx *rctx; crypto_completion_t compl; rctx = aead_request_ctx(req); compl = rctx->complete; if (unlikely(err == -EINPROGRESS)) goto out; aead_request_se...
false
false
false
false
true
1
lv_add_split_to_lot_cb (GtkWidget *widget, GNCLotViewer * lv) { Split *split; if ( NULL == lv->selected_lot ) return; split = lv_get_selected_split(lv, lv->split_free_view); if ( NULL == split ) return; xaccAccountBeginEdit(lv->account); gnc_lot_add_split(lv->selected_lot, split); xaccAcco...
false
false
false
false
false
0
ftrace_find_tramp_ops_any(struct dyn_ftrace *rec) { struct ftrace_ops *op; unsigned long ip = rec->ip; do_for_each_ftrace_op(op, ftrace_ops_list) { if (!op->trampoline) continue; if (hash_contains_ip(ip, op->func_hash)) return op; } while_for_each_ftrace_op(op); return NULL; }
false
false
false
false
false
0
make_dtu_parameter_table(Bus_state bus_state, int mtg_id) { int i; Dtu_parameter *param, dummy_param; #ifdef SCHEDULER_MODE insert_check_to_next_transfer(bus_state); #endif #ifdef DEBUG_BUSSIM print_bus_state(bus_state); #endif /* DEBUG_BUSSIM */ dummy_param.next = NULL; param = &dummy_param; ...
false
false
false
false
false
0
tomoyo_write_control(struct tomoyo_io_buffer *head, const char __user *buffer, const int buffer_len) { int error = buffer_len; size_t avail_len = buffer_len; char *cp0 = head->write_buf; int idx; if (!head->write) return -ENOSYS; if (!access_ok(VERIFY_READ, buffer, buffer_len)) return -EFAULT; if (mu...
false
false
false
false
false
0
kadm5_free_config_params(krb5_context context, kadm5_config_params *params) { if (params == NULL) return 0; free(params->dbname); free(params->mkey_name); free(params->stash_file); free(params->keysalts); free(params->admin_server); free(params->dict_file); free(params->acl_file)...
false
false
false
false
false
0
do_create_dsns (PCONFIG pCfg, PCONFIG pInfCfg, LPSTR szDriver, LPSTR szDSNS, LPSTR szDiz) { char *szValue = strdup (szDSNS), *szCurr = szValue, *szComma; int hasMore = FALSE; BOOL retcode = FALSE; do { szComma = strchr (szCurr, ','); if (szComma) { *szComma = 0; hasMore = TRUE; } ...
false
false
false
false
false
0
IsSafeComputationToRemove(Value *V, const TargetLibraryInfo *TLI) { do { if (isa<Constant>(V)) return true; if (!V->hasOneUse()) return false; if (isa<LoadInst>(V) || isa<InvokeInst>(V) || isa<Argument>(V) || isa<GlobalValue>(V)) return false; if (isAllocationFn(V, TLI)) ...
false
false
false
false
false
0
in_core_list(int ii,int* core_list) { int i; int in=0; for (i=0;i<8;i++) { if (ii == core_list[i]) { in=1; break; } } return(in); }
false
false
false
false
false
0
module_dowork(const char *name, const char *unused, char *realdir, int rlen) { int upriv; gid_t gid; struct stat st; if( ! name || strlen( name ) > NAME_MAX ) return 0; module_dir( realdir, rlen, name ); if( ag_conf.fastmode && ! stat( realdir, &st ) ) return 1; if( ! get_group_info( name, &gid ) ) ...
false
false
false
false
false
0
rtl_hw_start_8168e_2(struct rtl8169_private *tp) { void __iomem *ioaddr = tp->mmio_addr; struct pci_dev *pdev = tp->pci_dev; static const struct ephy_info e_info_8168e_2[] = { { 0x09, 0x0000, 0x0080 }, { 0x19, 0x0000, 0x0224 } }; rtl_csi_access_enable_1(tp); rtl_ephy_init(tp, e_info_8168e_2, ARRAY_SIZE(e_in...
false
false
false
false
false
0
mouse_scroll_mapcanvas(GtkWidget *w, GdkEventScroll *ev) { int scroll_x, scroll_y, xstep, ystep; if (!can_client_change_view()) { return FALSE; } get_mapview_scroll_pos(&scroll_x, &scroll_y); get_mapview_scroll_step(&xstep, &ystep); switch (ev->direction) { case GDK_SCROLL_UP: scroll_y -= y...
false
false
false
false
false
0
write_begin_slow(struct address_space *mapping, loff_t pos, unsigned len, struct page **pagep, unsigned flags) { struct inode *inode = mapping->host; struct ubifs_info *c = inode->i_sb->s_fs_info; pgoff_t index = pos >> PAGE_CACHE_SHIFT; struct ubifs_budget_req req = { .new_page = 1 }; int uninitiali...
false
false
false
false
true
1
ossl_sslctx_get_session_cache_size(VALUE self) { SSL_CTX *ctx; Data_Get_Struct(self, SSL_CTX, ctx); return LONG2NUM(SSL_CTX_sess_get_cache_size(ctx)); }
false
false
false
false
false
0
ldns_get_rr_list_hosts_frm_file(char *filename) { ldns_rr_list *names; FILE *fp; if (!filename) { fp = fopen(LDNS_RESOLV_HOSTS, "r"); } else { fp = fopen(filename, "r"); } if (!fp) { return NULL; } names = ldns_get_rr_list_ho...
false
false
false
false
true
1
primitive() const { vnl_vector<double> c = coefficients(); int d = degree(); vnl_vector<double> cd (d+2); for (int i=0; i<=d; ++i) cd[i] = c[i] / (d-i+1); cd[d+1] = 0.0; return vnl_real_polynomial(cd); }
false
false
false
false
false
0
SocksNegotiate(RTMP * r) { struct sockaddr_in service; memset(&service, 0, sizeof(struct sockaddr_in)); add_addr_info(&service, r->Link.hostname, r->Link.port); unsigned long addr = htonl(service.sin_addr.s_addr); char packet[] = { 4, 1, // SOCKS 4, connect (r->Link.port >> 8) & 0xFF, (r->Link...
false
false
false
false
false
0
gnm_sinpi (gnm_float x) { int k; if (gnm_isnan (x)) return x; if (!gnm_finite (x)) return gnm_nan; k = (x < 0) ? 2 : 0; x = gnm_fmod (gnm_abs (x), 2); if (x >= 1) { x -= 1; k ^= 2; } if (x >= 0.5) { x -= 0.5; k += 1; } if (x == 0) { static const gnm_float ys[4] = { 0, 1, -0, -1 }; return ys...
false
false
false
false
false
0
hash_value(const APInt &Arg) { if (Arg.isSingleWord()) return hash_combine(Arg.VAL); return hash_combine_range(Arg.pVal, Arg.pVal + Arg.getNumWords()); }
false
false
false
false
false
0
inf_session_set_user_status(InfSession* session, InfUser* user, InfUserStatus status) { InfSessionPrivate* priv; xmlNodePtr xml; g_return_if_fail(INF_IS_SESSION(session)); g_return_if_fail(INF_IS_USER(user)); g_return_if_fail(inf_session_get_status(sess...
false
false
false
false
false
0
unknownStyleKeyword(const Identifier *ident, Interpreter &interp, const Location &loc) const { interp.setNextLocation(loc); StringC tem(ident->name()); tem += Char(':'); interp.message(InterpreterMessages::invalidStyleKeyword, StringMessageArg(tem)); }
false
false
false
false
false
0
newName(But *but, const char *text) { AbutFsel *f = but_packet(but); assert(MAGIC(f)); if (f->callback) { f->callback(f, f->packet, text); f->callback = NULL; } butWin_destroy(f->win); return(0); }
false
false
false
false
false
0
TraverseOrderedGroup(GF_Node *node, void *rs, Bool is_destroy) { u32 i, count; struct og_pos *priorities; Bool invalidate_backup; OrderedGroupStack *stack = (OrderedGroupStack *) gf_node_get_private(node); M_OrderedGroup *og = (M_OrderedGroup *) node; GF_TraverseState *tr_state = (GF_TraverseState *)rs; if (is_...
false
false
false
false
false
0
setCaption(const std::string& caption) { capwidth = 0.0; this->caption = caption; if(caption.size()) { capwidth = font.getWidth(caption.c_str()); } }
false
false
false
false
false
0
Reset(wxSheetSelectionIter_Type type) { m_block_index = -1; if (m_type != type) { m_type = type; if (type == wxSSI_REVERSE) m_blocks.Sort(wxsheetcellblock_sort_bottomright_topleft); else m_blocks.Sort(wxsheetcellblock_sort_topleft_bottomrig...
false
false
false
false
false
0
do_proc_dointvec_minmax_conv(bool *negp, unsigned long *lvalp, int *valp, int write, void *data) { struct do_proc_dointvec_minmax_conv_param *param = data; if (write) { int val = *negp ? -*lvalp : *lvalp; if ((param->min && *param->min > val) || (param->max && *param->max < val)) return -EINVAL...
false
false
false
false
false
0
if_sdio_power_restore(struct lbs_private *priv) { struct if_sdio_card *card = priv->card; int r; /* Make sure the card will not be powered off by runtime PM */ pm_runtime_get_sync(&card->func->dev); r = if_sdio_power_on(card); if (r) return r; wait_event(card->pwron_waitq, priv->fw_ready); return 0; }
false
false
false
false
false
0
array_free(t_array *x) { int i; t_template *scalartemplate = template_findbyname(x->a_templatesym); gstub_cutoff(x->a_stub); for (i = 0; i < x->a_n; i++) { t_word *wp = (t_word *)(x->a_vec + x->a_elemsize * i); word_free(wp, scalartemplate); } freebytes(x->a_vec, x->a_elemsiz...
false
false
false
false
false
0
khtmlMalformedQualifiedName(const DOMString &name) { // #### see XML Namespaces spec for possibly more // ### does this disctinction make sense? if (name.isNull()) return true; if (name.isEmpty()) return false; // a prefix is optional but both prefix as well as local part // cannot be empty ...
false
false
false
false
false
0
ShowAttributes(const uint32_t partNum) { uint32_t bitNum; bool bitset; for (bitNum = 0; bitNum < 64; bitNum++) { bitset = (UINT64_C(1) << bitNum) & attributes; if (bitset) { cout << partNum+1 << ":" << bitNum << ":" << bitset << " (" << GetAttributeName(bitNum) << ")" << endl; ...
false
false
false
false
false
0
update_roland_altsetting(struct snd_usb_midi *umidi) { struct usb_interface *intf; struct usb_host_interface *hostif; struct usb_interface_descriptor *intfd; int is_light_load; intf = umidi->iface; is_light_load = intf->cur_altsetting != intf->altsetting; if (umidi->roland_load_ctl->private_value == is_light_lo...
false
false
false
false
true
1
tdb_allocate(TDB_CONTEXT *tdb, tdb_len length, struct list_struct *rec) { tdb_off rec_ptr, last_ptr, newrec_ptr; struct list_struct newrec; memset(&newrec, '\0', sizeof(newrec)); if (tdb_lock(tdb, -1, F_WRLCK) == -1) return 0; /* Extra bytes required for tailer */ length += sizeof(tdb_off); again: ...
false
false
false
false
false
0
UpdateOutputInformation() { ModifiedTimeType t1, t2; DataObject * input; DataObject * output; /** * Watch out for loops in the pipeline */ if ( m_Updating ) { /** * Since we are in a loop, we will want to update. But if * we don't modi...
false
false
false
false
false
0
OnWizEvent(wxWizardExEvent& event) { // the dialogs have wxWS_EX_BLOCK_EVENTS style on by default but we want to // propagate wxEVT_WIZARD_XXX to the parent (if any), so do it manually if ( !(GetExtraStyle() & wxWS_EX_BLOCK_EVENTS) ) { // the event will be propagated anyhow event.Skip();...
false
false
false
false
false
0
setAppearanceState(char *state) { if (!state) return; if (appearState && appearState->cmp(state) == 0) return; delete appearState; appearState = new GooString(state); Object obj1; obj1.initName(state); update ("AS", &obj1); // The appearance state determines the current appearance stream O...
false
false
false
false
false
0
intern_array (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr, unw_word_t table_len, unw_word_t **table_data, void *arg) { unw_word_t i, *data = calloc (table_len, WSIZE); int ret = 0; if (!data) { ret = -UNW_ENOMEM; goto out; } for (i = 0; i < table_len; ++i) i...
false
false
false
false
false
0
listDirectory(){ int i = 0; for(i = 0; i < MAX_DEVICE; i++){ if(device_array[i].bits & DEVICE_INIT_BITMASK && device_array[i].bits & DEVICE_FORMAT_BITMASK && device_array[i].bits & DEVICE_MOUNTED_BITMASK){ printf("Listing device %c\n", device_array[i].fs_name); ...
false
false
false
false
false
0
saveEntry( Entry &entry ) const { entry.clearValue( "kolabInvitationPolicy" ); for ( int i = 0; i < mModel->rowCount(); ++i ) { QStringList pair = mModel->data( mModel->index( i, 0 ), Qt::UserRole ).toStringList(); if ( pair[ 0 ] == "anyone" ) entry.addValue( "kolabInvitationPolicy", pair[ 1 ] ); ...
false
false
false
false
false
0
DestroyCnxns (CNet* nets) { for (CNet* nw = nets->First(); nw != nets->End(); nw = nw->Next()) { CCnxn* cnxn = nw->Cnxn(); CSolverInfo* lbinfo = cnxn->_lbConn->_csinfo; CSolverInfo* rtinfo = cnxn->_rtConn->_csinfo; delete lbinfo; delete rtinfo; cnxn->_lbConn->_csinfo ...
false
false
false
false
false
0
DeInitPlugins() { CPluginObject * plugin = 0; while ( (plugin = m_pPluginList->Next(0)) != 0 ) { plugin->m_ePluginStruct->deinit(); #ifndef WIN32 dlclose(plugin->m_Handle); #else FreeLibrary(plugin->m_Handle); #endif m_pPluginList->Remove(plugin); delete plugin; } }
false
false
false
false
false
0
SQLNumParams_Internal (SQLHSTMT hstmt, SQLSMALLINT * pcpar) { STMT (pstmt, hstmt); HPROC hproc; SQLRETURN retcode; /* check argument */ if (!pcpar) { return SQL_SUCCESS; } /* check state */ if (pstmt->asyn_on == en_NullProc) { switch (pstmt->state) { case en_stmt_allocated: ca...
false
false
false
false
false
0
scanlineTriangle(const Vertex vt[3], int dir) { // Indeces specify requred order static const int idx1[3] = { 0, 1, 2}; static const int idx2[3] = { 2, 0, 1}; const int *idx; int l0, r0; if (dir == UP_DOWN) { idx = idx1; l0 = r0 = 0; } else { idx = idx2; l0 =...
false
false
false
false
false
0
findFile(const string file, const ClustalWResourcePathType where) const { const string *path; ifstream ifs; switch (where) { case InstallPath: path = &installPath; break; case ExecutablePath: path = &executablePath; break; case H...
false
false
false
false
true
1
db_d_open_database(void) { dbHandle handle; int stat; /* get the arg(s) */ db_init_handle(&handle); DB_RECV_HANDLE(&handle); /* see if there is a database already open */ if (db__test_database_open()) { db_error("Multiple open databases not allowed"); DB_SEND_FAILURE(); return DB_OK; ...
false
false
false
false
false
0
ppc32_jit_tcb_free_code_chunks(cpu_ppc_t *cpu,ppc32_jit_tcb_t *block) { int i; /* Free code pages */ for(i=0;i<PPC_JIT_MAX_CHUNKS;i++) { exec_page_free(cpu,block->jit_chunks[i]); block->jit_chunks[i] = NULL; } /* Free the current JIT buffer */ exec_page_free(cpu,block->jit_buffer); bl...
false
false
false
false
false
0
_backup_orc_audio_convert_pack_s32_float_swap (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; orc_union32 * ORC_RESTRICT ptr0; const orc_union32 * ORC_RESTRICT ptr4; orc_union32 var33; #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) volatile orc_union32 var34; #...
false
false
false
false
false
0
xmalloc (bytes) size_t bytes; { PTR_T temp; #if defined (DEBUG) if (bytes == 0) internal_warning("xmalloc: size argument is 0"); #endif FINDBRK(); temp = malloc (bytes); if (temp == 0) allocerr ("xmalloc", bytes); return (temp); }
false
false
false
false
false
0
service_ofldq(struct sge_ofld_txq *q) { u64 *pos; int credits; struct sk_buff *skb; unsigned int written = 0; unsigned int flits, ndesc; while ((skb = skb_peek(&q->sendq)) != NULL && !q->full) { /* * We drop the lock but leave skb on sendq, thus retaining * exclusive access to the state of the queue. ...
false
true
false
false
false
1
usbClaimInterface(USBDevice *dev, unsigned intf) { int result; result = usbOpen(dev, 1); if (result == 0 && ioctl(dev->fd, USBDEVFS_CLAIMINTERFACE, &intf) == -1) result = -errno; return result; }
false
false
false
false
false
0
binding_striding_parse_amount(const char* parameter) { /* striding:<amount>:<step-size>:[starting-socket,starting-core] */ if (parameter != NULL && strstr(parameter, "striding") != NULL) { /* fetch "striding:" */ if (sge_strtok(parameter, ":") != NULL) { char* amount = NULL; ...
false
false
false
false
false
0
pop_front(string & arg) { if(relative) if(dirs.size() > 1) { arg = dirs.front(); dirs.pop_front(); return true; } else return false; else if(!dirs.empty()) { ...
false
false
false
false
false
0
merge_file(const char *path) { int pos = cache_name_pos(path, strlen(path)); /* * If it already exists in the cache as stage0, it's * already merged and there is nothing to do. */ if (pos < 0) merge_entry(-pos-1, path); }
false
false
false
false
false
0
initResonances() { // pi-, pi-, pi+ decay and pi0, pi0, pi- decay. if (mode == PimPimPip || mode == Pi0Pi0Pim) DECAYWEIGHTMAX = 1.3e4; // K-, pi-, K+ decay. else if (mode == PimKmKp) DECAYWEIGHTMAX = 330; // K0, pi-, Kbar0 decay. else if (mode == PimK0bK0) DECAYWEIGHTMAX = 300; // K-, pi0, K0 decay. el...
false
false
false
false
false
0
isStartChunk(uint64_t Chunk) { if (Chunk == 0 || Chunk == UINT64_MAX) return false; return isMask_64(~Chunk); }
false
false
false
false
false
0
call_history_view_gtk_finalize (GObject* obj) { CallHistoryViewGtk* view = NULL; view = CALL_HISTORY_VIEW_GTK (obj); delete view->priv; G_OBJECT_CLASS (call_history_view_gtk_parent_class)->finalize (obj); }
false
false
false
false
false
0
Java_sun_misc_Signal_findSignal(JNIEnv *env, jclass cls, jstring name) { jint res; const char *cname = (*env)->GetStringUTFChars(env, name, 0); if (cname == NULL) { /* out of memory thrown */ return 0; } res = JVM_FindSignal(cname); (*env)->ReleaseStringUTFChars(env, name, cname)...
false
false
false
false
false
0
exec_sync_command(const gchar* command, gboolean wait4prompt, gchar** command_record) { GList *lines, *iter; result_class rc; #ifdef DEBUG_OUTPUT dbg_cbs->send_message(command, "red"); #endif /* write command to gdb input channel */ gdb_input_write_line(command); if (!wait4prompt) return RC_DONE; lines =...
false
true
true
false
false
1
getEndCellStruxFromCellSDH(pf_Frag_Strux* cellSDH) { pf_Frag * currentFrag = cellSDH; currentFrag = currentFrag->getNext(); while (currentFrag && currentFrag!=m_pPieceTable->getFragments().getLast()) { UT_return_val_if_fail (currentFrag,0); if(currentFrag->getType() == pf_Frag::PFT_Strux) { pf_Frag_Strux ...
false
false
false
false
false
0
pv_get_to_attr(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) { if(msg==NULL) return -1; if(msg->to==NULL && parse_headers(msg, HDR_TO_F, 0)==-1) { LM_ERR("cannot parse To header\n"); return pv_get_null(msg, param, res); } if(msg->to==NULL || get_to(msg)==NULL) { LM_DBG("no To header\n"); re...
false
false
false
false
false
0
list_traverse(list_t *ptr, int (*func)(void *, void *), void *user) { list_entry_t *ret; struct wrap wrap; wrap.func = func; wrap.user = user; pthread_mutex_lock(&ptr->lock); assert(list_check(ptr)); ret = (list_entry_t *) ll_traverse(&ptr->head, wrapper, (void *) &wrap); if (ret) { free(ret); ptr->count...
false
false
false
false
false
0
wholeScriptCheck( const UnicodeString &text, ScriptSet *result, UErrorCode &status) const { UTrie2 *table = (fChecks & USPOOF_ANY_CASE) ? fSpoofData->fAnyCaseTrie : fSpoofData->fLowerCaseTrie; result->setAll(); int32_t length = text.length(); for (int32_t inputIdx=0; inputIdx < length;)...
false
false
false
false
false
0
ipcp_cloning_candidate_p (struct cgraph_node *node) { struct caller_statistics stats; gcc_checking_assert (cgraph_function_with_gimple_body_p (node)); if (!flag_ipa_cp_clone) { if (dump_file) fprintf (dump_file, "Not considering %s for cloning; " "-fipa-cp-clone disabled.\n", cgr...
false
false
false
false
false
0
avma1cs_config(struct pcmcia_device *link) { int i = -1; char devname[128]; IsdnCard_t icard; int busy = 0; dev_dbg(&link->dev, "avma1cs_config(0x%p)\n", link); devname[0] = 0; if (link->prod_id[1]) strlcpy(devname, link->prod_id[1], sizeof(devname)); if (pcmcia_loop_config(link, avma1cs_configcheck, NULL)...
true
true
false
false
false
1
count_targets(struct aoedev *d, int *untainted) { int i, good; for (i = good = 0; i < d->ntargets && d->targets[i]; ++i) if (d->targets[i]->taint == 0) good++; if (untainted) *untainted = good; return i; }
false
false
false
false
false
0
compare_phone (EContact *contact, const gchar *str, const gchar *region, CompareFunc compare) { GList *list, *l; gboolean rv = FALSE; list = e_contact_get (contact, E_CONTACT_TEL); for (l = list; l; l = l->next) { const gchar *phone = l->data; rv = phone && compar...
false
false
false
false
false
0
hugsAPI5() { /* build virtual function table */ static HugsAPI5 api; static Bool initialised = FALSE; if (!initialised) { api.getBool = getBool; api.getInt = getInt; api.getWord = getWord; api.getAddr = getAddr; api.getFloat = getFloat; api.getDouble = getDouble...
false
false
false
false
false
0
ExprTernaryGetMoveIndices(ExprByteCode *expr, int right_index, int *prev_right_index, int *prev_left_index) { int i = right_index - 1; int ternary_count = 1; while (i > 1) { if (expr->token[i].type == JIM_EXPROP_TERNARY_LEFT) { if (--ternary_count == 0 && expr->token[i - 2].type == JIM_...
false
false
false
false
false
0
fn_out_diff_words_aux(void *priv, char *line, unsigned long len) { struct diff_words_data *diff_words = priv; if (diff_words->minus.suppressed_newline) { if (line[0] != '+') putchar('\n'); diff_words->minus.suppressed_newline = 0; } len--; switch (line[0]) { case '-': print_word(&diff_words->minus, l...
false
false
false
false
false
0
set_allow_user_actions(bool bVal) { AddDel::set_allow_user_actions(bVal); //add or remove buttons: if(bVal) { set_allow_user_actions(false); //Remove them first (Don't want to add them twice). //Ensure that the buttons are in the ButtonBox. setup_buttons(); } else { //We don't just remov...
false
false
false
false
false
0
test_network_urlparse__connection_data_cleanup(void) { cl_git_pass(gitno_connection_data_from_url(&conndata, "http://foo.com/bar/baz/biff", "baz/biff")); cl_git_pass(gitno_connection_data_from_url(&conndata, "https://foo.com/bar/baz/biff", "baz/biff")); }
false
false
false
false
false
0
plugin_unload(Plugin *plugin) { gboolean (*plugin_done) (void); gboolean can_unload = TRUE; plugin_unload_rdeps(plugin); if (plugin->unloaded_hidden) return; if (plugin->error) { plugin_remove_from_unloaded_list(plugin->filename); return; } if (g_module_symbol(plugin->module, "plugin_done", (gpointer) &...
false
false
false
false
false
0
reservation_object_test_signaled_single(struct fence *passed_fence) { struct fence *fence, *lfence = passed_fence; int ret = 1; if (!test_bit(FENCE_FLAG_SIGNALED_BIT, &lfence->flags)) { fence = fence_get_rcu(lfence); if (!fence) return -1; ret = !!fence_is_signaled(fence); fence_put(fence); } return r...
false
false
false
false
false
0