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
Glazymanage (Widget w) { if (Glazyq.flag & LAZYMANAGE) { if ( XtParent (Glazyq.mws[Glazyq.mwn - 1]) != XtParent (w) || Glazyq.mwn >= LAZYQNUM ) { XtManageChildren (Glazyq.mws, Glazyq.mwn); Glazyq.mwn = 0; } } else { Glazyq.flag |= L...
false
false
false
false
false
0
EndElement(const char*) { vtkXMLDataElement* finished = this->PopOpenElement(); unsigned int numOpen = this->NumberOfOpenElements; if(numOpen > 0) { this->OpenElements[numOpen-1]->AddNestedElement(finished); finished->Delete(); } else { this->RootElement = finished; } }
false
false
false
false
false
0
gnc_ui_payment_new_with_invoice (const GncOwner *owner, QofBook *book, GncInvoice *invoice) { GncOwner owner_def; if (!book) return NULL; if (owner) { /* Figure out the company */ gncOwnerCopy (gncOwnerGetEndOwner (owner), &owner_def); } else ...
false
false
false
false
false
0
initialize( ARGPARSE_ARGS *arg, const char *filename, unsigned *lineno ) { if( !(arg->flags & (1<<15)) ) { /* Initialize this instance. */ arg->internal.idx = 0; arg->internal.last = NULL; arg->internal.inarg = 0; arg->internal.stopped = 0; arg->internal.aliases = NULL; a...
false
false
false
false
false
0
Java_com_sleepycat_db_internal_db_1javaJNI_DbEnv_1get_1data_1dirs(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jobjectArray jresult = 0 ; struct DbEnv *arg1 = (struct DbEnv *) 0 ; char **result = 0 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = *(struct DbEnv **)&jarg1; if (jarg1 == ...
false
false
false
false
false
0
__mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage) { int err = 0; int old_signal_voltage = host->ios.signal_voltage; host->ios.signal_voltage = signal_voltage; if (host->ops->start_signal_voltage_switch) err = host->ops->start_signal_voltage_switch(host, &host->ios); if (err) host->ios.signa...
false
false
false
false
false
0
OpenByName(const AString &s) { AString temp = s; file->open(temp.Str(), ios::out|ios::trunc); if (!file->rdbuf()->is_open()) return -1; // Handle a broke ios::ate implementation on some boxes file->seekp(0, ios::end); if((int)file->tellp() != 0) { file->close(); return -1; } tabs = 0; wraptab = 0; ...
false
false
false
false
false
0
seat_xlocal_create_display_server (Seat *seat, Session *session) { const gchar *session_type; session_type = session_get_session_type (session); if (strcmp (session_type, "x") == 0) return DISPLAY_SERVER (create_x_server (seat)); else if (strcmp (session_type, "mir") == 0) return create...
false
false
false
false
false
0
playlist_by_unique_id (int id) { ENTER; Playlist * p = g_hash_table_lookup (unique_id_table, GINT_TO_POINTER (id)); int num = p ? p->number : -1; RETURN (num); }
false
false
false
false
false
0
ds1685_rtc_sysfs_ctrl_regs_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct ds1685_priv *rtc = dev_get_drvdata(dev); u8 reg = 0, bit = 0, tmp; unsigned long flags; long int val = 0; const struct ds1685_rtc_ctrl_regs *reg_info = ds1685_rtc_sysfs_ctrl_regs_...
false
false
false
false
false
0
unionfind_root (struct web_entry *element) { struct web_entry *element1 = element, *element2; while (element->pred) element = element->pred; while (element1->pred) { element2 = element1->pred; element1->pred = element; element1 = element2; } return element; }
false
false
false
false
false
0
follow_parse_test() { FILE *f = fopen("tmp.json", "w"); char result[300]; struct _ojcErr err; ojcVal val = NULL; const char *json = "[1,2,3,4]"; fwrite(json, 1, strlen(json), f); fclose(f); ojc_err_init(&err); f = fopen("tmp.json", "r"); ojc_parse_stream_follow(&err, f, fol...
false
false
false
false
false
0
mdb_index_swap_n(unsigned char *src, int sz, unsigned char *dest) { int i, j = 0; for (i = sz-1; i >= 0; i--) { dest[j++] = src[i]; } }
false
false
false
false
false
0
gc_master_load_providers (GcMaster *master) { GDir *dir; GError *error = NULL; const char *filename; dir = g_dir_open (GEOCLUE_PROVIDERS_DIR, 0, &error); if (dir == NULL) { g_warning ("Error opening %s: %s\n", GEOCLUE_PROVIDERS_DIR, error->message); g_error_free (error); return; } filename = g_dir_...
false
false
false
false
false
0
CreatePubSubRetractItemElem(const std::string& node, const std::string& itemid) { XmlElement* pubsub_elem = new XmlElement(QN_PUBSUB, true); XmlElement* retract_elem = new XmlElement(QN_PUBSUB_RETRACT, false); retract_elem->AddAttr(QN_NODE, node); retract_elem->AddAttr(QN...
false
false
false
false
false
0
build(bool stencilShadows) { // Create a node mNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(mName, mCentre); mNode->attachObject(this); // We need to create enough LOD buckets to deal with the highest LOD // we encountered in all the meshes queued ...
false
false
false
false
false
0
getExpandInfo() { gint i; gboolean* expandeds = NULL; gint nNodes = 0; gchar* pathString = NULL; GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeView)); nNodes = 0; pathString = g_strdup_printf("%d", nNodes); while (gtk_tree_model_get_iter_from_string (model, &iter, pathStri...
false
false
false
false
false
0
carl9170_usb_cancel_urbs(struct ar9170 *ar) { int err; carl9170_set_state(ar, CARL9170_UNKNOWN_STATE); err = carl9170_usb_flush(ar); if (err) dev_err(&ar->udev->dev, "stuck tx urbs!\n"); usb_poison_anchored_urbs(&ar->tx_anch); carl9170_usb_handle_tx_err(ar); usb_poison_anchored_urbs(&ar->rx_anch); tasklet...
false
false
false
false
false
0
has_finalizer(PyObject *op) { if (PyInstance_Check(op)) { assert(delstr != NULL); return _PyInstance_Lookup(op, delstr) != NULL; } else if (PyType_HasFeature(op->ob_type, Py_TPFLAGS_HEAPTYPE)) return op->ob_type->tp_del != NULL; else if (PyGen_CheckExact(op)) return PyGen...
false
false
false
false
false
0
Dump(std::ostream &os) const { ios_format_state state(os); static const char *DisplayModeName[] = { N_("Automatic"), N_("Enabled"), N_("Disabled"), N_("Unknown") }; static const char *JavaScriptModeName[] = { N_("Automatic"), N_("Enabled"), N_("Disabled"), N_("Unknown") }; static const char *Brow...
false
false
false
false
false
0
bound_expand(fz_rect r, fz_point p) { if (p.x < r.x0) r.x0 = p.x; if (p.y < r.y0) r.y0 = p.y; if (p.x > r.x1) r.x1 = p.x; if (p.y > r.y1) r.y1 = p.y; return r; }
false
false
false
false
false
0
readMeshFace(istream & fin, vector<MeshFace> & v, unsigned int count) { char buf[256]; vector<string> token; unsigned int i = 0; //cerr << "*** MeshFace\n"; while (i < count && fin.getline(buf, sizeof(buf))) { // Tokenize token.clear(); ...
false
false
false
false
false
0
EHcntGROUP(char *metabuf[]) { int32 count = 0; /* Counter */ char *metaptr; /* Beginning of metadata section */ char *endptr; /* End of metadata section */ char *tempptr; /* Pointer within metadata section */ /* Get Pointers to beginning and ending of metad...
false
false
false
false
false
0
_realloc_jelist() { struct bucket **nhash, *bkt, *nbkt; int oldsize = hashsize; int i, count=0; if(hashcount > (1<<(hashsize+1))) hashsize += 2; else { while( (hashsize > 2) && (hashcount < (1<<(hashsize+1))) ) hashsize -= 1; if(hashsize == oldsize) return 0; } nhash = j...
false
false
false
false
false
0
SizeHandles() { double radius = this->vtk3DWidget::SizeHandles(this->HandleSizeFactor); if (this->ValidPick && !this->LastPickValid) { // Adjust factor to preserve old radius. double oldradius = this->HandleGeometry[0]->GetRadius(); if (oldradius != 0 && radius != 0) { this->HandleSiz...
false
false
false
false
false
0
ak4642_probe(struct snd_soc_codec *codec) { struct ak4642_priv *priv = snd_soc_codec_get_drvdata(codec); if (priv->mcko) ak4642_set_mcko(codec, clk_get_rate(priv->mcko)); return 0; }
false
false
false
false
false
0
cx25821_registers_init(struct cx25821_dev *dev) { u32 tmp; /* enable RUN_RISC in Pecos */ cx_write(DEV_CNTRL2, 0x20); /* Set the master PCI interrupt masks to enable video, audio, MBIF, * and GPIO interrupts * I2C interrupt masking is handled by the I2C objects themselves. */ cx_write(PCI_INT_MSK, 0x2001FFFF...
false
false
false
false
false
0
mt_srch_by_type(MT_MAP_T *t2e, FILE *file) { char buffer[LINE_BUF_SIZE]; /* construct a loop reading the file line by line. Then check each * line for a matching definition. */ while(fgets(buffer,LINE_BUF_SIZE,file) != NULL){ char *typespec; char *try_extension; if(buffer[0] == '#') contin...
false
false
false
false
false
0
node_copy_deep(node_t* node, copy_func_t copy_func) { if (!node) return NULL; void *data = NULL; if (copy_func) { data = copy_func(node->data); } node_t* copy = node_create(NULL, data); node_t* ch; for (ch = node_first_child(node); ch; ch = node_next_sibling(ch)) { node_t* cc = node_copy_deep(ch, copy_func);...
false
false
false
false
false
0
e2_task_run_task (E2_TaskType type, E2_ActionRuntime *art, gpointer from, gpointer taskfunc, gpointer callback, gboolean immediate, gboolean pane_data) { GPtrArray *names; gchar *specific_path = NULL; if (pane_data) { if (g_str_has_prefix (art->action->name, _A(5))) { //this is an action potentially applying ...
false
false
false
false
false
0
fa_pwrite(const void* buf,size_t size,off_t offset) { NORETRYLOOP { unsigned int l = size; STARTHEADER(CMD_WRITEFILEAT,sizeof(offset)+sizeof(l)+l); if(!swrite(*file_access_,&offset,sizeof(offset))) ABORTALL; if(!swrite(*file_access_,&l,sizeof(l))) ABORTALL; if(!swrite(*file_access_,buf,l)) ABORT...
false
false
false
false
false
0
ad1848_tmr_restart(int dev) { unsigned long flags; ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; if (current_interval == 0) return; spin_lock_irqsave(&devc->lock,flags); ad_write(devc, 16, ad_read(devc, 16) | 0x40); devc->timer_running = 1; spin_unlock_irqrestore(&devc->lock,flags); }
false
false
false
false
false
0
printNernstWIMS(std::ostream & o, bool wantedlatex){ bool printed = false; bool addcomma = false; for (int i=0; i<size(); i++) { std::ostringstream w; if (operator[](i)->printNernstWIMS(w,wantedlatex)){ if (addcomma) o << ", "; o << w.str(); printed = true; addcomma = true; }...
false
false
false
false
false
0
x_c_lex (xgettext_token_ty *tp) { for (;;) { token_ty token; void *keyword_value; phase8_get (&token); switch (token.type) { case token_type_eof: tp->type = xgettext_token_type_eof; return; case token_type_name: last_non_comment_line ...
false
false
false
false
false
0
mwl8k_remove_vif(struct mwl8k_priv *priv, struct mwl8k_vif *vif) { /* Has ieee80211_restart_hw re-added the removed interfaces? */ if (!priv->macids_used) return; priv->macids_used &= ~(1 << vif->macid); list_del(&vif->list); }
false
false
false
false
false
0
ldns_get_signing_algorithm_by_name(const char* name) { /* list of (signing algorithm id, alias_name) */ ldns_lookup_table aliases[] = { /* from bind dnssec-keygen */ {LDNS_SIGN_HMACMD5, "HMAC-MD5"}, {LDNS_SIGN_DSA_NSEC3, "NSEC3DSA"}, {LDNS_...
false
false
false
false
false
0
run_events(struct event_base *eb) { if (!eb) return; struct timeval timeout; timeout.tv_sec = 5; timeout.tv_usec = 0; event_base_loopexit(eb, &timeout); event_base_dispatch(eb); }
false
false
false
false
false
0
butCb_set(But *but, bool on, bool makeCallback) { Cb *cb = but->iPacket; assert(but->action == &action); assert(MAGIC(but)); if (cb->on != on) { cb->on = on; but_draw(but); if (makeCallback && (cb->press != NULL)) cb->press(but, on); } }
false
false
false
false
false
0
_clarity_widget_unrealized_cb(GtkWidget *widget, gpointer data) { if (! CLARITY_IS_WIDGET(widget)) return; ClarityWidget *cw = CLARITY_WIDGET(widget); ClarityWidgetPrivate *priv = CLARITY_WIDGET_GET_PRIVATE (cw); if (priv->draw_area == NULL) return; /* * When this widget is b...
false
false
false
false
false
0
BindMtoW() { struct abbrev *ap; const char *word = ask((char *)NULL, "Word: "); if ((ap = lookup_abbrev(A_tables[curbuf->b_major], word)) == NULL && (ap = lookup_abbrev(A_tables[GLOBAL], word)) == NULL) complain("%s: unknown abbrev.", word); ap->a_cmdhook = findmac("Macro: "); }
false
false
false
true
false
1
resolveMethodType(Class *class, int cp_index) { ConstantPool *cp = &(CLASS_CB(class)->constant_pool); Object *mt = NULL; retry: switch(CP_TYPE(cp, cp_index)) { case CONSTANT_Locked: goto retry; case CONSTANT_ResolvedMethodType: mt = (Object *)CP_INFO(cp, cp_index); ...
false
false
false
false
false
0
fileclose(File *f) { Strclose(&f->name); bufclose(&f->b); bufclose(&f->delta); bufclose(&f->epsilon); if(f->rasp) listfree(f->rasp); free(f); }
false
false
false
false
false
0
icalcalendar_get_incoming(icalcalendar* impl) { char path[PATH_MAX]; icalerror_check_arg_rz((impl != 0),"impl"); path[0] = '\0'; strcpy(path,impl->dir); strcat(path,"/"); strcat(path,INCOMING_FILE); if (impl->properties == 0){ impl->properties = icalfileset_new(path); } return im...
false
false
false
false
false
0
draw_page_cb (GtkPrintOperation *operation, GtkPrintContext *context, gint page_number, AlmanahPrintOperation *almanah_operation) { if (almanah_operation->paginated == FALSE) { /* Reset things before we start printing */ almanah_operation->paginated = TRUE; almanah_operation->current_line = 0; g_date_set_dmy (...
false
false
false
false
false
0
InitPopulator() { wxPropertyGridXrcPopulator* populator = new wxPropertyGridXrcPopulator(this); m_populator = populator; }
false
false
false
false
false
0
base64_encode(const uint8_t *in, const uint32_t in_len, uint8_t *out, const uint32_t out_len) { uint8_t rest_len = in_len % 3; const uint8_t *data = in; const uint8_t *stop = in + in_len - rest_len; uint8_t *text = out; uint8_t num; // ...
false
false
false
false
false
0
operator== (DBDate date0,DBDate date1) { DBInt year0 = DBFault, year1 = DBFault; if ((date0.FlagsVAR & DBTimeStepYear) == DBTimeStepYear) year0 = date0.Year (); if ((date1.FlagsVAR & DBTimeStepYear) == DBTimeStepYear) year1 = date1.Year (); if ((year0 == DBFault) || (year1 == DBFault)) year0 = year1 = DBFault;...
false
false
false
false
false
0
next_packet_ra(bgav_demuxer_context_t * ctx) { bgav_packet_t * p; bgav_stream_t * s; ra_priv_t * priv; int len; priv = ctx->priv; s = &ctx->tt->cur->audio_streams[0]; p = bgav_stream_get_packet_write(s); len = s->data.audio.block_align * priv->sub_packet_h; bgav_packet_alloc(p, len); if(bgav_i...
false
false
false
false
false
0
GetItem( wxListItem &info ) const { long mask = info.m_mask; if ( !mask ) // by default, get everything for backwards compatibility mask = -1; if ( mask & wxLIST_MASK_TEXT ) info.m_text = m_text; if ( mask & wxLIST_MASK_IMAGE ) info.m_image = m_image; if ( mask & wxL...
false
false
false
false
false
0
NSC_Decrypt(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pEncryptedData,CK_ULONG ulEncryptedDataLen,CK_BYTE_PTR pData, CK_ULONG_PTR pulDataLen) { SFTKSession *session; SFTKSessionContext *context; unsigned int outlen; unsigned int maxoutlen = *pulDataLen; CK_RV crv; CK_RV crv2; SECS...
false
false
false
false
false
0
processYUV_YUV(imageStruct &image, imageStruct &right) { long src,h,w; int y0,y1; int u,v; src =0; //format is U Y V Y for (h=0; h<image.ysize; h++){ for(w=0; w<image.xsize/2; w++){ u = image.data [src+chU ] + (2*right.data[src+chU ]) - 255; image.data[src] = CLAMP(u); ...
false
false
false
false
false
0
toString(char *buf, int buflen) const { int w = 0; uint s; if (!findFirst(s, true)) return 0; w += ht_snprintf(buf+w, buflen-w, "("); while (buflen-w > 0) { w += ht_snprintf(buf+w, buflen-w, "%d", s); if (!findNext(s, true)) break; w += ht_snprintf(buf+w, buflen-w, ","); } w += ht_snprintf(buf+w, buflen-w,...
false
false
false
false
false
0
_fm_terminal_init(void) { GKeyFile *kf; gsize i, n; gchar **programs; FmTerminal *term; /* read system terminals file */ kf = g_key_file_new(); if(g_key_file_load_from_file(kf, PACKAGE_DATA_DIR "/terminals.list", 0, NULL)) { programs = g_key_file_get_groups(kf, &n); if(p...
false
false
false
false
false
0
PerlIOEncode_getarg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags) { PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode); SV *sv = &PL_sv_undef; PERL_UNUSED_ARG(param); PERL_UNUSED_ARG(flags); if (e->enc) { dSP; /* Not 100% sure stack swap is right thing to do during dup ... */ PUSHSTACKi(PERLSI_MA...
false
false
false
false
false
0
paste_into (NautilusView *view, NautilusFile *target) { PasteIntoData *data; g_assert (NAUTILUS_IS_VIEW (view)); g_assert (NAUTILUS_IS_FILE (target)); data = g_new (PasteIntoData, 1); data->view = g_object_ref (view); data->target = nautilus_file_ref (target); gtk_clipboard_request_contents (nautilus_cl...
false
false
false
false
false
0
dump_gimple_omp_for (pretty_printer *buffer, gimple gs, int spc, int flags) { size_t i; if (flags & TDF_RAW) { dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S>%nCLAUSES <", gs, gimple_omp_body (gs)); dump_omp_clauses (buffer, gimple_omp_for_clauses (gs), spc, flags); ...
false
false
false
false
false
0
gtk_polar_plot_set_ctrl_pos (GtkPolarPlot *plot, gdouble az, gdouble el) { GooCanvasItemModel *root; gint idx; gfloat x,y; guint32 col; if (plot == NULL) return; root = goo_canvas_get_root_item_model (GOO_CANVAS (plot->canvas));...
false
false
false
false
false
0
git_revwalk_free(git_revwalk *walk) { if (walk == NULL) return; git_revwalk_reset(walk); git_odb_free(walk->odb); git_oidmap_free(walk->commits); git_pool_clear(&walk->commit_pool); git_pqueue_free(&walk->iterator_time); git__free(walk); }
false
false
false
false
false
0
perf_lock_task_context(struct task_struct *task, int ctxn, unsigned long *flags) { struct perf_event_context *ctx; retry: /* * One of the few rules of preemptible RCU is that one cannot do * rcu_read_unlock() while holding a scheduler (or nested) lock when * part of the read side critical section was irqs-enab...
false
false
false
false
false
0
new_gbspl( int nt, /* Number of triangles in the list */ gtri **t /* List of triangles to copy into structure */ ) { gbspl *l; int i; static int n = 0; /* Serial number */ if ((l = (gbspl *) calloc(1, sizeof(gbspl) + nt * sizeof(gtri *))) == NULL) { fprintf(stderr,"gamut: malloc failed - bspl triangle tree n...
false
false
false
false
false
0
s5k6aa_set_selection(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_selection *sel) { struct s5k6aa *s5k6aa = to_s5k6aa(sd); struct v4l2_mbus_framefmt *mf; unsigned int max_x, max_y; struct v4l2_rect *crop_r; if (sel->target != V4L2_SEL_TGT_CROP) return -EINVAL; mutex_l...
false
false
false
false
false
0
IsInteger (const std::string &str){ unsigned int max=str.length(); if (!max) return false; unsigned int i=(str[0]=='-')? 1:0; for(; i<max; i++) if (!_isdigit(str[i])) return false; return true; }
false
false
false
false
false
0
process_keha(TreeNode *x) { TreeNode *rel; /* Need to extend to deal with subscripted ke'a, where you have to back-count out of nested relative clauses. */ rel = x->parent; while ((rel->data.nonterm.type != RELATIVE_CLAUSE) && (rel->data.nonterm.type != CHUNKS)) { rel = rel->parent; } i...
false
false
false
false
false
0
get_row_value (GgdDoctypeSelector *self, guint language_id, guint column, void *result) { GtkTreeIter iter; gboolean found = FALSE; if (get_row_iter (self, language_id, &iter)) { gtk_tree_model_get (GTK_TREE_MODEL...
false
false
false
false
false
0
vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type type) { struct usb_usbvision *usbvision = video_drvdata(file); if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; if (usbvision->streaming == stream_on) { usbvision_stream_interrupt(usbvision); /* Stop all video streamings */ c...
false
false
false
false
false
0
stRegisterFile (fileName) char *fileName; { register int i; if (!fileName) return; for (i=0; i < ST_MAX_TMPFILES; i++) if (!tmpNames[i]) { tmpNames[i] = stStrEnter (fileName); break; } if (i == ST_MAX_TMPFILES) /* list is full */ /* WARNING: tmpfile list is full -- couldn't regist...
false
false
false
false
false
0
append_opt(char *body, int bodylen, char *opt, char *name) { int len = strlen(body); if (len) { if (len >= bodylen - 1) return -ENOSPC; body[len++] = '&'; } while (*opt) { if (isalnum(*opt)) { if (len >= bodylen - 1) return -ENOSPC; body[len++] = *opt; } else { if (len >= bodylen - 3) ...
false
false
false
false
false
0
clutter_behaviour_apply (ClutterBehaviour *behave, ClutterActor *actor) { ClutterBehaviourPrivate *priv; g_return_if_fail (CLUTTER_IS_BEHAVIOUR (behave)); g_return_if_fail (CLUTTER_IS_ACTOR (actor)); priv = behave->priv; if (g_slist_find (priv->actors, actor)) { g_war...
false
false
false
true
false
1
OnExit() { #ifndef AMULE_DAEMON if (m_companion) { CMuleInternalEvent termEvent(wxEVT_HTTP_SHUTDOWN); wxPostEvent(m_companion, termEvent); } #endif // Notice the app that the file finished download CMuleInternalEvent evt(wxEVT_CORE_FINISHED_HTTP_DOWNLOAD); evt.SetInt((int)m_file_id); evt.SetExtraLong((lon...
false
false
false
false
false
0
morx_dumpnestedsubs(FILE *temp,SplineFont *sf,OTLookup *otl,struct glyphinfo *gi) { int i, j, gcnt; PST *pst; SplineChar **glyphs, *sc; uint16 *map; struct lookup_subtable *sub = otl->subtables; /* Mac can't have more than one subtable/lookup */ for ( j=0; j<2; ++j ) { gcnt = 0; for ( i = 0; ...
false
false
false
false
false
0
exists_symlink_interpret(string_list_ty *result, const string_list_ty *args, const struct expr_position_ty *pp, const struct opcode_context_ty *ocp) { size_t j; trace(("exists-symlink\n")); (void)pp; (void)ocp; assert(result); assert(args); assert(args->nstrings); for (j = ...
false
false
false
false
false
0
a2ps_job_register_user (a2ps_job *job) { { struct userdata u; userdata_get (&u); if (u.login) macro_meta_sequence_add (job, VAR_USER_LOGIN, u.login); if (u.name) macro_meta_sequence_add (job, VAR_USER_NAME, u.name); if (u.comments) macro_meta_sequence_add (job, VAR_USER_COMMENTS,...
false
false
false
false
false
0
ion_dummy_init(void) { int i, err; idev = ion_device_create(NULL); heaps = kcalloc(dummy_ion_pdata.nr, sizeof(struct ion_heap *), GFP_KERNEL); if (!heaps) return -ENOMEM; /* Allocate a dummy carveout heap */ carveout_ptr = alloc_pages_exact( dummy_heaps[ION_HEAP_TYPE_CARVEOUT].size, GFP_KERNEL); ...
false
false
false
false
false
0
session_conn_recv_pdu(void *data) { struct iscsi_ev_context *ev_context = data; iscsi_conn_t *conn = ev_context->conn; struct iscsi_hdr hdr; conn->recv_context = ev_context; switch (conn->state) { case ISCSI_CONN_STATE_IN_LOGIN: iscsi_recv_login_rsp(conn); break; case ISCSI_CONN_STATE_LOGGED_IN: case ISCS...
false
false
false
false
false
0
check_msr_delta(struct fwtty_port *port, unsigned long mask, struct async_icount *prev) { struct async_icount now; int delta; now = port->icount; delta = ((mask & TIOCM_RNG && prev->rng != now.rng) || (mask & TIOCM_DSR && prev->dsr != now.dsr) || (mask & TIOCM_CAR && prev->dcd != now.dcd) || (mask ...
false
false
false
false
false
0
symtable_dealloc( symtable* symtab /*!< Pointer to root of symtable to clear */ ) { PROFILE(SYMTABLE_DEALLOC); sym_sig* curr; /* Pointer to current sym_sig in list */ sym_sig* tmp; /* Temporary pointer to sym_sig */ int i; /* Loop iterator */ if( symtab != NULL ) { for( i=0; i<256; i++ ) {...
false
false
false
false
false
0
skl_init_pci(struct skl *skl) { struct hdac_ext_bus *ebus = &skl->ebus; /* * Clear bits 0-2 of PCI register TCSEL (at offset 0x44) * TCSEL == Traffic Class Select Register, which sets PCI express QOS * Ensuring these bits are 0 clears playback static on some HD Audio * codecs. * The PCI register TCSEL is d...
false
false
false
false
false
0
add_randomness( const void *buffer, size_t length, int source ) { const byte *p = buffer; if( !is_initialized ) initialize(); rndstats.addbytes += length; rndstats.naddbytes++; while( length-- ) { rndpool[pool_writepos++] ^= *p++; if( pool_writepos >= POOLSIZE ) { if( source > 1 ) pool_fi...
false
false
false
false
false
0
amdlibAddToSpectralCalibrationData ( amdlibRAW_DATA *rawData, amdlibSC_INPUT_DATA *specCalData, amdlibERROR_MSG errMsg) { int i; amdlibLogTrace("amdlibAddToSpectralCalibrationData()"); /* If data s...
false
false
false
false
false
0
write_header(char *filename) { static unsigned short first_file = 1; static char *last = NULL; if (last != filename) { fprintf(stdout, "%s==> %s <==\n", (first_file ? "" : "\n"), pretty_name(filename)); fflush(stdout); /* Make sure the header is printed before the content */ } first_file = 0; last = filena...
false
false
false
false
false
0
brick_create_instable( Game *game, int life_time ) { int mx,my,id; /* choose id of a normal brick */ id = RANDOM(10,17); /* do again if nothing added due to ball or existing brick */ do { mx = RANDOM(1,MAP_WIDTH-2); my = RANDOM(1,1+EDIT_HEIGHT-1); /* only senseful for local game */ ...
false
false
false
false
false
0
iperf_reporter_callback(struct iperf_test *test) { switch (test->state) { case TEST_RUNNING: case STREAM_RUNNING: /* print interval results for each stream */ iperf_print_intermediate(test); break; case DISPLAY_RESULTS: iperf_print_intermediate...
false
false
false
false
false
0
ProcessLoopBlock(HBasicBlock* block, HBasicBlock* loop_header, int loop_kills) { HBasicBlock* pre_header = loop_header->predecessors()->at(0); int depends_flags = HValue::ConvertChangesToDependsFlags(loop_kills); TraceGVN("Loo...
false
false
false
false
false
0
do_read(void) { if (bufpos) { memmove(buf, buf+bufpos, buflen-bufpos); buflen -= bufpos; } while (buflen < sizeof buf) { const char* tmp; unsigned long rd; if (buflen) { if ((tmp = memchr(buf, 0, buflen)) != 0) { unsigned len; plain = buf; encod = tmp + 1; len = encod - buf; if ((tm...
false
true
false
false
true
1
sub128(guint64 alo, guint64 ahi, guint64 blo, guint64 bhi, guint64* pclo, guint64* pchi) { guint64 clo, chi; clo = alo - blo; chi = ahi - bhi; if (alo < blo) chi--; /* borrow */ *pclo = clo; *pchi = chi; }
false
false
false
false
false
0
LookupObject(const char* pszPath) { GDALPDFObject* poCurObj = NULL; char** papszTokens = CSLTokenizeString2(pszPath, ".", 0); for(int i=0; papszTokens[i] != NULL; i++) { int iElt = -1; char* pszBracket = strchr(papszTokens[i], '['); if( pszBracket != NULL ) { ...
false
false
false
false
false
0
LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const { const HexagonRegisterInfo &HRI = *Subtarget.getRegisterInfo(); MachineFrameInfo &MFI = *DAG.getMachineFunction().getFrameInfo(); MFI.setFrameAddressIsTaken(true); EVT VT = Op.getValueType(); SDLoc dl(Op); unsigned Depth = cast<ConstantSDNode>(Op.getOper...
false
false
false
false
false
0
proxy_socket_recv(rad_listen_t *listener) { RADIUS_PACKET *packet; char buffer[128]; packet = rad_recv(listener->fd, 0); if (!packet) { radlog(L_ERR, "%s", fr_strerror()); return 0; } /* * FIXME: Client MIB updates? */ switch(packet->code) { case PW_AUTHENTICATION_ACK: case PW_ACCESS_CHALLENGE: cas...
true
true
false
false
false
1
event_set_mask_with_epoll(struct poll_ctx *ctx, int fd, inputevt_cond_t old, inputevt_cond_t cur) { static const struct epoll_event zero_ev; struct epoll_event ev; int op; g_assert(CTX_IS_LOCKED(ctx)); old &= INPUT_EVENT_RW; cur &= INPUT_EVENT_RW; if (cur == old) return 0; ev = zero_ev; ev.data.ptr = int...
false
false
false
false
false
0
add_instances_of (MonoAotCompile *acfg, MonoClass *klass, MonoType **insts, int ninsts, gboolean force) { int i; MonoGenericContext ctx; MonoType *args [16]; if (acfg->aot_opts.no_instances) return; memset (&ctx, 0, sizeof (ctx)); for (i = 0; i < ninsts; ++i) { args [0] = insts [i]; ctx.class_inst = mono...
false
false
false
false
false
0
display_info(struct spdet * mypriv) { disp_str = mypriv->spu_form; disp_str2 = mypriv->spu_formallow; disp_arg[0] = mypriv->spu_cps; disp_arg[1] = mypriv->spu_minp; disp_arg[2] = mypriv->spu_maxp; disp_arg[3] = mypriv->spu_defp; disp_arg[4] = calccharge(Realuid); fprint_error(stdout, 1220); /* {Spuser display v...
false
false
false
false
false
0
fielddesc_setfloatarg(t_fielddesc *fd, int argc, t_atom *argv) { if (argc <= 0) fielddesc_setfloat_const(fd, 0); else if (argv->a_type == A_SYMBOL) fielddesc_setfloat_var(fd, argv->a_w.w_symbol); else fielddesc_setfloat_const(fd, argv->a_w.w_float); }
false
false
false
false
false
0
test_write_infiniband_connection (void) { NMConnection *connection; NMSettingConnection *s_con; NMSettingInfiniband *s_ib; NMSettingIP4Config *s_ip4; NMSettingIP6Config *s_ip6; char *uuid; GByteArray *mac; guint8 tmpmac[] = { 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0xab, 0xbc, 0xcd, 0xde, 0xef, 0xf0, 0x0a, 0x1b, ...
false
false
false
false
false
0
PyRun_InteractiveOneFlags(FILE *fp, const char *filename, PyCompilerFlags *flags) { PyObject *m, *d, *v, *w, *oenc = NULL; mod_ty mod; PyArena *arena; char *ps1 = "", *ps2 = "", *enc = NULL; int errcode = 0; _Py_IDENTIFIER(encoding); if (fp == stdin) { /* Fetch encoding from sys.std...
false
false
false
false
false
0
drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link) { u8 values[3]; int err; memset(link, 0, sizeof(*link)); err = drm_dp_dpcd_read(aux, DP_DPCD_REV, values, sizeof(values)); if (err < 0) return err; link->revision = values[0]; link->rate = drm_dp_bw_code_to_link_rate(values[1]); link->num_...
false
false
false
false
false
0
ProcessArgument(FormatList::iterator it, signed long long value) { switch (it->type) { case wxT('c'): ProcessArgument(it, (wxChar)value); return; case wxT('i'): break; case wxT('o'): case wxT('x'): case wxT('X'): ProcessArgument(it, (unsigned long long)value); return; case wxT('u'): case w...
false
false
false
false
false
0
message_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp) { CamelMessageInfo *mi; mi = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->message_info_new_from_parser (s, mp); if (mi) { CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *) mi; mbi->frompo...
false
false
false
false
false
0
slapi_be_select( const Slapi_DN *sdn ) /* JCM - The name of this should change??? */ { Slapi_Backend *be; mapping_tree_node *node= slapi_get_mapping_tree_node_by_dn(sdn); if((node!=NULL) && (node->mtn_be!=NULL)) be= node->mtn_be[0]; else be = NULL; if(be==NULL) be= defbacken...
false
false
false
false
false
0
netup_unidvb_ci_write_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr, u8 data) { struct netup_ci_state *state = en50221->data; struct netup_unidvb_dev *dev = state->dev; dev_dbg(&dev->pci_dev->dev, "%s(): addr=0x%x data=0x%x\n", __func__, addr, data); *((u8 __force *)state->membase8_io + addr) =...
false
false
false
false
false
0
start_search (GeditViewFrame *frame) { GtkTextIter start_at; GtkTextBuffer *buffer; GtkSourceSearchContext *search_context; g_return_if_fail (frame->priv->search_mode == SEARCH); search_context = get_search_context (frame); if (search_context == NULL) { return; } buffer = gtk_text_view_get_buffer (GTK_TE...
false
false
false
false
false
0