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
read_NC(NC *ncp) { int status = NC_NOERR; free_NC_dimarrayV(&ncp->dims); free_NC_attrarrayV(&ncp->attrs); free_NC_vararrayV(&ncp->vars); status = nc_get_NC(ncp); if(status == NC_NOERR) fClr(ncp->flags, NC_NDIRTY | NC_HDIRTY); return status; }
false
false
false
false
false
0
isEditable() { return ((m_type == TEXT) || (m_type == PASSWORD) || (m_type == ISINDEX) || (m_type == FILE)); }
false
false
false
false
false
0
M_Read(void) { if(!MET_Read(*m_ReadStream, & m_Fields)) { METAIO_STREAM::cout << "MetaForm: Read: MET_Read Failed" << METAIO_STREAM::endl; return false; } MetaForm::InitializeEssential(); MET_FieldRecordType * mF; mF = MET_GetFieldRecord("Comment", &m_Fields); if(...
false
false
false
false
false
0
r_consonant_pair(struct SN_env * z) { { int m_test = z->l - z->c; /* test, line 53 */ { int mlimit; /* setlimit, line 54 */ int m1 = z->l - z->c; (void)m1; if (z->c < z->I[0]) return 0; z->c = z->I[0]; /* tomark, line 54 */ mlimit = z->lb; z->lb = z->c; ...
false
false
false
false
false
0
fix_placeholder_input_needed_levels(PlannerInfo *root) { ListCell *lc; foreach(lc, root->placeholder_list) { PlaceHolderInfo *phinfo = (PlaceHolderInfo *) lfirst(lc); Relids eval_at = phinfo->ph_eval_at; /* No work unless it'll be evaluated above baserel level */ if (bms_membership(eval_at) == BMS_MULTI...
false
false
false
false
false
0
CrawlerAttacks(int destination) const { for(int i=0; i<nRay; ++i) { if( destination == mailbox[ mailbox2board[square] + ray[i] ] ) return true; } return false; }
false
false
false
false
false
0
bwins(BW *w, long int l, long int n, int flg) { if (l + flg + n < w->top->line + w->h && l + flg >= w->top->line && l + flg <= w->b->eof->line) { if (flg) w->t->t->sary[w->y + l - w->top->line] = w->t->t->li; nscrldn(w->t->t, (int) (w->y + l + flg - w->top->line), w->y + w->h, (int) n); } if (l < w->top->line...
false
false
false
false
false
0
expand_builtin_strchr (tree arglist, rtx target, enum machine_mode mode) { if (!validate_arglist (arglist, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE)) return 0; else { tree s1 = TREE_VALUE (arglist), s2 = TREE_VALUE (TREE_CHAIN (arglist)); const char *p1; if (TREE_CODE (s2) != INTEGER_CST) r...
false
false
false
false
false
0
nic_add(nic_t *nic) { /* Add this device to our list of nics */ if (nic_list == NULL) { nic_list = nic; } else { nic_t *current = nic_list; while (current->next != NULL) current = current->next; current->next = nic; } }
false
false
false
false
false
0
usb_wwan_resume(struct usb_serial *serial) { int i, j; struct usb_serial_port *port; struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial); struct usb_wwan_port_private *portdata; struct urb *urb; int err; int err_count = 0; spin_lock_irq(&intfdata->susp_lock); for (i = 0; i < serial->num_ports...
false
false
false
false
false
0
maybe_autolink(MMIOT *f) { register int c; int size; /* greedily scan forward for the end of a legitimate link. */ for ( size=0; (c=peek(f, size+1)) != EOF; size++ ) if ( c == '\\' ) { if ( peek(f, size+2) != EOF ) ++size; } else if ( isspace(c) || strchr("'\"()[]{}<>`", c) ) break...
false
false
false
false
false
0
ves_icall_System_Math_Asin (gdouble x) { if (x < -1 || x > 1) return NaN.d; return asin (x); }
false
false
false
false
false
0
dbmw_foreach(dbmw_t *dw, dbmw_cb_t cb, void *arg) { struct foreach_ctx ctx; struct cache_foreach_ctx fctx; dbmw_check(dw); if (dbg_ds_debugging(dw->dbg, 1, DBG_DSF_ITERATOR)) { dbg_ds_log(dw->dbg, dw, "%s: starting with %s(%p)", G_STRFUNC, stacktrace_function_name(cb), arg); } /* * Before iterating we f...
false
false
false
false
false
0
do_encode_md (byte ** r_frame, size_t * r_flen, const byte * md, int algo, size_t len, unsigned nbits, const byte * asn, size_t asnlen) { byte *frame = NULL; size_t nframe = (nbits + 7) / 8; ssize_t i; size_t n = 0; if (!asn || !md || !r_frame || !r_flen) return CDK_Inv_Value; if (len + ...
false
false
false
false
false
0
setAuto() { gint autoLevels = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(_auto)); if (autoLevels) { _op._auto = true; gtk_widget_set_sensitive(_manualFrame, FALSE); } else { _op._auto = false; gtk_widget_set_sensitive(_manualFrame, TRUE); } }
false
false
false
false
false
0
TS_CONF_set_digests(CONF *conf, const char *section, TS_RESP_CTX *ctx) { int ret = 0; int i; STACK_OF(CONF_VALUE) *list = NULL; char *digests = NCONF_get_string(conf, section, ENV_DIGESTS); if (!digests) { TS_CONF_lookup_fail(section, ENV_DIGESTS); goto err; } if (!(list = X509V3_parse_list(digests)))...
false
false
false
false
false
0
test_commit_signature__create_empties(void) { // can not create a signature with empty name or email cl_git_pass(try_build_signature("nulltoken", "emeric.fermas@gmail.com", 1234567890, 60)); cl_git_fail(try_build_signature("", "emeric.fermas@gmail.com", 1234567890, 60)); cl_git_fail(try_build_signature(" ", "e...
false
false
false
false
false
0
gnc_account_create_transfer_balance (QofBook *book, Account *account, Account *transfer, gnc_numeric balance, time64 date) { Transaction *trans; Split *split; ...
false
false
false
false
false
0
aclParseUserMaxIP(void *data) { acl_user_ip_data **acldata = data; char *t = NULL; CBDATA_INIT_TYPE(acl_user_ip_data); if (*acldata) { debug(28, 1) ("Attempting to alter already set User max IP acl\n"); return; } *acldata = cbdataAlloc(acl_user_ip_data); t = strtokFile(); if (!t) goto...
false
false
false
false
false
0
const_get_coll_prop(VMG_ vm_prop_id_t prop, vm_val_t *retval, const vm_val_t *self_val, vm_obj_id_t *src_obj, uint *argc) { uint func_idx; ...
false
false
false
false
false
0
get_relevance_for_snippet (AnjutaSnippet *snippet, GList *words_list) { gchar *cur_word = NULL, *name = NULL, *trigger = NULL, *cur_keyword = NULL; gdouble relevance = 0.0, cur_relevance = 0.0, cur_keyword_relevance = 0.0; GList *iter = NULL, *keywords = NULL, *keywords_down = NULL, *iter2...
false
false
false
false
false
0
update_worklist_report_dialog(void) { GtkTreeIter it; gtk_list_store_clear(worklists_store); global_worklists_iterate(pgwl) { gtk_list_store_append(worklists_store, &it); gtk_list_store_set(worklists_store, &it, 0, global_worklist_name(pgwl), 1, global_workl...
false
false
false
false
false
0
numaGetIValue(NUMA *na, l_int32 index, l_int32 *pival) { l_float32 val; PROCNAME("numaGetIValue"); if (!pival) return ERROR_INT("&ival not defined", procName, 1); *pival = 0; if (!na) return ERROR_INT("na not defined", procName, 1); if (index < ...
false
false
false
false
false
0
get_url(const char *url) { int retry_count = 0; response_buffer *b = new response_buffer(); do { CURL *c = curl_easy_init(); curl_easy_setopt(c,CURLOPT_WRITEFUNCTION,buffer_write); curl_easy_setopt(c,CURLOPT_WRITEDATA,b); curl_easy_setopt(c,CURLOPT_URL,url); int success = curl_easy_perform(c); curl_ea...
false
false
false
false
false
0
soap_xpath_foreach(xmlDocPtr doc, const char *xpath, soap_xmlnode_callback cb, void *userdata) { int i = 0; xmlNodeSetPtr nodeset; xmlXPathObjectPtr xpathobj; xpathobj = soap_xpath_eval(doc, xpath); if (!xpathobj) return 0; nodeset = xpathobj->nodesetval; if (!nodeset) return...
false
false
false
false
false
0
dynamicNormalizerMain(int argc, CHR* argv[]) { printLogo(); Parameters parameters; if(!parameters.parseArgs(argc, argv)) { PRINT2_ERR(TXT("Invalid or incomplete command-line arguments have been detected.\n\nPlease type \"%s --help\" for details!\n"), appName(argv[0])); return EXIT_FAILURE; } if(parameters.s...
false
false
false
false
false
0
crm_time_add_months(crm_time_t * a_time, int extra) { int lpc; uint32_t y, m, d, dmax; crm_time_get_gregorian(a_time, &y, &m, &d); crm_trace("Adding %d months to %.4d-%.2d-%.2d", extra, y, m, d); if (extra > 0) { for (lpc = extra; lpc > 0; lpc--) { m++; if (m == 13)...
false
false
false
false
false
0
alloc_ep_req(struct usb_ep *ep, int len, int default_len) { struct usb_request *req; req = usb_ep_alloc_request(ep, GFP_ATOMIC); if (req) { req->length = len ?: default_len; req->buf = kmalloc(req->length, GFP_ATOMIC); if (!req->buf) { usb_ep_free_request(ep, req); req = NULL; } } return req; }
false
false
false
false
false
0
do_access(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) { struct fuse_access_in *arg = (struct fuse_access_in *) inarg; if (req->f->op.access) req->f->op.access(req, nodeid, arg->mask); else fuse_reply_err(req, ENOSYS); }
false
false
false
false
true
1
bufferedrandom_init(buffered *self, PyObject *args, PyObject *kwds) { char *kwlist[] = {"raw", "buffer_size", NULL}; Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; PyObject *raw; self->ok = 0; self->detached = 0; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|n:BufferedRandom", kwlist, ...
false
false
false
false
false
0
GetPunctuationChars() const { int msg = SCI_GETPUNCTUATIONCHARS; const long len = SendMsg(msg, 0, (uptr_t)NULL); if (!len) return wxEmptyString; wxMemoryBuffer mbuf(len+1); char* buf = (char*)mbuf.GetWriteBuf(len+1); SendMsg(msg, 0, (uptr_t)buf); mbuf.UngetWriteBuf(len); mbuf.AppendByte...
false
false
false
false
false
0
go_path_data_buffer_new (void) { GOPathDataBuffer *buffer; buffer = g_new (GOPathDataBuffer, 1); if (buffer == NULL) { g_warning ("[GOPathDataBuffer::new] can't create data buffer"); return NULL; } buffer->points = g_new (GOPathPoint, GO_PATH_DEFAULT_BUFFER_SIZE); if (buffer->points == NULL) { g_warning (...
false
false
false
false
false
0
_e_smart_clip_set(Evas_Object *obj, Evas_Object *clip) { E_Smart_Data *sd; /* try to get the objects smart data */ if (!(sd = evas_object_smart_data_get(obj))) return; /* set the clip */ if (sd->o_stand) evas_object_clip_set(sd->o_stand, clip); if (sd->o_frame) evas_object_clip_set(sd->o_frame, clip...
false
false
false
false
false
0
wake_all_kswapds(unsigned int order, const struct alloc_context *ac) { struct zoneref *z; struct zone *zone; for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, ac->high_zoneidx, ac->nodemask) wakeup_kswapd(zone, order, zone_idx(ac->preferred_zone)); }
false
false
false
false
false
0
getNextToken(const UnicodeString& ruleData, int32_t *ruleIndex, UnicodeString& token, tokenType& type, UErrorCode &status) { int32_t curIndex= *ruleIndex; UChar ch; tokenType prevType=none; if (U_FAILURE...
false
false
false
false
false
0
ClearDialogs () { map <string, Dialog *>::iterator i; while (!Dialogs.empty ()) { i = Dialogs.begin (); if ((*i).second) (*i).second->Destroy (); else Dialogs.erase (i); } } }
false
false
false
false
false
0
RequestInformation( vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector) { FILE* xyzFp; if ( this->CheckGeometryFile(xyzFp) != VTK_OK) { return 0; } this->CalculateFileSize(xyzFp); this->ReadGeometryHeader(xyzFp); fclose(xyzFp); vtkInformation* info = outputVe...
false
false
false
false
false
0
find_call(const struct sockaddr_atmpvc *in, const struct sockaddr_atmpvc *out) { USER_CALL *u_call; for (u_call = calls; u_call; u_call = u_call->next) if (atm_equal((struct sockaddr *) in, (struct sockaddr *) &u_call->call.in.pvc,0,0) && atm_equal((struct sockaddr *) out, (struct sockaddr *) &u_ca...
false
false
false
false
false
0
operator*(const HepSymMatrix &m1,const HepVector &m2) #ifdef HEP_GNU_OPTIMIZED_RETURN return mret(m1.num_row()); { #else { HepVector mret(m1.num_row()); #endif CHK_DIM_1(m1.num_col(),m2.num_row(),*); HepMatrix::mcIter sp,snp,vpt; double temp; int step,stept; HepMatrix::mIter vrp=mret.m.begin(); for(s...
false
false
false
false
false
0
worm_reasons(int color) { int pos; int k; for (pos = BOARDMIN; pos < BOARDMAX; pos++) { if (!ON_BOARD(pos) || board[pos] == EMPTY) continue; if (!is_worm_origin(pos, pos)) continue; if (board[pos] == OTHER_COLOR(color)) { for (k = 0; k < MAX_TACTICAL_POINTS; k++) { if (worm[pos...
false
false
false
false
false
0
pki_key_ecdsa_to_nid(EC_KEY *k) { const EC_GROUP *g = EC_KEY_get0_group(k); int nid; nid = EC_GROUP_get_curve_name(g); if (nid) { return nid; } return -1; }
false
false
false
false
false
0
eof_callback() { if(layer_ == LAYER_STREAM) return false; if(error_occurred_) return true; return (bool)feof(file_); }
false
false
false
false
false
0
PySequence_SetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2, PyObject *o) { PyMappingMethods *mp; if (s == NULL) { null_error(); return -1; } mp = s->ob_type->tp_as_mapping; if (mp && mp->mp_ass_subscript) { int res; PyObject *slice = _PySlice_FromIndices(i1, i2);...
false
false
false
false
false
0
btrfs_get_bdev_and_sb(const char *device_path, fmode_t flags, void *holder, int flush, struct block_device **bdev, struct buffer_head **bh) { int ret; *bdev = blkdev_get_by_path(device_path, flags, holder); if (IS_ERR(*bdev)) { ret = PTR_ERR(*bdev); goto error; } if (flush) filemap_write_a...
false
false
false
false
false
0
hsep_get_static_str(int row, int column) { const char *ret = NULL; hsep_triple hsep_table[G_N_ELEMENTS(hsep_global_table)]; hsep_triple other[1]; uint64 v; hsep_get_global_table(hsep_table, G_N_ELEMENTS(hsep_table)); hsep_get_non_hsep_triple(other); switch (column) { case HSEP_IDX_NODES: { static c...
false
false
false
false
false
0
position(int yy) { if (yy < 0) yy = 0; if (yy == position_) return; position_ = yy; if (yy != real_position_) redraw_lines(); }
false
false
false
false
false
0
kvm_lapic_enable_pv_eoi(struct kvm_vcpu *vcpu, u64 data) { u64 addr = data & ~KVM_MSR_ENABLED; if (!IS_ALIGNED(addr, 4)) return 1; vcpu->arch.pv_eoi.msr_val = data; if (!pv_eoi_enabled(vcpu)) return 0; return kvm_gfn_to_hva_cache_init(vcpu->kvm, &vcpu->arch.pv_eoi.data, addr, sizeof(u8)); }
false
false
false
false
false
0
input_pad_gtk_window_set_priv (InputPadGtkWindow *window) { InputPadGtkWindowPrivate *priv = INPUT_PAD_GTK_WINDOW_GET_PRIVATE (window); GdkColor color; if (priv->group == NULL) { priv->group = input_pad_group_parse_all_files (NULL, NULL); } priv->char_button_sensitive = TRUE; if (!gdk_...
false
false
false
false
false
0
glkputa_confirm(GLKDisplay *fd, int len, unsigned char *str) { int i; int retval; retval = 0; /* Assume Success */ for (i = len; !retval && i; ++str, --i) { retval = glkput_confirm(fd, *str); } return(retval); }
false
false
false
false
false
0
ParseFieldOptions(FieldDescriptorProto* field, const LocationRecorder& field_location) { if (!LookingAt("[")) return true; LocationRecorder location(field_location, FieldDescriptorProto::kOptionsFieldNumber); DO(Consume("[")); // Parse field options....
false
false
false
false
false
0
pdf14_copy_planes(gx_device * dev, const byte * data, int data_x, int raster, gx_bitmap_id id, int x, int y, int w, int h, int plane_height) { pdf14_device *pdev = (pdf14_device *)dev; #if RAW_DUMP pdf14_ctx *ctx = pdev->ctx; #endif pdf14_buf *buf = pdev->ctx->stack; int num_planes = ...
false
false
false
false
false
0
format4(struct ftio *ftio, struct options *opt) { struct ftver ftv; struct ftencode fte; char *rec; int ret; /* initialize encode struct */ ftencode_init(&fte, 0); /* copy version from io stream */ ftio_get_ver(ftio, &ftv); bcopy(&ftv, &fte.ver, sizeof ftv); /* foreach flow */ while ((rec = ft...
false
false
false
false
false
0
Copy () { OverlayComp* dest = (_group == nil) ? nil : (OverlayComp*) _group->Copy(); Command* copy = new OvGroupCmd(CopyControlInfo(), dest); InitCopy(copy); return copy; }
false
false
false
false
false
0
ast_dial_option_global_disable(struct ast_dial *dial, enum ast_dial_option option) { /* If the option is not enabled, return failure */ if (!dial->options[option]) { return -1; } /* Execute callback of option to disable if it exists */ if (option_types[option].disable) option_types[option].disable(dial->optio...
false
false
false
false
false
0
excel_formula_write_NAME_v7 (PolishData *pd, GnmExpr const *expr, XLOpType target_type) { guint8 data [25]; gpointer tmp; unsigned name_idx; memset (data, 0, sizeof data); tmp = g_hash_table_lookup (pd->ewb->names, (gpointer)expr->name.name); g_return_if_fail (tmp != NULL); name_idx = GPOINTER_...
false
false
false
false
false
0
wait_till_ready(struct spi_device *spi_nand) { unsigned long deadline; int retval; u8 stat = 0; deadline = jiffies + MAX_WAIT_JIFFIES; do { retval = spinand_read_status(spi_nand, &stat); if (retval < 0) return -1; else if (!(stat & 0x1)) break; cond_resched(); } while (!time_after_eq(jiffies, dead...
false
false
false
false
false
0
sieve(int n) { prime.clear(); prime.insert(prime.end(), 1); prime.insert(prime.end(), 2); for (int i = 3; i <= n; i += 2) { bool composite = false; for (simple_vector<int>::const_iterator j = prime.begin(); j != prime.end(); ++j) { if (*j != 1 && i % *j == 0) { composite = true; brea...
false
false
false
false
false
0
parallel_transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr, char *old_pgdata, char *new_pgdata, char *old_tablespace) { #ifndef WIN32 pid_t child; #else HANDLE child; transfer_thread_arg *new_arg; #endif if (user_opts.jobs <= 1) /* throw_error must be true to allow jobs */ t...
false
false
false
false
false
0
xlsx_find_border (GnmStyle const *style, GPtrArray *styles) { unsigned i; for (i = 0 ; i < styles->len ; i++) { GnmStyle const *old_style = g_ptr_array_index (styles, i); if (style == old_style) return (gint) i; if (gnm_style_is_element_set (style, MSTYLE_BORDER_TOP) != gnm_style_is_element_set (old_s...
false
false
false
false
false
0
main () { int i=0,j=0, N=100; float dt=0.05, t; Raptor player(40,40), Charlie(0,0), Temp; player.vx= 4.0; player.vy= -4.0; player.speed=sqrt(player.vx*player.vx+player.vy*player.vy); //Initial data t=i*dt; cout <<t<<"\t"<<player.x<<"\t"<<player.y<<"\t"<<Charlie.x<<"\t"<<Charlie.y<<endl; // RUN!...
false
false
false
false
false
0
tree_key_press_event(G_GNUC_UNUSED GtkWidget *widget, GdkEventKey *event, GigoloBrowseNetworkPanel *panel) { if (event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter || event->keyval == GDK_KP_Enter || event->keyval == GDK_space) { mount_share(panel, GIGOLO_BE_MODE_CONNECT); return TRUE; ...
false
false
false
false
false
0
Get_chk_log_entries(int sim_handle, int chk_handle, int num_entries, Output_log_struct *entries) { int i; int isim; int count; Sim_entry_type *sim; int return_status = REG_SUCCESS; if(!entries) return REG_FAILURE; if((isim = Sim_index_from_handle...
false
false
false
false
false
0
init_sound() { try { open_sound_device(); configure_sound_device(); sound = true; } catch (SoundError &se) { sound = false; switch (se.code) { case SE_OPENFAIL: g_message("An error occured while opening the sound device\n\t%s", se.description); break; case SE_FRAGFAIL: g_message("An e...
false
false
false
false
false
0
may_propagate_copy_into_stmt (gimple dest, tree orig) { tree type_d; tree type_o; /* If the statement is a switch or a single-rhs assignment, then the expression to be replaced by the propagation may be an SSA_NAME. Fortunately, there is an explicit tree for the expression, so we delegate to may_...
false
false
false
false
false
0
gpx_write_common_extensions(const waypoint* waypointp, const char* indent) { if (((opt_humminbirdext || opt_garminext) && (waypointp->depth != 0 || waypointp->temperature != 0)) || (opt_garminext && (waypointp->heartrate != 0 || waypointp->cadence != 0))) { gbfprintf(ofd, "%s<extensions>\n", indent); if...
false
false
false
false
false
0
format10(struct fmtargs *args) { struct fts3rec_offsets fo; struct fopd32 cur; struct ftver ftv; struct ftchash *ftch; struct ftchash_rec_ip2 ftch_recip2, *ftch_recip2p; struct fopd total; u_int32 hash; char *rec; ftio_get_ver(&args->ftio, &ftv); if (ftio_check_xfield(&args->ftio, FT_XFIELD_DPKTS ...
false
false
false
false
false
0
__pci_dev_reset(struct pci_dev *dev, int probe) { int rc; might_sleep(); rc = pci_dev_specific_reset(dev, probe); if (rc != -ENOTTY) goto done; rc = pcie_flr(dev, probe); if (rc != -ENOTTY) goto done; rc = pci_af_flr(dev, probe); if (rc != -ENOTTY) goto done; rc = pci_pm_reset(dev, probe); if (rc !...
false
false
false
false
false
0
rtl_block_ends_with_call_p (basic_block bb) { rtx insn = BB_END (bb); while (!CALL_P (insn) && insn != BB_HEAD (bb) && (keep_with_call_p (insn) || NOTE_P (insn) || DEBUG_INSN_P (insn))) insn = PREV_INSN (insn); return (CALL_P (insn)); }
false
false
false
false
false
0
gst_auto_audio_src_create_element_with_pretty_name (GstAutoAudioSrc * src, GstElementFactory * factory) { GstElement *element; gchar *name, *marker; marker = g_strdup (GST_OBJECT_NAME (factory)); if (g_str_has_suffix (marker, "src")) marker[strlen (marker) - 4] = '\0'; if (g_str_has_prefix (marker, "...
false
false
false
false
false
0
init(MEM_ROOT *mem, const char *host_arg, const char *user_arg, const char *proxied_host_arg, const char *proxied_user_arg, bool with_grant_arg) { init ((host_arg && *host_arg) ? strdup_root (mem, host_arg) : NULL, (user_arg && *user_arg) ? strdup_root (mem, user_arg) : NULL, (pr...
false
false
false
false
false
0
lad_sm_search_last_mod_use_block(StripMining *sm, Array_table *ldm, int work) { List *li; StripMiningInnerLoop *smil; Block *block, *last; Array_def_use_table_semnode *mod_use, *aduts; int mod_use_entry; int flag; last = NULL; mod_use = NULL; for (li = sm->loops; li != NU...
false
false
false
false
false
0
AddChildNode ( XMP_Node * xmpParent, const XML_Node & xmlNode, const XMP_StringPtr value, bool isTopLevel ) { #if 0 cout << "AddChildNode, parent = " << xmpParent->name << ", child = " << xmlNode.name; cout << ", value = \"" << value << '"'; if ( isTopLevel ) cout << ", top level"; cout << endl; #endif if ...
false
false
false
false
false
0
snd_ak4531_mixer(struct snd_card *card, struct snd_ak4531 *_ak4531, struct snd_ak4531 **rak4531) { unsigned int idx; int err; struct snd_ak4531 *ak4531; static struct snd_device_ops ops = { .dev_free = snd_ak4531_dev_free, }; if (snd_BUG_ON(!card || !_ak4531)) return -EINVAL; if (rak4531) *r...
false
true
false
false
false
1
DLM_QueueCheck( CString nick, CString hubname, CString hubhost, CString remotename, CString localname, CString localpath, CString localrootpath, eltMedium, ulonglong size, CString tth ) { m_pDownloadQueue->pQueueMutex->Lock(); // this should really be fixed globally if ( tth.Left(4).ToUpper() == "TTH:" ...
false
false
false
false
false
0
GenerateImportedFileChecksCode(std::ostream& os, cmTarget* target, ImportPropertyMap const& properties, const std::set<std::string>& importedLocations) { // Construct the imported target name. std::string targetName = this->Namespace; targetName += ...
false
false
false
false
false
0
anthy_input_move(struct anthy_input_context* ictx, int lr) { switch (ictx->state) { case ANTHY_INPUT_ST_OFF: break; case ANTHY_INPUT_ST_NONE: break; case ANTHY_INPUT_ST_EDIT: cmd_move_cursor(ictx, lr); break; case ANTHY_INPUT_ST_CONV: cmd_move_selection(ictx, lr); break; case ANTHY...
false
false
false
false
false
0
parseLimitLine(char *line) { char *value = next_field(&line); if (!value) { _output->setError(RESPONSE_CODE_INVALID_HEADER, "Header Limit: missing value"); } else { int limit = atoi(value); if (!isdigit(value[0]) || limit < 0) _output->setError(RESPONSE_CODE_INVALID_H...
false
false
false
false
false
0
simple_method_enter (MonoProfiler *prof, MonoMethod *method) { static int guithread; static gboolean guithread_set = FALSE; MonoClass* klass; const char* name_space; klass = mono_method_get_class (method); name_space = mono_class_get_namespace (klass); int current_thread_id = (int) pthread_self(); if (str...
false
false
false
false
false
0
ili922x_read(struct spi_device *spi, u8 reg, u16 *rx) { struct spi_message msg; struct spi_transfer xfer_regindex, xfer_regvalue; unsigned char tbuf[CMD_BUFSIZE]; unsigned char rbuf[CMD_BUFSIZE]; int ret, len = 0, send_bytes; memset(&xfer_regindex, 0, sizeof(struct spi_transfer)); memset(&xfer_regvalue, 0, size...
true
true
false
false
false
1
GetStandbyLimitTime(void) { TimestampTz rtime; bool fromStream; /* * The cutoff time is the last WAL data receipt time plus the appropriate * delay variable. Delay of -1 means wait forever. */ GetXLogReceiptTime(&rtime, &fromStream); if (fromStream) { if (max_standby_streaming_delay < 0) return 0; ...
false
false
false
false
false
0
time_stamp(uschar *timebuf, int size) { int diff_hour, diff_min, len; time_t now = time(NULL); struct tm *gmt; struct tm local; memcpy(&local, localtime(&now), sizeof(struct tm)); gmt = gmtime(&now); diff_min = 60*(local.tm_hour - gmt->tm_hour) + local.tm_min - gmt->tm_min; if (local.tm_year != gmt->tm_year) diff_m...
false
false
false
false
false
0
AB_ImExporterYN__ReadLNE_LNS(AB_IMEXPORTER *ie, AB_IMEXPORTER_ACCOUNTINFO *ai, GWEN_XMLNODE *node) { GWEN_XMLNODE *n; n=GWEN_XMLNode_FindFirstTag(node, "SG6", 0, 0); if (n) { AB_TRANSACTION *t; GWEN_XMLNODE *nn; ...
false
false
false
false
false
0
r852_update_media_status(struct r852_device *dev) { uint8_t reg; unsigned long flags; int readonly; spin_lock_irqsave(&dev->irqlock, flags); if (!dev->card_detected) { message("card removed"); spin_unlock_irqrestore(&dev->irqlock, flags); return ; } readonly = r852_read_reg(dev, R852_CARD_STA) & R852_CA...
false
false
false
false
false
0
validate ( QString &str, int &pos ) const { str = str.toLower(); for(int i = 0; i < pos; i++) { if( ! ((str[i] >= 'a' && str[i] <= 'f') || (str[i] >= '0' && str[i] <= '9') ) && ! (i == 1 && str[i] == 'x' ) ) { return Invalid; } } return Acceptable; }
false
false
false
false
false
0
report_verbose(const bench_problem *p, double *t, int st) { struct stats s; char bmin[64], bmax[64], bavg[64], bmedian[64], btmin[64]; char bsetup[64]; int copyp = tensor_sz(p->sz) == 1; mkstat(t, st, &s); sprintf_time(s.min, bmin, 64); sprintf_time(s.max, bmax, 64); sprintf_ti...
false
false
false
false
false
0
queue (dump_info_p di, const_tree t, int flags) { dump_queue_p dq; dump_node_info_p dni; unsigned int index; /* Assign the next available index to T. */ index = ++di->index; /* Obtain a new queue node. */ if (di->free_list) { dq = di->free_list; di->free_list = dq->next; } else ...
false
false
false
false
false
0
lldp_mgmt_addr_tlv_print(const u_char *pptr, u_int len) { u_int8_t mgmt_addr_len, intf_num_subtype, oid_len; const u_char *tptr; u_int tlen; tlen = len; tptr = pptr; mgmt_addr_len = *tptr++; tlen--; if (tlen < mgmt_addr_len) { return 0; } printf("\n\t Management...
false
false
false
false
false
0
tracing_record_cmdline(struct task_struct *tsk) { if (atomic_read(&trace_record_cmdline_disabled) || !tracing_is_on()) return; if (!__this_cpu_read(trace_cmdline_save)) return; if (trace_save_cmdline(tsk)) __this_cpu_write(trace_cmdline_save, false); }
false
false
false
false
false
0
count_map_constraints(struct isl_sched_graph *graph, struct isl_sched_edge *edge, __isl_take isl_map *map, int *n_eq, int *n_ineq, int carry, int use_coincidence) { isl_basic_set *coef; int f = edge_multiplicity(edge, carry, use_coincidence); if (f == 0) { isl_map_free(map); return 0; } if (edge->src == ed...
false
false
false
false
false
0
ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block, unsigned int nr, struct buffer_head *bhs[]) { int status = 0; unsigned int i; struct buffer_head *bh; trace_ocfs2_read_blocks_sync((unsigned long long)block, nr); if (!nr) goto bail; for (i = 0 ; i < nr ; i++) { if (bhs[i] == NULL) { bhs[i...
false
false
false
false
false
0
dump_kern_db(FILE *fp, int to_hist) { struct nstat_ent *n, *h; const char *eol = "\n"; h = hist_db; if (json_output) fprintf(fp, "{ \"%s\":{", info_source); else fprintf(fp, "#%s\n", info_source); for (n=kern_db; n; n=n->next) { unsigned long long val = n->val; if (!dump_zeros && !val && !n->rate) co...
false
false
false
false
false
0
drsuapi_dissect_DsReplicaCoursor3Ctr(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *parent_tree, dcerpc_info *di _U_, guint8 *drep _U_, int hf_index, guint32 param _U_) { proto_item *item=NULL; proto_tree *tree=NULL; int old_offset; ALIGN_TO_8_BYTES; old_offset=offset; if(paren...
false
false
false
false
false
0
ex_spellinfo(eap) exarg_T *eap; { int lpi; langp_T *lp; char_u *p; if (no_spell_checking(curwin)) return; msg_start(); for (lpi = 0; lpi < curbuf->b_langp.ga_len && !got_int; ++lpi) { lp = LANGP_ENTRY(curbuf->b_langp, lpi); msg_puts((char_u *)"file: "); msg_puts(lp->lp_slang->sl_f...
false
false
false
false
false
0
client_player_each(void (*callback)(const client_player_t *player, void *opaque), void *opaque) { for (int n = 0; n < MAXPLAYERS; n++) { const client_player_t *player = &players[n]; if (!PLAYER_USED(player)) continue; callback(player, opaque); } }
false
false
false
false
false
0
get_ups_statuscode() { BYTE length; riello_init_serial(); length = riello_prepare_rc(&bufOut[0], gpser_error_control); if (ser_send_buf(upsfd, bufOut, length) == 0) { upsdebugx (3, "Communication error while writing to port"); return -1; } riello_serialcomm(&bufIn[0], DEV_RIELLOGPSER); if (!wait_packet...
false
false
false
false
false
0
pass(char *passwd) { int rval; /* some clients insists on sending a password */ if (logged_in && askpasswd == 0){ reply(230, "Password not necessary"); return; } if (logged_in || askpasswd == 0) { reply(503, "Login with USER first."); return; } askpasswd = 0; rval = 1; if (!guest) { /* "ftp" i...
false
false
false
false
false
0
curl_debug_cb(__maybe_unused CURL *handle, curl_infotype type, __maybe_unused char *data, size_t size, void *userdata) { struct pool *pool = (struct pool *)userdata; switch(type) { case CURLINFO_HEADER_IN: case CURLINFO_DATA_IN: case CURLINFO_SSL_DATA_IN: pool->cgminer_pool_stats.net_bytes_received += s...
false
false
false
false
false
0
add_png_text_chunk_string(png_text *chunk, const gchar *key, const gchar *str, gboolean take) { chunk->compression = PNG_TEXT_COMPRESSION_NONE; chunk->key = (char*)key; chunk->text = take ? (char*)str : g_strdup(str); chunk->t...
false
false
false
false
false
0
compute_data_dependences_for_loop (struct loop *loop, bool compute_self_and_read_read_dependences, VEC (loop_p, heap) **loop_nest, VEC (data_reference_p, heap) **datarefs, VEC (ddr_p, heap) **dependence_relations) { bool res = true; memset (&dependence_stats, 0, sizeof (dependence_stats...
false
false
false
false
false
0
eXdbmPathList(DB_ID dbid, char *path) { TDbmListEntry *search; char *found; int ret; /* the database manager must be initialized */ ret = DbmIsInit(); if( ret == -1) return(NULL); /* check the dbid parameter */ if(CheckDbIdent(dbid) == -1) { RaiseError(DBM_WRONG_ID); return(NULL); } /* ...
false
false
false
false
false
0