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
of_thermal_get_temp(struct thermal_zone_device *tz, int *temp) { struct __thermal_zone *data = tz->devdata; if (!data->ops->get_temp) return -EINVAL; return data->ops->get_temp(data->sensor_data, temp); }
false
false
false
false
false
0
SetYXXCapacity(struct Client* c, unsigned int capacity) { unsigned int max_clients = 16; /* * Calculate mask to be used for the maximum number of clients */ while (max_clients < capacity) max_clients <<= 1; /* * Sanity checks */ if (max_clients > NN_MAX_CLIENT) { fprintf(stderr, "MAXCLIENT...
false
false
false
false
false
0
pw_to_struct(struct passwd *pw) { trace(("pw_to_struct()\n{\n" )); rpt_value_struct *p = new rpt_value_struct(); rpt_value::pointer result(p); trace(("pw_name\n")); p->assign("pw_name", rpt_value_string::create(pw->pw_name)); trace(("pw_uid\n")); p->assign("pw_uid", rpt_value_integer::crea...
false
false
false
false
false
0
popup_window_list(const char *dialog_title) { Bounds b, c; getbounds(&b); c=b; b.w=b.w*2/3; b.h=b.h*2/3; b.x=(c.w-b.w)/2; b.y=(c.h-b.h)/2; ht_dialog *dialog=new ht_dialog(); dialog->init(&b, dialog_title, FS_KILLER | FS_TITLE | FS_MOVE); /* create listbox */ c=b; c.x=0; c.y=0; c.w-=2; c.h-=2; ht_text_l...
false
false
false
false
false
0
centralwidgetSet(QWidget * widget) { m_pCentral = widget; if (m_containerPtr) m_containerPtr->applianceSetCentralwidget(m_pCentral.data()); }
false
false
false
false
false
0
gd_tagged_entry_leave_notify (GtkWidget *widget, GdkEventCrossing *event) { GdTaggedEntry *self = GD_TAGGED_ENTRY (widget); if (self->priv->in_child != NULL) { self->priv->in_child = NULL; gtk_widget_queue_draw (widget); } return GTK_WIDGET_CLASS (gd_tagg...
false
false
false
false
false
0
mca_pml_bfo_recv_frag_callback_rndvrestartnack(mca_btl_base_module_t* btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t* des, void* cbdata ) { mca_btl_bas...
false
false
false
false
false
0
asn_check_constraints(asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, char *errbuf, size_t *errlen) { struct errbufDesc arg; int ret; arg.failed_type = 0; arg.failed_struct_ptr = 0; arg.errbuf = errbuf; arg.errlen = errlen ? *errlen : 0; ret = type_descriptor->check_constraints(type_descripto...
false
false
false
false
false
0
xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname) { int low, high, mid, cmp; xmlUnicodeRange *sptr; if ((tptr == NULL) || (tname == NULL)) return(NULL); low = 0; high = tptr->numentries - 1; sptr = tptr->table; while (low <= high) { mid = (low + high) / 2; if (...
false
false
false
false
false
0
probe_element (const gchar * name) { GstElement *element; gchar *devname = NULL; element = gst_element_factory_make (name, name); /* make sure we don't deadlock on GST_ELEMENT_ERROR or do other silly things * if we try to query the "device-name" property when the device isn't open */ g_object_set (elemen...
false
false
false
false
false
0
stars_draw_bitmaps(int show_bitmaps) { int idx; int star_index; // should we even be here? if ( !show_bitmaps ) return; // if we're in the nebula, don't render any backgrounds if (The_mission.flags & MISSION_FLAG_FULLNEB) return; // detail settings if ( !Detail.planets_suns ) return; if ( !Cmdline_no...
false
false
false
false
false
0
write_password_stdout (SecretValue *value) { if (!is_password_value (value)) { g_printerr ("%s: secret does not contain a textual password\n", g_get_prgname ()); exit (1); } write_password_data (value); /* Add a new line if we're writing out to a tty */ if (isatty (1)) write (1, "\n", 1); }
false
false
false
false
false
0
retrive_param_values(param_array *Param) { switch(Param->type.c) { case SQL_C_CHAR: case SQL_C_WCHAR: case SQL_C_TYPE_TIMESTAMP: return (void *)Param->values.string; case SQL_C_SLONG: return (void *)Param->values.integer; case SQL_C_DOUBLE: return (void *)Param->values.floating; c...
false
false
false
false
false
0
il4965_manage_ibss_station(struct il_priv *il, struct ieee80211_vif *vif, bool add) { struct il_vif_priv *vif_priv = (void *)vif->drv_priv; if (add) return il4965_add_bssid_station(il, vif->bss_conf.bssid, &vif_priv->ibss_bssid_sta_id); return il_remove_station(il, vif_priv->ibss_bssid_sta_id, vi...
false
false
false
false
false
0
drmGetLock(int fd, drm_context_t context, drmLockFlags flags) { drm_lock_t lock; memclear(lock); lock.context = context; lock.flags = 0; if (flags & DRM_LOCK_READY) lock.flags |= _DRM_LOCK_READY; if (flags & DRM_LOCK_QUIESCENT) lock.flags |= _DRM_LOCK_QUIESCENT; if (flags & DRM_LOCK...
false
false
false
false
false
0
nv40_clk_calc(struct nvkm_clk *base, struct nvkm_cstate *cstate) { struct nv40_clk *clk = nv40_clk(base); int gclk = cstate->domain[nv_clk_src_core]; int sclk = cstate->domain[nv_clk_src_shader]; int N1, M1, N2, M2, log2P; int ret; /* core/geometric clock */ ret = nv40_clk_calc_pll(clk, 0x004000, gclk, &N1,...
false
false
false
false
false
0
start_bytes (const char *pretty_filename, int fd, uintmax_t n_bytes, uintmax_t *read_pos) { char buffer[BUFSIZ]; while (0 < n_bytes) { size_t bytes_read = safe_read (fd, buffer, BUFSIZ); if (bytes_read == 0) return -1; if (bytes_read == SAFE_READ_ERROR) { ...
true
true
false
false
false
1
addvpndeclprocvar( Figure, Process, Atom, Base ) vpnfig_list *Figure; vpnproc_list *Process; vexexpr *Atom; unsigned char Base; { vpndecl_list *Variable; char *Name; if ( ! IsVexNodeAtom( Atom ) ) Name = getvexarrayname( Atom ); else Name = GetVexAtomValu...
false
false
false
false
false
0
print_neg_locations(pe_working_set_t *data_set) { GListPtr gIter, gIter2; print_as("\nFencing constraints:\n"); for (gIter = data_set->placement_constraints; gIter != NULL; gIter = gIter->next) { rsc_to_node_t *location = (rsc_to_node_t *) gIter->data; if (!g_str_has_prefix(location->id, pr...
false
false
false
false
false
0
XMLElementContent(JSContext *cx, JSTokenStream *ts, JSParseNode *pn, JSTreeContext *tc) { JSTokenType tt; JSParseNode *pn2; JSAtom *textAtom; ts->flags &= ~TSF_XMLTAGMODE; for (;;) { ts->flags |= TSF_XMLTEXTMODE; tt = js_GetToken(cx, ts); ts->flags &= ~TSF_...
false
false
false
false
false
0
cache_clear(){ DIR *dir = opendir(cache_directory); struct dirent *dirp; if(!dir){ DSFYDEBUG("Error opening cache directory.\n"); return; } /* Loop over files. */ while((dirp = readdir(dir)) != NULL){ if(!strcmp(dirp->d_name, ".") || !strcmp(dirp->d_name, "..")){ ...
false
false
false
false
false
0
replace_oldest_value_mem (rtx x, rtx insn, struct value_data *vd) { enum reg_class cl; if (DEBUG_INSN_P (insn)) cl = ALL_REGS; else cl = base_reg_class (GET_MODE (x), MEM, SCRATCH); return replace_oldest_value_addr (&XEXP (x, 0), cl, GET_MODE (x), insn, vd); }
false
false
false
false
false
0
perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry) { /* 32-bit process in 64-bit kernel. */ unsigned long ss_base, cs_base; struct stack_frame_ia32 frame; const void __user *fp; if (!test_thread_flag(TIF_IA32)) return 0; cs_base = get_segment_base(regs->cs); ss_base = get_segment...
false
false
false
false
false
0
set_int_item(int lineno, int *target, const void *var, enum ECPGttype vartype) { switch (vartype) { case ECPGt_short: *target = *(short *) var; break; case ECPGt_int: *target = *(int *) var; break; case ECPGt_long: *target = *(long *) var; break; case ECPGt_unsigned_short: *target = *(uns...
false
false
false
false
false
0
AddEvSize (double evsize) { int index; double Esize; Esize = (evsize - minsize); index = (int)(floor(Esize/binsize)); if ((index < nbins)&&(index >= 0)) Edist[index]++; }
false
false
false
false
false
0
L19() {register object *base=vs_base; register object *sup=base+VM19; VC19 vs_check; {object V162; V162=(base[0]); vs_top=sup; goto TTL; TTL:; { object V163= (V162); if(V163==Cnil){ base[1]= Cnil; vs_top=(vs_base=base+1)+1; return;} goto T654; T654:; base[1]= CMPcdr((V163->c.c_car)); vs_top=(vs_base=base...
false
false
false
false
false
0
clonecdfdims34(NCDAPCOMMON* nccomm) { int i,j; NClist* vars = nccomm->cdf.varnodes; for(i=0;i<nclistlength(vars);i++) { CDFnode* node = (CDFnode*)nclistget(vars,i); if(node->array.dimensions != NULL) { NClist* clonedims = nclistnew(); NClist* dims = nclistnew(); int ninherit ...
false
false
false
false
false
0
acpi_pci_slot_remove(struct pci_bus *bus) { struct acpi_pci_slot *slot, *tmp; mutex_lock(&slot_list_lock); list_for_each_entry_safe(slot, tmp, &slot_list, list) { if (slot->pci_slot->bus == bus) { list_del(&slot->list); pci_destroy_slot(slot->pci_slot); put_device(&bus->dev); kfree(slot); } } mute...
false
false
false
false
false
0
export_ldif_relative_dn_changed(GtkWidget *widget, gpointer data) { gint relativeDN = combobox_get_active_data(GTK_COMBO_BOX(widget)); GtkLabel *label = GTK_LABEL(data); switch(relativeDN) { case EXPORT_LDIF_ID_UID: gtk_label_set_text(label, _("The address book Unique ID is used to create a DN that is " \ "f...
false
false
false
false
false
0
egg_asn1x_set_integer_as_ulong (GNode *node, gulong value) { GBytes *data, *def; guchar *buf; gsize len; g_return_if_fail (node != NULL); g_return_if_fail (anode_def_type (node) == EGG_ASN1X_INTEGER); len = sizeof (gulong) + 1; buf = g_malloc0 (len); anode_write_integer_ulong (...
false
false
false
false
false
0
gretl_matrix_pergm (const gretl_matrix *x, int m, int *err) { gretl_matrix *p = NULL; gretl_matrix *f = NULL; f = gretl_matrix_fft(x, err); if (*err) { return NULL; } p = gretl_column_vector_alloc(m); if (p == NULL) { *err = E_ALLOC; } else { int T = gretl_vector_get_length(...
false
false
false
false
false
0
IRC_poll (void) { if (ircbot->value == 0) { if (irc_data.ircstatus != IRC_DISABLED) { IRC_exit (); } } else { if (irc_data.ircstatus == IRC_DISABLED) { irc_connect (); } else { irc_getinput (); } } }
false
false
false
false
false
0
hash_cmp(HASH *a, HASH *b) { /* * firewall and quick check */ if (a == b) { /* pointers to the same object */ return FALSE; } if (a == NULL || b == NULL) { /* one pointer is NULL, so they differ */ return TRUE; } if (a->cmp == NULL || b->cmp == NULL) { /* one cmp function is NULL, so they differ */ ...
false
false
false
false
false
0
polchat_handle_disconnect(session_t *s, const char *reason, int type) { polchat_private_t *j; if (!s || !(j = s->priv)) return; if (!s->connected && !s->connecting) return; userlist_free(s); protocol_disconnected_emit(s, reason, type); if (j->fd != -1) { list_t l; for (l = watches; l; l = l->next) ...
false
false
false
false
false
0
tstats_write(struct file *file, const char __user *buf, size_t count, loff_t *offs) { char ctl[2]; if (count != 2 || *offs) return -EINVAL; if (copy_from_user(ctl, buf, count)) return -EFAULT; mutex_lock(&show_mutex); switch (ctl[0]) { case '0': if (timer_stats_active) { timer_stats_active = 0;...
false
false
false
false
false
0
testPoseComposition( double x,double y, double z, double yaw, double pitch, double roll, double std_scale, double x2,double y2, double z2, double yaw2, double pitch2, double roll2, double std_scale2 ) { CPose3DPDFGaussian p6pdf1 = generateRandomPose3DPDF(x,y,z,yaw,pitch,roll, std_scale); CPose3DPDFGaussian p...
false
false
false
false
false
0
ath_tx_edma_tasklet(struct ath_softc *sc) { struct ath_tx_status ts; struct ath_common *common = ath9k_hw_common(sc->sc_ah); struct ath_hw *ah = sc->sc_ah; struct ath_txq *txq; struct ath_buf *bf, *lastbf; struct list_head bf_head; struct list_head *fifo_list; int status; for (;;) { if (test_bit(ATH_OP_HW_R...
false
false
false
false
false
0
test_export_import_name(gss_name_t name) { OM_uint32 major, minor; gss_buffer_desc exported_name = GSS_C_EMPTY_BUFFER; gss_name_t imported_name = GSS_C_NO_NAME; unsigned int i; major = gss_export_name_composite(&minor, name, &exported_name); check_gsserr("gss_export_name_composite", major, mino...
false
false
false
false
false
0
testImageCreation() { // create device IrrlichtDevice *device = createDevice(video::EDT_SOFTWARE, core::dimension2d<u32>(160,120)); if (device == 0) return true; // could not create selected driver. video::IVideoDriver* driver = device->getVideoDriver(); video::ITexture* tex=driver->getTexture("../m...
false
false
false
false
false
0
dtu_get_all_pe_number() { if (all_pe_number < 0) { fatal("illegal access to all_pe_number\n"); } return all_pe_number; }
false
false
false
false
false
0
_backup_video_orc_unpack_NV12 (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; orc_union64 * ORC_RESTRICT ptr0; const orc_union16 * ORC_RESTRICT ptr4; const orc_union16 * ORC_RESTRICT ptr5; orc_union16 var34; orc_union16 var35; #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defin...
false
false
false
false
false
0
apply_packet(FullPacket * p) { // This checks the packet is a proper packet and then does a switch // for the correct operation. struct sockaddr_in *source; char src[INET_ADDRSTRLEN]; source = &(p->addr); // this really shouldn't be done if (!inet_ntop(AF_INET, &source->sin_addr, src, INET_ADDRSTRLEN)) { p...
false
false
false
false
false
0
check_1_6_dummy(kadm5_principal_ent_t entry, long mask, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, char **passptr) { int i; char *password = *passptr; /* Old-style randkey operations disallowed tickets to start. */ if (password == NULL || !(mask & KADM5_ATTRIBUTES) || !(entr...
false
false
false
false
false
0
gfind_open(const char *dbpath, const char *local, int target) { GFIND *gfind = (GFIND *)check_calloc(sizeof(GFIND), 1); gfind->dbop = dbop_open(makepath(dbpath, dbname(GPATH), NULL), 0, 0, 0); if (gfind->dbop == NULL) die("GPATH not found."); gfind->path = NULL; gfind->prefix = check_strdup(local ? local : "./"...
false
false
false
false
false
0
is_comdat_die (c) dw_die_ref c; { /* I think we want to leave base types and __vtbl_ptr_type in the main CU, as we do for stabs. The advantage is a greater likelihood of sharing between objects that don't include headers in the same order (and therefore would put the base types in a different com...
false
false
false
false
false
0
MoveAction(vtkAbstractWidget *w) { vtkCenteredSliderWidget *self = vtkCenteredSliderWidget::SafeDownCast(w); // See whether we're active if ( self->WidgetState == vtkCenteredSliderWidget::Start ) { return; } // Definitely moving the slider, get the updated position double eventPos[2]; eventP...
false
false
false
false
false
0
ARMSelectCallOp(bool UseReg) { if (UseReg) return isThumb2 ? ARM::tBLXr : ARM::BLX; else return isThumb2 ? ARM::tBL : ARM::BL; }
false
false
false
false
false
0
evrpc_free(struct evrpc_base *base) { struct evrpc *rpc; struct evrpc_hook *hook; struct evrpc_hook_ctx *pause; while ((rpc = TAILQ_FIRST(&base->registered_rpcs)) != NULL) { EVUTIL_ASSERT(evrpc_unregister_rpc(base, rpc->uri)); } while ((pause = TAILQ_FIRST(&base->paused_requests)) != NULL) { TAILQ_REMOVE(&ba...
false
false
false
false
false
0
slurmdb_qos_flags_str(uint32_t flags) { char *qos_flags = NULL; if (flags & QOS_FLAG_NOTSET) return xstrdup("NotSet"); if (flags & QOS_FLAG_ADD) xstrcat(qos_flags, "Add,"); if (flags & QOS_FLAG_REMOVE) xstrcat(qos_flags, "Remove,"); if (flags & QOS_FLAG_DENY_LIMIT) xstrcat(qos_flags, "DenyOnLimit,"); if...
false
false
false
false
false
0
lookahead_tokens_print (FILE *out) { state_number i; fprintf (out, "Lookahead tokens: BEGIN\n"); for (i = 0; i < nstates; ++i) { reductions *reds = states[i]->reductions; bitset_iterator iter; int n_lookahead_tokens = 0; if (reds->lookahead_tokens) { int j; ...
false
false
false
true
true
1
getFirstVisibleSectionPose(CPose3D &p) { if (fullyVisible) return getFirstSectionPose(p); if (getVisibleSections()<=0) return false; p=axis[firstSection]; return true; }
false
false
false
false
false
0
opj_stream_destroy_v3(opj_stream_t* p_stream) { opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; if (l_stream) { FILE *fp = (FILE*)l_stream->m_user_data; if(fp) fclose(fp); opj_free(l_stream->m_stored_data); l_stream->m_stored_data = 0...
false
false
false
false
false
0
getAllAppSegs( uint16 marker, const char * ID, bool tryToConvert ) { std::vector<ExifAppSegment*> appSegs ; if ( mChild ) { if ( mChild->mAppSeg->getAppSegmentMarker() == marker && strcmp(mChild->mAppSeg->getAppIdent(),ID) == 0 ) { if ( tryToConvert ) ...
false
false
false
false
false
0
get_shared_library_path(struct cmd_context *cmd, const char *libname, char *path, size_t path_len) { struct stat info; const char *lib_dir; /* If libname doesn't begin with '/' then use lib_dir/libname, * if present */ if (libname[0] == '/' || !(lib_dir = find_config_tree_str(cmd, "global/library_di...
false
false
false
false
false
0
print_subsection(char *name, unsigned char *edid, int start, int end) { int i; printf("%s:", name); for (i = strlen(name); i < 15; i++) printf(" "); for (i = start; i <= end; i++) printf(" %02x", edid[i]); printf("\n"); }
false
false
false
false
false
0
dwarf_globname(Dwarf_Global glob, char **ret_name, Dwarf_Error * error) { if (glob == NULL) { _dwarf_error(NULL, error, DW_DLE_GLOBAL_NULL); return (DW_DLV_ERROR); } *ret_name = (char *) (glob->gl_name); return DW_DLV_OK; }
false
false
false
false
false
0
SimplifyFRemInst(Value *Op0, Value *Op1, FastMathFlags FMF, const Query &, unsigned) { // undef % X -> undef (the undef could be a snan). if (match(Op0, m_Undef())) return Op0; // X % undef -> undef if (match(Op1, m_Undef())) return Op1; // 0 % X -> 0 // Requires ...
false
false
false
false
false
0
spif_array_comp(spif_array_t self, spif_array_t other) { spif_listidx_t i; SPIF_OBJ_COMP_CHECK_NULL(self, other); for (i = 0; i < self->len; i++) { spif_cmp_t c; if (SPIF_OBJ_ISNULL(self->items[i]) && SPIF_OBJ_ISNULL(other->items[i])) { continue; } else if (SPIF_OBJ_ISN...
false
false
false
false
false
0
addline(char *cp) { LINE *lp; /* current line element */ char *curcp; /* current character of string */ LINE **hashentry; /* hash entry to use */ long hash; /* hash value */ long len; /* line length */ int ...
false
false
false
false
false
0
k5_json_string_unbase64(k5_json_string string, unsigned char **data_out, size_t *len_out) { unsigned char *data; size_t len; *data_out = NULL; *len_out = 0; data = k5_base64_decode((const char *)string, &len); if (data == NULL) return (len == 0) ? ENOMEM : EINVAL...
false
false
false
false
false
0
sftk_SSLv3MACConstantTime_New(CK_MECHANISM_PTR mech, SFTKObject *key) { CK_NSS_MAC_CONSTANT_TIME_PARAMS *params = (CK_NSS_MAC_CONSTANT_TIME_PARAMS *) mech->pParameter; unsigned int padLength = 40, j; sftk_MACConstantTimeCtx *ctx; if (params->macAlg != CKM_SSL3_MD5_MAC && params->macAlg != CKM_SSL3_SH...
false
false
false
false
false
0
done(struct mv_ep *ep, struct mv_req *req, int status) __releases(&ep->udc->lock) __acquires(&ep->udc->lock) { struct mv_udc *udc = NULL; unsigned char stopped = ep->stopped; struct mv_dtd *curr_td, *next_td; int j; udc = (struct mv_udc *)ep->udc; /* Removed the req from fsl_ep->queue */ list_del_init(&req->q...
false
false
false
false
false
0
output(text_pointer repl) {stack_ptr= &stack[1]; cur_repl=repl;cur_byte=tok_begin(cur_repl);cur_end=tok_end(cur_repl); cur_ind=ind_i=0; do if(cur_byte==cur_end) {cur_val=cur_sec; continue_or_pop_level(); out_char(section_end); } else/*38:*/ #line 601 "ctangle.w" {int a= *cur_byte++; if(a<0x80)out_char(a); else if(a>=0x...
false
false
false
false
true
1
__mq_add_new_contribution_node (xlator_t *this, quota_inode_ctx_t *ctx, loc_t *loc) { int32_t ret = 0; inode_contribution_t *contribution = NULL; list_for_each_entry (contribution, &ctx->contribution_head, contri_list) { if (uuid_compare (contribution->gfid, loc->parent->gfid) =...
false
false
false
false
false
0
removepreload(void) { const char *myself, *found; char *newval, *preload; int lpreload, lmyself, before, after; preload= getenv(PRELOAD_VAR); myself= getenv(AUTHBINDLIB_VAR); if (!myself || !preload) return; lpreload= strlen(preload); lmyself= strlen(myself); if (lmyself < 1 || lpreload<lmyself) re...
false
false
false
false
true
1
keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Escape && m_webView) { setText(QString::fromUtf8(m_webView->url().toEncoded())); selectAll(); return; } QString currentText = text().trimmed(); if ((event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) ...
false
false
false
false
false
0
yy_braces(GREG *G) { int yypos0= G->pos, yythunkpos0= G->thunkpos; yyprintf((stderr, "%s\n", "braces")); { int yypos14= G->pos, yythunkpos14= G->thunkpos; if (!yymatchChar(G, '{')) goto l15; l16:; { int yypos17= G->pos, yythunkpos17= G->thunkpos; { int yypos18= G->pos, yythunkpos18= G->thunkpos; if (!y...
false
false
false
false
false
0
hfsplus_find_attr(struct super_block *sb, u32 cnid, const char *name, struct hfs_find_data *fd) { int err = 0; hfs_dbg(ATTR_MOD, "find_attr: %s,%d\n", name ? name : NULL, cnid); if (!HFSPLUS_SB(sb)->attr_tree) { pr_err("attributes file doesn't exist\n"); return -EINVAL; } if (name) { err = hfsplus_attr...
false
false
false
false
false
0
gtk_sheet_real_range_clear (GtkSheet *sheet, const GtkSheetRange *range, gboolean delete) { gint i, j; GtkSheetRange clear; if(!range){ clear.row0=0; clear.rowi=sheet->maxallocrow; clear.col0=0; clear.coli=sheet->maxalloccol; }else clear=*range; clear.row0=...
false
false
false
false
false
0
sne_next_ordered_match(SpanEnum *self) { SpanNearEnum *sne = SpNEn(self); SpanEnum *se; int i; int prev_doc, prev_start, prev_end; int doc=0, start=0, end=0; int lengths_sum; while (true) { se = sne->span_enums[0]; prev_doc = se->doc(se); sne->start = prev_start = s...
false
false
false
false
false
0
CL_WriteConfiguration (void) { FILE *f; char path[MAX_OSPATH]; if (cls.state == ca_uninitialized) return; FS_FullWritePath( path, sizeof(path), "config.cfg"); f = fopen (path, "w"); if (!f) { Com_Printf ("Couldn't write config.cfg.\n"); return; } fprintf (f, "// generated by Alien Aren...
true
true
false
false
true
1
process_dimension(const xmlChar **attrs, int nb_attributes) { transfer_xml_attrs(attrs, nb_attributes); if (check_required_attribute(string("size"))) { set_state(inside_dimension); Array *ap = dynamic_cast < Array * >(bt_stack.top()); if (!ap) { ddx_fatal_error(this, "Parse error: Expected ...
false
false
false
false
false
0
startServer(void) { Socket::Address addr; struct addrinfo hints, *ai; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_flags = AI_PASSIVE; #ifdef AI_ADDRCONFIG hints.ai_flags |= AI_ADDRCONFIG; #endif hints.ai_socktype = SOCK_STREAM; struct protoent* pp = getprotob...
false
false
false
false
false
0
fill_seng_es_ifce(GF_ESInterface *ifce, u32 i, GF_SceneEngine *seng, u32 period) { GF_Err e = GF_OK; u32 len; GF_ESIStream *stream; char *config_buffer = NULL; memset(ifce, 0, sizeof(GF_ESInterface)); e = gf_seng_get_stream_config(seng, i, (u16*) &(ifce->stream_id), &config_buffer, &len, (u32*) &(ifce->stream_ty...
false
false
false
false
false
0
read_marker_block(vfile *vf) { int res; avbyte buf[MARKER_HEAD_SIZE], *pos = buf; int readsize = MARKER_HEAD_SIZE; /* An SFX module starts with the extraction header. Skip that part by searching for the marker head. */ while(1) { res = av_read_all(vf, (char*)( buf + MARKER_HEAD_SIZE ...
false
false
false
false
false
0
buffer_prepare(struct vb2_buffer *vb) { struct s2255_vc *vc = vb2_get_drv_priv(vb->vb2_queue); struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); struct s2255_buffer *buf = container_of(vbuf, struct s2255_buffer, vb); int w = vc->width; int h = vc->height; unsigned long size; dprintk(vc->dev, 4, "%s\n", __f...
false
false
false
false
false
0
pkcs_1_v1_5_encode(const unsigned char *msg, unsigned long msglen, int block_type, unsigned long modulus_bitlen, prng_state *prng, int prng_idx, ...
false
true
false
false
true
1
pr_linux_stats(struct net_device_stats *pstats) { pr_debug("pr_linux_stats\n"); pr_debug(" rx_packets=%-7ld tx_packets=%ld\n", (long)pstats->rx_packets, (long)pstats->tx_packets); pr_debug(" rx_errors=%-7ld tx_errors=%ld\n", (long)pstats->rx_errors, (long)pstats->tx_errors); pr_debug(" rx_dropp...
false
false
false
false
false
0
CleanLine(const char *line) { char *token = NULL; int i; token = (char *) line; if (token[strlen(line)-1] == '\n') token[strlen(line)-1] = '\0'; /* skip leading and trailing white space of the line */ token += strspn(line, w_space); if ( *token == '#' ) { return (NULL); } f...
false
false
false
false
false
0
callmacro(command, arg, flags) CONST char *command, *arg; int flags; { int i, n; if (parentfd < 0) { changewin(MAXWINDOWS, (p_id_t)-1); if (ptymode) { hideclock = 2; warning(0, NOPTY_K); } killpty(win, NULL); for (i = 0; i < MAXWINDOWS; i++) if (ptylist[i].pid) break; if (i < MAXWINDOWS) { hidec...
false
false
false
false
false
0
subtract_refs(PyGC_Head *containers) { traverseproc traverse; PyGC_Head *gc = containers->gc.gc_next; for (; gc != containers; gc=gc->gc.gc_next) { traverse = Py_TYPE(FROM_GC(gc))->tp_traverse; (void) traverse(FROM_GC(gc), (visitproc)visit_decref, ...
false
false
false
false
false
0
remove_object_from_module (GkmXdgModule *self, GkmObject *object, const gchar *filename, GkmTransaction *transaction) { gkm_object_expose (object, FALSE); if (transaction != NULL) gkm_transaction_add (transaction, self, complete_remove_object, g_object_ref (object)); g_assert (g_hash_t...
false
false
false
false
false
0
decode_string(char* dst, const xmlChar* src) { char* output = dst; char* input = (char*)src; size_t inputlen = strlen(input); size_t inputleft = inputlen; size_t outputleft = xmlStrlen(src); iconv_t* cd = iconv_open("ASCII", "UTF-8"); if(cd < 0) { // returns -1 on error // It is very improbable error(2, e...
false
false
false
false
false
0
copystr(a,b) char *a,*b; { while (*a++=(*b++)) ; }
false
false
false
false
false
0
chess_game_get_piece (ChessGame* self, gint rank, gint file, gint move_number) { ChessPiece* result = NULL; gint _tmp0_; GList* _tmp4_; GList* _tmp5_; guint _tmp6_ = 0U; gint _tmp7_; gconstpointer _tmp8_ = NULL; ChessState* _tmp9_; ChessState* state; gint _tmp10_; gint _tmp11_; gint _tmp12_ = 0; ChessPiece...
false
false
false
false
false
0
ipIfStatsTable_index_to_oid(netsnmp_index * oid_idx, ipIfStatsTable_mib_index * mib_idx) { int err = SNMP_ERR_NOERROR; /* * temp storage for parsing indexes */ /* * ipIfStatsIPVersion(1)/InetVersion/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h */ n...
false
false
false
false
false
0
utf8_putchar_fp(FILE *fp, char *s) { int i; int len = utf8_sz(s); for(i=0;i<len;i++) fputc(s[i], fp); }
false
false
false
false
false
0
tg3_phy_reset_chanpat(struct tg3 *tp) { DBGP("%s\n", __func__); int chan; for (chan = 0; chan < 4; chan++) { int i; tg3_writephy(tp, MII_TG3_DSP_ADDRESS, (chan * 0x2000) | 0x0200); tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0002); for (i = 0; i < 6; i++) tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x000)...
false
false
false
false
false
0
fsp_ver_fixup (fsp_link *link, int sock) { if (link->hash_type != FS_HASH_UNKNOWN) { /* already know the type of hash we're using */ return 0; } unsigned char *out = message_new(FS_NO_OP, 0, 0); write(sock, out, FS_HEADER + 0); free(out); unsigned char header[FS_HEADER]; int err = recv(sock, hea...
false
false
false
false
false
0
kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size, unsigned int chunk_size) { unsigned int num_of_bits; BUG_ON(!kfd); BUG_ON(!kfd->gtt_mem); BUG_ON(buf_size < chunk_size); BUG_ON(buf_size == 0); BUG_ON(chunk_size == 0); kfd->gtt_sa_chunk_size = chunk_size; kfd->gtt_sa_num_of_chunks = buf_size / c...
false
false
false
false
false
0
boundaryStart(const char *line, const char *boundary) { const char *ptr; char *out; int rc; char buf[RFC2821LENGTH + 1]; if(line == NULL) return 0; /* empty line */ if(boundary == NULL) return 0; /*cli_dbgmsg("boundaryStart: line = '%s' boundary = '%s'\n", line, boundary);*/ if((*line != '-') && (*line !...
true
true
false
false
false
1
show_bindir(bool all) { char path[MAXPGPATH]; char *lastsep; if (all) printf("BINDIR = "); /* assume we are located in the bindir */ strcpy(path, mypath); lastsep = strrchr(path, '/'); if (lastsep) *lastsep = '\0'; cleanup_path(path); printf("%s\n", path); }
true
true
false
false
false
1
print_pragma_range(char *buf, RfmPragma pragma, int indent) { int dim_cnt; int cnt; RfmPragma range; RfmPragma dim_pragma; if (pragma == NULL) { return NULL; } buf += sprintf(buf, "("); for(dim_pragma = pragma, dim_cnt=0; dim_pragma != NULL && dim_pragma->kin...
false
false
false
false
false
0
g2_line_to(int dev, double x, double y) { g2_device *devp; if((devp=g2_get_device_pointer(dev))==NULL) { fprintf(stderr, "g2_line_to: No such device: %d\n", dev); return; } g2_line(dev, devp->x, devp->y, x, y); __g2_last_device=dev; }
false
false
false
false
false
0
StartHWFilter(struct dvb_demux_filter *dvbdmxfilter) { struct dvb_demux_feed *dvbdmxfeed = dvbdmxfilter->feed; struct av7110 *av7110 = dvbdmxfeed->demux->priv; u16 buf[20]; int ret, i; u16 handle; // u16 mode = 0x0320; u16 mode = 0xb96a; dprintk(4, "%p\n", av7110); if (av7110->full_ts) return 0; if (dvbdm...
false
false
false
false
false
0
status_icon_renderer_data_func (GtkTreeViewColumn *tree_column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) { AnjutaVcsStatus status; /* Don't s...
false
false
false
false
false
0
auth_client_exit (void) { struct auth_plugin *plugin, *next; /* Scan the auth_plugin array and dlclose() the modules */ #ifdef USE_PTHREADS pthread_mutex_lock (&plugin_mutex); #endif for (plugin = client_plugins; plugin != NULL; plugin = next) { next = plugin->next; if (plugin->module != NULL) ...
false
false
false
false
false
0
reconfigTheme() { // clamp to "normal" size if (*m_bevel_width > 20) *m_bevel_width = 20; if (*m_border_width > 20) *m_border_width = 20; m_real_item_height = std::max(*m_item_height, std::max(frameFont().height() + 2*bevelWidth(), ...
false
false
false
false
false
0
get_entry_avas(LDAP *ld, LDAPMessage *entry, Dsvec *avas) { int anum, i; char *attr, *aname, *avalue, *ava, *p; BerElement *ber = NULL; Ava *a; struct berval **bvals; #ifdef NOTDEF n = count_avas(ld, entry); if (n <= 0) return(n); #endif anum = 0; for (attr = ldap_first_attribute(ld, entry, &ber); ...
false
false
false
false
false
0
select_pmem_id(struct nd_region *nd_region, u8 *pmem_id) { struct nd_namespace_label *select = NULL; int i; if (!pmem_id) return -ENODEV; for (i = 0; i < nd_region->ndr_mappings; i++) { struct nd_mapping *nd_mapping = &nd_region->mapping[i]; struct nd_namespace_label *nd_label; u64 hw_start, hw_end, pmem_...
false
false
false
false
false
0