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
ql_tx_ring_clean(struct ql_adapter *qdev) { struct tx_ring *tx_ring; struct tx_ring_desc *tx_ring_desc; int i, j; /* * Loop through all queues and free * any resources. */ for (j = 0; j < qdev->tx_ring_count; j++) { tx_ring = &qdev->tx_ring[j]; for (i = 0; i < tx_ring->wq_len; i++) { tx_ring_desc = &...
false
false
false
false
false
0
writeEntry(int index, std::string telephone, std::string text) throw(GsmException) { #ifndef NDEBUG if (debugLevel() >= 1) std::cerr << "*** Writing PB entry #" << index << " number '" << telephone << "' text '" << text << "'" << std::endl; #endif // select phonebook _myMeTa.setPhonebook(_phonebookNa...
false
false
false
false
false
0
__pyx_f_7sklearn_5utils_10arrayfuncs__double_min_pos(double *__pyx_v_X, Py_ssize_t __pyx_v_size) { Py_ssize_t __pyx_v_i; __pyx_t_5numpy_float64_t __pyx_v_min_val; double __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; __Pyx...
false
false
false
false
false
0
S_assert_uft8_cache_coherent(pTHX_ const char *const func, STRLEN from_cache, STRLEN real, SV *const sv) { PERL_ARGS_ASSERT_ASSERT_UFT8_CACHE_COHERENT; /* As this is debugging only code, save space by keeping this test here, rather than inlining it in all the callers. */ if (from_cache == r...
false
false
false
false
false
0
execute_pagemap(datapagemap_t *pagemap, const char *path) { datapagemap_iterator_t *iter; BlockNumber blkno; off_t offset; iter = datapagemap_iterate(pagemap); while (datapagemap_next(iter, &blkno)) { offset = blkno * BLCKSZ; copy_file_range(path, offset, offset + BLCKSZ, false); /* Ok, this block has now...
false
false
false
false
false
0
timeoutFrag() { pFrag_t old, cur = rFragment; struct timeval tv; int64_t timediff; int i; if(rFragment == NULL) return -1; gettimeofday(&tv, NULL); while(cur->next != NULL) { old = cur->next; timediff = (tv.tv_sec - old->access.tv_sec)*1000000 + (tv.tv_usec - o...
false
false
false
false
false
0
ExpandAll( bool doExpand ) { wxPropertyGridState* state = m_pState; if ( !state->DoGetRoot()->GetChildCount() ) return true; wxPropertyGrid* pg = state->GetGrid(); if ( GetSelection() && GetSelection() != state->DoGetRoot() && !doExpand ) { pg->ClearSelection(false); ...
false
false
false
false
false
0
invalidate_source(CdlValueSource source) { CYG_REPORT_FUNCNAME("CdlValuable::invalidate_source (no transaction)"); CYG_REPORT_FUNCARG2XV(this, source); CYG_PRECONDITION_THISC(); CdlTransaction transaction = CdlTransactionBody::make(get_toplevel()); this->invalidate_source(transaction, source); ...
false
false
false
false
false
0
scanInlinedCode(Instruction *start, Instruction *end, std::vector<CallInst *> &calls, std::set<BasicBlock *> &seen) { calls.clear(); std::vector<BasicBlock *> worklist; seen.insert(start->getParent()); scanOneBB(start, end, calls, seen, worklist); while ...
false
false
false
false
false
0
L14() {register object *base=vs_base; register object *sup=base+VM14; VC14 vs_check;vs_top=sup; {object V33=base[0]->c.c_cdr; base[2]= (V33->c.c_car); V33=V33->c.c_cdr; base[3]= V33;} {object V34; vs_base=vs_top; Lgensym(); vs_top=sup; V34= vs_base[0]; V35= list(2,((object)VV[26]),(V34)); V36= make_cons(/*...
false
false
false
false
false
0
GMT_get_point_from_r_az (double lon0, double lat0, double r, double azim, double *lon1, double *lat1) /* Given point (lon0, lat0), find coordinates of a point r degrees away in the azim direction */ { double sinr, cosr, sinaz, cosaz, siny, cosy; sincosd (azim, &sinaz, &cosaz); sincosd (r, &sinr, &cosr); sincosd (...
false
false
false
false
false
0
try_offline_node(int nid) { pg_data_t *pgdat = NODE_DATA(nid); unsigned long start_pfn = pgdat->node_start_pfn; unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages; unsigned long pfn; int i; for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) { unsigned long section_nr = pfn_to_section_nr(...
false
false
false
false
false
0
key_flush() { int i; Uint8 *keystate = SDL_GetKeyState(NULL); if (!Installed) key_init(); //Clear the unicode buffer for (i=0; i<KEY_BUFFER_SIZE; i++ ) unicode_frame_buffer[i] = '\0'; for (i=0; i<256; i++ ) { if (key_ismodlck(i) == KEY_ISLCK && keystate[key_properties[i].sym] && !GameArg.CtlNoStickyKeys...
false
false
false
false
false
0
uvc_ctrl_send_event(struct uvc_fh *handle, struct uvc_control *ctrl, struct uvc_control_mapping *mapping, s32 value, u32 changes) { struct v4l2_subscribed_event *sev; struct v4l2_event ev; if (list_empty(&mapping->ev_subs)) return; uvc_ctrl_fill_event(handle->chain, &ev, ctrl, mapping, value, changes); list...
false
false
false
false
false
0
do_pragma_dependency (cpp_reader *pfile) { const char *fname; int angle_brackets, ordering; fname = parse_include (pfile, &angle_brackets); if (!fname) return; ordering = _cpp_compare_file_date (pfile, fname, angle_brackets); if (ordering < 0) cpp_error (pfile, CPP_DL_WARNING, "cannot find source ...
false
false
false
false
false
0
sgen_memgov_try_calculate_minor_collection_allowance (gboolean overwrite) { int num_major_sections, num_major_sections_saved; mword los_memory_saved, new_major, new_heap_size, save_target, allowance_target; if (overwrite) g_assert (need_calculate_minor_collection_allowance); if (!need_calculate_minor_collection...
false
false
false
false
false
0
httpRequest(const char *url, const char *logUrl, const char *data, const char *logData, enum requestType rt) { const char *nonNullData = data ? data : ""; memBuf_t *mp = (memBuf_t *)myMalloc(sizeof(memBuf_t)); char *metaRefresh; mp->memory = mp->readptr = NULL; mp->size = 0; mp->timeToFirstByte = 0; lastURL = ...
false
false
false
false
false
0
glade_gtk_widget_add2group_cb (GtkMenuItem * item, GladeWidget * gwidget) { GladeWidget *group = g_object_get_data (G_OBJECT (item), "glade-group-widget"); GladeWidgetAdaptor *adaptor = glade_widget_adaptor_get_by_type (GTK_TYPE_SIZE_GROUP); GList *widget_list = NULL, *new_list; GladeProperty *prope...
false
false
false
false
false
0
widget_memory_draw( void *data ) { int x, y; char pbuf[36]; widget_rectangle( LC(0), LR(0), 40 * 8, 16 * 8 + 4, 1 ); widget_rectangle( LC(0), LR(16) + 2, 320, 1, 7 ); for( y = 0; y < 16; ++y ) { libspectrum_word addr = memaddr + y * 8; sprintf( pbuf, "%04X:", addr ); widget_printstring_right( L...
true
true
false
false
false
1
copy_bytes(stream *s, const byte **data, int *data_length, int n) { while (n-- && (*data_length)--) { stream_putc(s, *((*data)++)); } }
false
false
false
false
false
0
X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc) { const X509V3_EXT_METHOD *method; if (!(method = X509V3_EXT_get_nid(ext_nid))) { X509V3err(X509V3_F_X509V3_EXT_I2D,X509V3_R_UNKNOWN_EXTENSION); return NULL; } return do_ext_i2d(method, ext_nid, crit, ext_struc); }
false
false
false
false
false
0
getLook(int index) const { if(index < 0 || index >= (static_cast<int>(getImpl()->looks.size()))) { return ""; } return getImpl()->looks[index].c_str(); }
false
false
false
false
false
0
assign_null_to_bundle (parser *p) { gretl_bundle *b; int err = 0; if (p->flags & P_LHBUN) { b = get_bundle_by_name(p->lh.name); gretl_bundle_void_content(b); } else { b = gretl_bundle_new(); if (b == NULL) { err = E_ALLOC; } else { err = user_var_add_or_replace(p->lh.name, GRETL_T...
false
false
false
false
false
0
xterm_text(int ig1 _is_unused, int ig2 _is_unused) { if (tx < NT) text[tx++] = ansi_ch; return state; }
false
false
false
false
false
0
writeInstance(MaterialSerializer* ser, SubRenderState* subRenderState, Pass* srcPass, Pass* dstPass) { NormalMapLighting* normalMapSubRenderState = static_cast<NormalMapLighting*>(subRenderState); ser->writeAttribute(4,...
false
false
false
false
false
0
fprint_parse_error(FILE *fp, char *msg, String_buf sb, int start_pos, int end_pos) { int i; int n = sb_size(sb); if (end_pos == -1) end_pos = n-1; fprintf(fp, "%%%%ERROR: %s:\n\n", msg); for (i = 0; i < start_pos; i++) fprintf(fp, "%c", sb_char(sb, i)); fprintf(fp, "%%%%START ERROR%%%%"); for (...
false
false
false
false
false
0
test_default_values(const CPose3DRotVec &p, const std::string & label) { MRPT_UNUSED_PARAM(label); EXPECT_EQ(p.x(),0); EXPECT_EQ(p.y(),0); EXPECT_EQ(p.z(),0); EXPECT_EQ(p.rx(),0); EXPECT_EQ(p.ry(),0); EXPECT_EQ(p.rz(),0); #if 0 CMatrixDouble44 HM = p.getHomogeneousMatrixVal(); for (size_t i=0;i<4;i+...
false
false
false
false
false
0
ocfs2_get_request_ptr(struct ocfs2_info *info, int idx, u64 *req_addr, int compat_flag) { int status = -EFAULT; u64 __user *bp = NULL; if (compat_flag) { #ifdef CONFIG_COMPAT /* * pointer bp stores the base address of a pointers array, * which collects all addresses of separate request. */ bp = (u...
false
false
false
false
false
0
load_downloaded_routers(const char *body, smartlist_t *which, int descriptor_digests, int router_purpose, const char *source) { char buf[256]; char time_buf[ISO_TIME_LEN+1]; int added = 0; int general = router_purpose == ROUTER_PURPOSE_GENE...
false
false
false
false
false
0
node_depth(node *n) { int depth = 2 ; while (is_node(n)) { depth++ ; n = n->nw ; } return depth ; }
false
false
false
false
false
0
princCurvFilter( const Mat1f& response, const Mat1f& scale_map, const Mat3f& affine_map, double max_ratio, const std::vector< KeyPoint3D >& kp_in, std::vector< KeyPoint3D >& kp_out ) { kp_out.reserve( kp_out.size() + kp_in.size() ); if ( max_ratio < 1.0 ) { // ratio is alw...
false
false
false
false
false
0
RFG_Groups_free( RFG_Groups* groups ) { uint32_t i; uint32_t j; if( !groups ) return 0; /* free group definition file name */ if( groups->file_name ) free( groups->file_name ); /* free array of group assignments */ for( i = 0; i < groups->num_assigns; i++ ) { for( j = 0; j < groups->ass...
false
false
false
false
false
0
round_node_real_solve_r (RNode* base, Number* r) { RoundNode * self; Number* result = NULL; Number* _tmp0_ = NULL; Number* _tmp1_ = NULL; self = (RoundNode*) base; g_return_val_if_fail (r != NULL, NULL); _tmp0_ = r; _tmp1_ = number_round (_tmp0_); result = _tmp1_; return result; }
false
false
false
false
false
0
addAltMorph( Word *word, const vector<string>& lemmas ) const { Alternative *alt = new Alternative(); MorphologyLayer *ml = new MorphologyLayer(); #pragma omp critical(foliaupdate) { alt->append( ml ); word->append( alt ); } addMorph( ml, lemmas ); }
false
false
false
false
false
0
__lambda101_ (SearchAndReplace* self) { GtkSourceSearchContext* _tmp0_ = NULL; GError * _inner_error_ = NULL; _tmp0_ = self->priv->_search_context; if (_tmp0_ != NULL) { MainWindow* _tmp1_ = NULL; DocumentView* _tmp2_ = NULL; DocumentView* _tmp3_ = NULL; GtkSourceCompletion* _tmp4_ = NULL; GtkSourceComple...
false
false
false
false
false
0
consume_count (const char **type) { int count = 0; if (! ISDIGIT ((unsigned char)**type)) return -1; while (ISDIGIT ((unsigned char)**type)) { count *= 10; /* Check for overflow. We assume that count is represented using two's-complement; no power of two is divisible by ten, so if an ov...
false
false
false
false
false
0
dwc3_endpoint_interrupt(struct dwc3 *dwc, const struct dwc3_event_depevt *event) { struct dwc3_ep *dep; u8 epnum = event->endpoint_number; dep = dwc->eps[epnum]; if (!(dep->flags & DWC3_EP_ENABLED)) return; if (epnum == 0 || epnum == 1) { dwc3_ep0_interrupt(dwc, event); return; } switch (event->en...
false
false
false
false
false
0
ilTexImage_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data) { if (Image == NULL) { ilSetError(IL_ILLEGAL_OPERATION); return IL_FALSE; } //// // Not sure if we should be getting rid of the palette... if (Image->Pal.Palette && Image->Pal.PalSize &...
false
false
false
false
false
0
ldapmod4line(char *action, char *ad) { LDAPMod *m; int op; if (!strcmp(action, "add")) op = LDAP_MOD_ADD; else if (!strcmp(action, "delete")) op = LDAP_MOD_DELETE; else if (!strcmp(action, "replace")) op = LDAP_MOD_REPLACE; else { fputs("Error: Invalid change marker.\n", stderr); return 0; } m = xa...
false
false
false
false
false
0
enic_free_affinity_hint(struct enic *enic) { int i; for (i = 0; i < enic->intr_count; i++) { if (enic_is_err_intr(enic, i) || enic_is_notify_intr(enic, i)) continue; free_cpumask_var(enic->msix[i].affinity_mask); } }
false
false
false
false
false
0
iso9660_ifs_stat (iso9660_t *p_iso, const char psz_path[]) { iso9660_stat_t *p_root; char **splitpath; iso9660_stat_t *stat; if (!p_iso) return NULL; if (!psz_path) return NULL; p_root = _ifs_stat_root (p_iso); if (!p_root) return NULL; splitpath = _cdio_strsplit (psz_path, '/'); stat = _fs_iso_...
false
false
false
false
false
0
message_send_notification(struct message *msg, struct sa *isakmp_sa, u_int16_t notify, struct proto *proto, int incoming) { struct info_args args; struct sa *doi_sa = proto ? proto->sa : isakmp_sa; args.discr = 'N'; args.doi = doi_sa ? doi_sa->doi->id : ISAKMP_DOI_ISAKMP; args.proto = proto ? proto->prot...
false
false
false
false
false
0
esas2r_init(void) { int i; esas2r_log(ESAS2R_LOG_INFO, "%s called", __func__); /* verify valid parameters */ if (can_queue < 1) { esas2r_log(ESAS2R_LOG_WARN, "warning: can_queue must be at least 1, value " "forced."); can_queue = 1; } else if (can_queue > 2048) { esas2r_log(ESAS2R_LOG_WARN, ...
false
false
false
false
false
0
APar_InterjectNewAtom(char* atom_name, uint8_t cntr_state, uint8_t atom_class, uint32_t atom_length, uint32_t atom_verflags, uint16_t packed_lang, uint8_t atom_level, short preceding_atom) { if (deep_atom_scan && !modified_atoms) { return 0; } AtomicInfo* new_atom = &pa...
false
false
false
false
false
0
gm_mcp_vmoo_userlist_get_menu_item(GmMcpVmooUserlist *package, GmKeyValuePair *menuitem, UserInfo *info) { GmKeyValuePair *result = g_new0(GmKeyValuePair, 1); if (!menuitem) { return result; } result->key = gm_mcp_vmoo_userlist_menu_item_subst(package, menuitem->key, info); result->value = gm_mcp_vmoo...
false
false
false
false
false
0
intersect(const Ray &ray) { // See whether the plane does not run exactly parallel to the ray if (N.dot(ray.D) == 0.0) return Hit::NO_HIT(); double t = (ray.O - d).dot(N) / ray.D.dot(N); // See whether the plane is not behind the eye if (t < 0.0) return Hit::NO_HIT(); return Hit(t, N.normali...
false
false
false
false
false
0
ocfs2_figure_dirent_hole(struct ocfs2_dir_entry *de) { unsigned int hole; if (le64_to_cpu(de->inode) == 0) hole = le16_to_cpu(de->rec_len); else hole = le16_to_cpu(de->rec_len) - OCFS2_DIR_REC_LEN(de->name_len); return hole; }
false
false
false
false
false
0
ht_vasprintf(char **ptr, const char *format, va_list ap) { int ret; ret = dopr(NULL, 0, format, ap); if (ret <= 0) { *ptr = NULL; return 0; } (*ptr) = ht_malloc(ret+1); if (!*ptr) return 0; ret = ht_vsnprintf(*ptr, ret+1, format, ap); return ret; }
false
false
false
false
false
0
snd_cx18_card_private_free(struct snd_card *sc) { if (sc == NULL) return; snd_cx18_card_free(sc->private_data); sc->private_data = NULL; sc->private_free = NULL; }
false
false
false
false
false
0
main(int argc, char* argv[]) { options.fmt = strdup("0x%02x"); options.argc = 1; options.argv[0] = argv[0]; options.endline = '\n'; options.between = '\t'; int nargs = 0; /* parse options: * * arg which are not options are copied * in options.argc and options.argv * */ while (++nargs < argc) { i...
false
false
false
false
false
0
bnx2x_dcbnl_get_pfc_state(struct net_device *netdev) { struct bnx2x *bp = netdev_priv(netdev); DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcbx_local_feat.pfc.enabled); if (!bp->dcb_state) return 0; return bp->dcbx_local_feat.pfc.enabled; }
false
false
false
false
false
0
ucs2cpy(ucs2_char_t* dst, const ucs2_char_t* src) { ucs2_char_t *p = dst; for (;;) { *p = *src; if (*src == 0) { break; } p++; src++; } return dst; }
false
false
false
false
false
0
preprocess_options(std::vector<string>& opts) const { std::vector<string>::iterator p = opts.begin(); while(p != opts.end()) { /* handle options not starting with an '-' sign */ if (p->size() > 0 && (*p)[0] != '-') { /* hack1: rest as "-i:file" */ ECA_LOG_MSG(ECA_LOGGER::info, "NOTE: Interpret...
false
false
false
false
false
0
SetupProxy() /*{{{*/ { URI ServerName = Queue->Uri; // Curl should never read proxy settings from the environment, as // we determine which proxy to use. Do this for consistency among // methods and prevent an environment variable overriding a // no-proxy ("DIRECT") setting in apt.conf. curl_e...
false
false
false
false
false
0
getActiveLayers( vector<ASCString>& list ) { list.clear(); for ( LayerMap::iterator i = layerMap.begin(); i != layerMap.end(); ++i ) if ( i->second->isActive() ) list.push_back( i->first ); }
false
false
false
false
false
0
partLabelScenePos() { if (m_partLabel == NULL) return QPointF(); if (!m_partLabel->initialized()) return QPointF(); return m_partLabel->scenePos(); }
false
false
false
false
false
0
GetFamilyName ( const char* thePrinterName //!< [in] name of the printer model ) const { const char* szFamilyName = NULL; FAMILY_HANDLE myFamilyHandle = FindDevIdMatch(thePrinterName); if (myFamilyHandle) { szFamilyName = getPrinterProxy(myFamilyHandle)->GetFamilyName(); ...
false
false
false
false
false
0
gpk_application_state_get_icon (PkBitfield state) { if (state == 0) return gpk_info_enum_to_icon_name (PK_INFO_ENUM_AVAILABLE); if (state == pk_bitfield_value (GPK_STATE_INSTALLED)) return gpk_info_enum_to_icon_name (PK_INFO_ENUM_INSTALLED); if (state == pk_bitfield_value (GPK_STATE_IN_LIST)) return gpk_info...
false
false
false
false
false
0
racc_yyparse(VALUE parser, VALUE lexer, VALUE lexmid, VALUE arg, VALUE sysdebug) { volatile VALUE vparams; struct cparse_params *v; vparams = Data_Make_Struct(CparseParams, struct cparse_params, cparse_params_mark, -1, v); v->sys_debug = RTEST(sysdebug); D_puts("start...
false
false
false
false
false
0
scriptContentDropped(const QString &scriptContent) { if(maybeSave()) { QByteArray newContent(scriptContent.toUtf8()); QBuffer buffer(&newContent); buffer.open(QIODevice::ReadOnly); ActionTools::Script::ReadResult result = mScript->read(&buffer, Global::SCRIPT_VERSION); if(result == ActionTools::Script::Re...
false
false
false
false
false
0
packet_hci_event(struct timeval *tv, uint16_t index, const void *data, uint16_t size) { const hci_event_hdr *hdr = data; btsnoop_write(tv, index, 0x03, data, size); print_header(tv, index); if (size < HCI_EVENT_HDR_SIZE) { printf("* Malformed HCI Event packet\n"); return; } printf("> HCI Event: %s (0...
false
false
false
false
false
0
netdev_tx_flush ( struct net_device *netdev ) { /* Discard any packets in the TX queue. This will also cause * any packets in the deferred TX queue to be discarded * automatically. */ while ( ! list_empty ( &netdev->tx_queue ) ) { netdev_tx_complete_next_err ( netdev, -ECANCELED ); } assert ( list_empty (...
false
false
false
false
false
0
slotNameOwnerChanged(const QString &appId, const QString &oldOwner, const QString &newOwner) { Q_UNUSED(oldOwner); if (appId.isEmpty() || newOwner.isEmpty()) return; #ifdef KLAUNCHER_VERBOSE_OUTPUT kDebug(7016) << "new app" << appId; #endif foreach (KLaunchRequest *req...
false
false
false
false
false
0
embWordPrintTable(const AjPTable table) { void **valarray = NULL; EmbPWord ajnew; ajint i; ajTableToarrayValues(table, &valarray); qsort(valarray, (size_t) ajTableGetLength(table), sizeof (*valarray), wordCompare); for(i = 0; valarray[i]; i++) { ajnew = (EmbPWord) valarray[i]; ajUser("%...
false
false
false
false
false
0
resource_usage_print() { #ifdef __linux__ const char *fn = "/proc/self/statm"; FILE *fp = fopen(fn, "r"); if (!fp) return; long size, resident, share, trs, drs, lrs; fscanf(fp, "%ld%ld%ld%ld%ld%ld", &size, &resident, &share, &trs, &drs, &lrs); fclose(fp); long pagesize = getpagesize(); ...
false
false
false
false
false
0
__find_dbgp(u32 bus, u32 slot, u32 func) { u32 class; class = read_pci_config(bus, slot, func, PCI_CLASS_REVISION); if ((class >> 8) != PCI_CLASS_SERIAL_USB_EHCI) return 0; return find_cap(bus, slot, func, PCI_CAP_ID_EHCI_DEBUG); }
false
false
false
false
false
0
igbvf_config_collision_dist ( struct e1000_hw *hw ) { u32 tctl; DBG ("igbvf_config_collision_dist"); tctl = er32 (TCTL); tctl &= ~E1000_TCTL_COLD; tctl |= E1000_COLLISION_DISTANCE << E1000_COLD_SHIFT; ew32 (TCTL, tctl); e1e_flush(); }
false
false
false
false
false
0
cmd_describe(int argc, const char **argv, const char *prefix) { int contains = 0; struct option options[] = { OPT_BOOLEAN(0, "contains", &contains, "find the tag that comes after the commit"), OPT_BOOLEAN(0, "debug", &debug, "debug search strategy on stderr"), OPT_BOOLEAN(0, "all", &all, "use any ...
false
false
false
false
false
0
get_filesystem_entries (const gunichar2 *path, const gunichar2 *path_with_pattern, gint attrs, gint mask, gint32 *error) { int i; WIN32_FIND_DATA data; HANDLE find_handle; GPtrArray *names = NULL; gchar *utf8_path = NULL, *utf8_result, *full_name; gint32 attributes; mask = convert_attrs ((M...
false
false
false
false
false
0
applicable0(const solver *ego_, const problem *p_) { const problem_rdft *p = (const problem_rdft *) p_; UNUSED(ego_); return (1 && p->sz->rnk == 1 && p->vecsz->rnk <= 1 && (p->kind[0] == REDFT00 || p->kind[0] == RODFT00) && p->sz->dims[0].n > 1 /* don't create size-0 sub-plans *...
false
false
false
false
false
0
mailpop3_user(mailpop3 * f, const char * user) { char command[POP3_STRING_SIZE]; int r; char * response; if (f->pop3_state != POP3_STATE_AUTHORIZATION) return MAILPOP3_ERROR_BAD_STATE; /* send user command */ snprintf(command, POP3_STRING_SIZE, "USER %s\r\n", user); r = send_command_private(f...
false
false
false
false
false
0
CifDelSymbol( Number ) long Number; { symbol_list *Symbol; int Index; Index = Number & CIF_MASK_SYMBOL; for ( Symbol = HEAD_SYMBOL[ Index ]; Symbol != (symbol_list *)NULL; Symbol = Symbol->NEXT ) { if ( Symbol->NUMBER == Number ) { if ( Symb...
false
false
false
false
false
0
ExponentialRandom(void) { double x; do x = sre_random(); while (x == 0.0); return -log(x); }
false
false
false
false
false
0
tds_alloc_locale(void) { TDSLOCALE *locale; TEST_MALLOC(locale, TDSLOCALE); return locale; Cleanup: tds_free_locale(locale); return NULL; }
false
false
false
false
false
0
set_block_loop_info_rec(Block *block) { Block *bpt; for (bpt = block; bpt != NULL; bpt = bpt->next) { if (is_do_loop(bpt)) bpt->loop_info = set_block_loop_info(bpt); if (bpt->inner != NULL) set_block_loop_info_rec(bpt->inner); } }
false
false
false
false
false
0
bcf1_sync_info(bcf1_t *line, kstring_t *str) { // pairs of typed vectors int i, irm = -1; for (i=0; i<line->n_info; i++) { bcf_info_t *info = &line->d.info[i]; if ( !info->vptr ) { // marked for removal if ( irm < 0 ) irm = i; continue; ...
false
false
false
false
false
0
moveElevator(int x_,int y_) { if (x_!=_elevator->x()) { _elevator->moveTo(x_,y_); drawElevatorCable(); drawPropIndicator(); } }
false
false
false
false
false
0
next_is_fresh_ident(struct isl_stream *s, struct vars *v) { int n = v->n; int fresh; struct isl_token *tok; tok = isl_stream_next_token(s); if (!tok) return 0; fresh = tok->type == ISL_TOKEN_IDENT && vars_pos(v, tok->u.s, -1) >= n; isl_stream_push_token(s, tok); vars_drop(v, v->n - n); return fresh; }
false
false
false
false
false
0
real_constant (FuncState *fs, real r) { /* check whether 'r' has appeared within the last LIM entries */ TObject *cnt = fs->f->consts; int c = fs->f->nconsts; int lim = c < LIM ? 0 : c-LIM; while (--c >= lim) { if (ttype(&cnt[c]) == LUA_T_NUMBER && nvalue(&cnt[c]) == r) return c; } /* not found;...
false
false
false
false
false
0
my_set_own_status (GObject *object, const TpPresenceStatus *status, GError **error) { TpBaseConnection *base_conn = TP_BASE_CONNECTION (object); TpTestsContactsConnectionPresenceStatusIndex index = status->index; const gchar *message = ""; TpHandle self_handle; if (statu...
false
false
false
false
false
0
reload_int(int reload, Octstr *desc, long *o, long *n) { if (reload && *o != *n) { info(0, "Reloading int '%s' from %ld to %ld", octstr_get_cstr(desc), *o, *n); *o = *n; } }
false
false
false
false
false
0
gent_array8(void) { hid_t file = -1; /* Handles */ hid_t filetype = -1; /* Handles */ hid_t space = -1; /* Handles */ hid_t dset = -1; /* Handles */ herr_t status = -1; hsize_t sdims[] = {F64_DIM0}; hsize_t tdims[] = {F64_DIM1}; int wdata[(F64_DIM1) *...
false
false
false
false
false
0
dvbdmx_remove_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend) { struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; struct list_head *pos, *n, *head = &dvbdemux->frontend_list; list_for_each_safe(pos, n, head) { if (DMX_FE_ENTRY(pos) == frontend) { list_del(pos); return 0; } } ...
false
false
false
false
false
0
open_child (GsfInfileStdio *ifs, char const *name, GError **err) { GsfInput *child; char *path = g_build_filename (ifs->root, name, NULL); if (g_file_test (path, G_FILE_TEST_IS_DIR)) child = (GsfInput *) gsf_infile_stdio_new (path, err); else child = gsf_input_stdio_new (path, err); g_free (path); return ch...
false
false
false
false
false
0
getOutNode(unsigned int index) { if(index<getOutSize() && index>=0) { return outNodes[index]; } return NULL; }
false
false
false
false
false
0
lanczos_command(lambda,krydim) REAL lambda; int krydim; /* dimension of Krylov subspace */ { struct linsys S; REAL evalues[NPRINT]; int i,nprint; hmode = hessian_normal_flag; hessian_init(&S,NULL); hess_flag = 1; rhs_flag = 0; hessian_fill(&S,NULL); S.lambda = lambda; (*sp_AIJ_setup_func)(S.A_rows...
false
false
false
false
false
0
getAvgParticlePos(double& x, double& y) const { x = y = 0; for (int i = 0; i < 10; ++i) { int r = rand() % nbParticules; x += m_particles[r].x; y += m_particles[r].y; } x /= 10; y /= 10; }
false
false
false
false
false
0
OnExit() { size_t cnt = mModules.GetCount(); for (size_t ndx = 0; ndx < cnt; ndx++) { delete (Module *) mModules[ndx]; } mModules.Clear(); }
false
false
false
false
false
0
validate_nfsopts (glusterd_volinfo_t *volinfo, dict_t *val_dict, char **op_errstr) { volgen_graph_t graph = {0,}; int ret = -1; char transport_type[16] = {0,}; char *tt = NULL; char err_str[4096] = {0,}; ...
false
false
false
false
false
0
reserveResourcesForConstExt(MachineInstr* MI) { const HexagonInstrInfo *QII = (const HexagonInstrInfo *) TII; MachineInstr *PseudoMI = MF.CreateMachineInstr(QII->get(Hexagon::A4_ext), MI->getDebugLoc()); if (ResourceTracker->canReserveResources(PseudoMI)) { Re...
false
false
false
false
false
0
lrw_aesni_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) { struct aesni_lrw_ctx *ctx = crypto_tfm_ctx(tfm); int err; err = aes_set_key_common(tfm, ctx->raw_aes_ctx, key, keylen - AES_BLOCK_SIZE); if (err) return err; return lrw_init_table(&ctx->lrw_table, key + keylen - AES_BLOC...
false
false
false
false
false
0
build_sit_entries(struct f2fs_sb_info *sbi) { struct sit_info *sit_i = SIT_I(sbi); struct curseg_info *curseg = CURSEG_I(sbi, CURSEG_COLD_DATA); struct f2fs_summary_block *sum = curseg->sum_blk; unsigned int segno; for (segno = 0; segno < TOTAL_SEGS(sbi); segno++) { struct seg_entry *se = &sit_i->sentries[segno...
false
false
false
false
false
0
goa_utils_store_credentials_for_object_sync (GoaProvider *provider, GoaObject *object, GVariant *credentials, GCancellable *cancellable, ...
false
false
false
false
false
0
moblin_netbook_rounded_rectangle (cairo_t *cr, gdouble x, gdouble y, gdouble width, gdouble height, gdouble radius) { if (width < 1 || height <...
false
false
false
false
false
0
opcode_check_unicode(void) { uint16_t result = 0; read_z_result_variable(); // FIXME: Check for output charset. if (unicode_char_to_zscii_input_char((uint16_t)op[0]) != 0xff) result = 3; else result = 1; set_variable(z_res_var, result, false); }
false
false
false
false
false
0
zx_DEC_ELEM_gl_eqop(struct zx_ctx* c, struct zx_gl_eqop_s* x) { struct zx_elem_s* el = x->gg.kids; switch (el->g.tok) { case zx_gl_resp_req_ELEM: if (!x->resp_req) x->resp_req = (struct zx_gl_resp_req_s*)el; return 1; case zx_gl_ll_acc_ELEM: if (!x->ll_acc) x->ll_acc = el; return 1; ...
false
false
false
false
false
0
RunPipe(const char *ADir, const char *ACommand) { if (!KeepMessages) FreeErrors(); Command = ACommand; Directory = ADir; MatchCount = 0; ReturnCode = -1; Running = 1; BufLen = BufPos = 0; Row = (int)ErrList.size() - 1; char s[2 * MAXPATH * 4]; sprintf(s, "[run...
false
false
false
false
false
0
qs_server(struct Client *source_p) { struct Client *target_p; if(source_p->servptr && source_p->servptr->serv) rb_dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers); else s_assert(0); rb_dlinkFindDestroy(source_p, &global_serv_list); target_p = source_p->from; if(has_id(source_p)) del_from_...
false
false
false
false
false
0
getAllStaticReferences() { vector<Object*> staticReferences; int i; for (i=0; i<(int)classReferences.size(); i++) { std::map<int, Object*>::iterator it; for (it=classReferences[i].begin(); it!=classReferences[i].end(); it++) if (it->second) staticReferences.push_back(it->second); } return staticRefe...
false
false
false
false
false
0
_ldapfull_connect_bind(moddata_t data) { if(data->ld != NULL && data->binded ) { return 0; } if( _ldapfull_connect(data) ) { return 1; } if(ldap_simple_bind_s(data->ld, data->binddn, data->bindpw)) { log_write(data->ar->c2s->log, LOG_ERR, "ldap: bind as '%s' failed: %s"...
true
true
true
false
false
1