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
reiserfs_delete_solid_item(struct reiserfs_transaction_handle *th, struct inode *inode, struct reiserfs_key *key) { struct super_block *sb = th->t_super; struct tree_balance tb; INITIALIZE_PATH(path); int item_len = 0; int tb_init = 0; struct cpu_key cpu_key; int retval; int quota_cut_bytes = 0; BUG_ON(!t...
false
false
false
false
false
0
sc_hw_alloc(struct hfi1_devdata *dd, int type, u32 *sw_index, u32 *hw_context) { struct send_context_info *sci; u32 index; u32 context; for (index = 0, sci = &dd->send_contexts[0]; index < dd->num_send_contexts; index++, sci++) { if (sci->type == type && sci->allocated == 0) { sci->allocated = 1; ...
false
false
false
false
false
0
ping_close ( struct ping_connection *ping, int rc ) { /* Close data transfer interface */ intf_shutdown ( &ping->xfer, rc ); /* Remove from list of connections and drop list's reference */ list_del ( &ping->list ); ref_put ( &ping->refcnt ); DBGC ( ping, "PING %p closed\n", ping ); }
false
false
false
false
false
0
beginArray(const std::string& name, const std::string& type) { log_trace("beginArray(\"" << name << "\", \"" << type << ')'); *_out << static_cast<char>(Serializer::CategoryArray) << name << '\0'; printTypeCode(*_out, type, name.empty()); }
false
false
false
false
false
0
_ds_init(E_Module *m) { Dropshadow *ds; Eina_List *managers, *l, *l2; ds = calloc(1, sizeof(Dropshadow)); if (!ds) return NULL; ds->module = m; ds->conf_edd = E_CONFIG_DD_NEW("Dropshadow_Config", Config); #undef T #undef D #define T Config #define D ds->conf_edd E_CONFIG_VAL(D, T, shadow_x, INT);...
false
false
false
false
false
0
setParam(char *parmName, int parmValue) { std::cout << "Set lsqr integer parameter " << parmName << "to " << parmValue << std::endl; if ( strcmp(parmName, "nrows") == 0) { nrows_ = parmValue; return 1; } else if ( strcmp(parmName, "ncols") == 0) { ncols_ = par...
false
false
false
false
false
0
find_gid_entry(struct mlx4_ib_qp *qp, u8 *raw) { struct mlx4_ib_gid_entry *ge; struct mlx4_ib_gid_entry *tmp; struct mlx4_ib_gid_entry *ret = NULL; list_for_each_entry_safe(ge, tmp, &qp->gid_list, list) { if (!memcmp(raw, ge->gid.raw, 16)) { ret = ge; break; } } return ret; }
false
false
false
false
false
0
init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res) { double x, y; if (len < POINT_DATA_SIZE || res->reserve(POINT_DATA_SIZE)) return 0; x= wkb_get_double(wkb, bo); y= wkb_get_double(wkb + SIZEOF_STORED_DOUBLE, bo); res->q_append(x); res->q_append(y); r...
false
false
false
false
false
0
put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr) { if (propertyName == exec->propertyNames().length) return; if (propertyName == exec->propertyNames().valueOf || propertyName == exec->propertyNames().toString) m_conversionsCustomized = true; JSObject::put(exec, propertyName...
false
false
false
false
false
0
lpfc_sli4_sp_handle_els_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, struct lpfc_wcqe_complete *wcqe) { struct lpfc_iocbq *irspiocbq; unsigned long iflags; struct lpfc_sli_ring *pring = cq->pring; int txq_cnt = 0; int txcmplq_cnt = 0; int fcp_txcmplq_cnt = 0; /* Get an irspiocbq for later ELS resp...
false
false
false
false
false
0
corona32_update(Corona32 *_this, int timeInMilli, short frequency[2][512]) { _this->tl.timeStamp ++; for (int i=0; i<512; ++i) { _this->tl.frequency[0][i] = frequency[0][i]; _this->tl.frequency[1][i] = frequency[1][i]; } _this->corona->update(&_this->tl); // Update Corona _this->pal->update(&_this->...
false
false
false
false
false
0
DoKeyDown(const wxKeyEvent& evt, bool* consumed) { int key = evt.GetKeyCode(); /* C::B begin */ #if wxCHECK_VERSION(2, 9, 0) if (key == WXK_NONE) { // This is a Unicode character not representable in Latin-1 or some key // without key code at all (e.g. dead key or VK_PROCESSKEY under MSW). ...
false
false
false
false
false
0
mime_entity_duplicate(MIMEEntity *e) { MIMEEntity *copy = mime_entity_create(); int i, n; mime_replace_headers(copy, e->headers); copy->body = e->body ? octstr_duplicate(e->body) : NULL; for (i = 0, n = gwlist_len(e->multiparts); i < n; i++) gwlist_append(copy->multiparts, mi...
false
false
false
false
false
0
ctof() { double val = 0.0; double power = 1.0; int sign = 1; skipbl(); if (!is_float()) { skipcom(); _ok = false; return 0.; }else{ } if (skip1("-")) { // sign sign = -1; }else{ skip1("+"); } while (is_digit()) { // up to dec pt val = 10.0 * val + (ctoc()-'0'); ...
false
false
false
false
false
0
nccf_inq_axis_type(int ncid, int varid, int *axis_type) { char value[NC_MAX_NAME + 1]; int i; int ret; /* Get the attribute which stores the axis type. */ if ((ret = nc_get_att_text(ncid, varid, COORDINATE_AXIS_TYPE, value))) return ret; /* Which axis type is this? */ for (i = 1; i <=...
false
false
false
false
false
0
mov_seek_stream(AVStream *st, int64_t timestamp, int flags) { MOVStreamContext *sc = st->priv_data; int sample, time_sample; int i; sample = av_index_search_timestamp(st, timestamp, flags); dprintf(st->codec, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample); if (samp...
false
false
false
false
false
0
trf7970a_timeout_work_handler(struct work_struct *work) { struct trf7970a *trf = container_of(work, struct trf7970a, timeout_work.work); dev_dbg(trf->dev, "Timeout - state: %d, ignore_timeout: %d\n", trf->state, trf->ignore_timeout); mutex_lock(&trf->lock); if (trf->ignore_timeout) trf->ignore_timeout = ...
false
false
false
false
false
0
compare_ipmask (unsigned int a, unsigned int amask, unsigned int b, unsigned int bmask) { int r = -2; /* always use the smallest mask to compare */ unsigned int usemask = (amask > bmask) ? bmask : amask; /* struct in_addr in; in.s_addr = ntohl(a); printf("comparing %s(%u) an...
false
false
false
false
false
0
logincmd(mail::imap &imapAccount, string errmsg) { next_login_func= &mail::imapLoginHandler::failcmd; loginMethod="LOGIN"; #if 0 imapAccount.imapcmd("LOGIN","LOGIN " + imapAccount.quoteSimple(myLoginInfo.uid) + " " + imapAccount.quoteSimple(myLoginInfo.pwd) + "\r\n"); #else currentCmd="LOGIN"; if ...
false
false
false
false
false
0
OnAppStartupDone(CodeBlocksEvent& event) // ---------------------------------------------------------------------------- { // if OpenFilesList plugin initializes *after* us, we didn't // find it in OnAttach(). So do it now. FindDragScroll(); if (not GetConfig()->GetOpenFilesList()) { GetCo...
false
false
false
false
false
0
maybe_pop_dollar_vars () { if (variable_context == 0 && (dollar_vars_changed () & ARGS_SETBLTIN)) dispose_saved_dollar_vars (); else pop_dollar_vars (); if (debugging_mode) pop_args (); /* restore BASH_ARGC and BASH_ARGV */ set_dollar_vars_unchanged (); }
false
false
false
false
false
0
xmlSecNssAppKeyCertLoadSECItem(xmlSecKeyPtr key, SECItem* secItem, xmlSecKeyDataFormat format) { CERTCertificate *cert=NULL; xmlSecKeyDataPtr data; int ret; xmlSecAssert2(key != NULL, -1); xmlSecAssert2(secItem != NULL, -1); xmlSecAssert2(format != xmlSecKeyDataFormatUnknown, -1); data...
false
false
false
false
false
0
gfire_proto_create_invitation(const gchar *p_name, const gchar *p_msg) { if(!p_name || !p_msg) return 0; guint32 offset = XFIRE_HEADER_LEN; // "name" offset = gfire_proto_write_attr_ss("name", 0x01, p_name, strlen(p_name), offset); // "msg" offset = gfire_proto_write_attr_ss("msg", 0x01, p_msg, strlen(p_msg)...
false
false
false
false
false
0
test_checkout_conflict__directory_file_with_custom_labels(void) { git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, CONFLICTING_ANCESTOR_OID, 1, "df-1" }, { 0100644, CONFLICTING_OURS_OID, 2, "df-1" }, { 0100644, CONFLICTING_THEIRS_OID, 0,...
false
false
false
false
false
0
nemo_connect_server_dialog_finalize (GObject *object) { NemoConnectServerDialog *dialog; dialog = NEMO_CONNECT_SERVER_DIALOG (object); connect_dialog_abort_mount_operation (dialog); if (dialog->details->iconized_entries != NULL) { g_list_free (dialog->details->iconized_entries); dialog->details->iconized_ent...
false
false
false
false
false
0
uv_err_name(uv_err_t err) { switch (err.code) { case UV_UNKNOWN: return "UNKNOWN"; case UV_OK: return "OK"; case UV_EOF: return "EOF"; case UV_EADDRINFO: return "EADDRINFO"; case UV_EACCESS: return "EACCESS"; case UV_EAGAIN: return "EAGAIN"; case UV_EADDRINUSE: return "EADDRINUSE"; cas...
false
false
false
false
false
0
OPCODE_fmn(kmethodn_t mn, int diff) { switch(mn) { case MN_opNEG: return OPCODE_fNEG; case MN_opADD: return OPCODE_fADD + diff; case MN_opSUB: return OPCODE_fSUB + diff; case MN_opMUL: return OPCODE_fMUL + diff; case MN_opDIV: return OPCODE_fDIV + diff; case MN_opEQ: return OPCODE_fEQ + diff; case MN_opNOTEQ: ...
false
false
false
false
false
0
Source(const Proto* f) { const char* s=getstr(f->source); if (*s=='@' || *s=='=') return s+1; else if (*s==LUA_SIGNATURE[0]) return "(bstring)"; else return "(string)"; }
false
false
false
false
false
0
vdtree_add_by_data(ViewDir *vd, FileData *fd, GtkTreeIter *parent) { GtkTreeStore *store; GtkTreeIter child; NodeData *nd; GdkPixbuf *pixbuf; NodeData *end; GtkTreeIter empty; if (!fd) return; if (access_file(fd->path, R_OK | X_OK)) { pixbuf = vd->pf->close; } else { pixbuf = vd->pf->deny; } nd...
false
false
false
false
false
0
columnCount(const QModelIndex &index ) const { // Q_UNUSED(index); return m_childItems.value(index.internalId()).size(); }
false
false
false
false
false
0
cg_chown_file(FTS *fts, FTSENT *ent, uid_t owner, gid_t group) { int ret = 0; const char *filename = fts->fts_path; cgroup_dbg("chown: seeing file %s\n", filename); switch (ent->fts_info) { case FTS_ERR: errno = ent->fts_errno; break; case FTS_D: case FTS_DC: case FTS_NSOK: case FTS_NS: case FTS_DNR: cas...
false
false
false
false
false
0
handle_no_rsc_apps(PROJECT* p, const char* name) { int i = rsc_index(name); if (i < 0) return; p->no_rsc_apps[i] = true; }
false
false
false
false
false
0
addXMLFormMenu(int formId, string_t* ip, string_t* page, int p) { SingleList* list = userMenu(); INFO2("[WS]: addXMLFormMenu %d #%d", formId, listSingleLength(list)); switch (formId) { case CF: case TX: case WM: { int llen = listSingleLength(list); if (llen > 0) { ...
true
true
true
false
false
1
fillcache(CACHESIGN *item, SignTSVector *key) { item->allistrue = false; if (ISARRKEY(key)) makesign(item->sign, key); else if (ISALLTRUE(key)) item->allistrue = true; else memcpy((void *) item->sign, (void *) GETSIGN(key), sizeof(BITVEC)); }
false
true
false
false
false
1
thumb_fmt(unsigned char *buf, size_t buflen) { char *p, *s; Ds *ds; s = strbtohex(buf, buflen, STRBTOHEX_UPPER); ds = ds_init(NULL); for (p = s; *p != '\0'; p++) { if (p != s) ds_appendc(ds, (int) ':'); ds_appendc(ds, (int) *p++); ds_appendc(ds, (int) *p); } ds_appendc(ds, (int) '\0'); return(d...
false
false
false
false
false
0
manageDiskFile(MprFile *file, int flags) { if (flags & MPR_MANAGE_MARK) { mprMark(file->path); mprMark(file->fileSystem); mprMark(file->buf); // MOB - mark inode? } else if (flags & MPR_MANAGE_FREE) { closeFile(file); } }
false
false
false
false
false
0
aclcopy(const Acl *orig_acl) { Acl *result_acl; result_acl = allocacl(ACL_NUM(orig_acl)); memcpy(ACL_DAT(result_acl), ACL_DAT(orig_acl), ACL_NUM(orig_acl) * sizeof(AclItem)); return result_acl; }
false
false
false
false
false
0
LOC_pad_get_item(const char *name, char ***list, int *count) { ITEM *item; LIST *p; char **l; int n; if (curpad == NULL) return NO_CUR_PAD; item = find_item(curpad, name); if (item == NULL) return NO_ITEM; for (p = item->list, n = 0; p; p = p->next) if (*p->value) n++; *c...
false
false
false
false
false
0
gst_xml_make_element (xmlNodePtr cur, GstObject * parent) { xmlNodePtr children = cur->xmlChildrenNode; GstElement *element; gchar *name = NULL; gchar *type = NULL; /* first get the needed tags to construct the element */ while (children) { if (!strcmp ((char *) children->name, "name")) { name = ...
false
false
false
false
false
0
mpegts_base_program_add_stream (MpegTSBase * base, MpegTSBaseProgram * program, guint16 pid, guint8 stream_type, GstMpegTsPMTStream * stream) { MpegTSBaseClass *klass = GST_MPEGTS_BASE_GET_CLASS (base); MpegTSBaseStream *bstream; GST_DEBUG ("pid:0x%04x, stream_type:0x%03x", pid, stream_type); if (G_UN...
false
false
false
false
false
0
fs_rawudp_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsRawUdpTransmitter *self = FS_RAWUDP_TRANSMITTER (object); switch (prop_id) { case PROP_GST_SINK: g_value_set_object (value, self->priv->gst_sink); break; case PROP_GST_SRC: ...
false
false
false
false
false
0
add_tree_to_fld_list (tree t, struct free_lang_data_d *fld) { if (DECL_P (t)) { fld->decls.safe_push (t); if (debug_info_level > DINFO_LEVEL_TERSE) save_debug_info_for_decl (t); } else if (TYPE_P (t)) { fld->types.safe_push (t); if (debug_info_level > DINFO_LEVEL_TERSE) save_de...
false
false
false
false
false
0
sysfs_slab_remove(struct kmem_cache *s) { if (slab_state < FULL) /* * Sysfs has not been setup yet so no need to remove the * cache from sysfs. */ return; #ifdef CONFIG_MEMCG_KMEM kset_unregister(s->memcg_kset); #endif kobject_uevent(&s->kobj, KOBJ_REMOVE); kobject_del(&s->kobj); kobject_put(&s->kobj...
false
false
false
false
false
0
cdToHours(double value, cdUnitTime unit){ /* double result; */ double result=0.; /*initialize to get rid of warning */ switch(unit){ case cdSecond: result = value/3600.0; break; case cdMinute: result = value/60.0; break; case cdHour: result = value; break; case cdDay: result = 24.0 * value; br...
false
false
false
false
false
0
destroy_top_bin() { if (!top_bin) return; gtk_widget_destroy(top_bin); top_bin = NULL; hbox_row2 = NULL; label_full=NULL; label_gtab_sele = NULL; label_gtab = NULL; label_input_method_name = NULL; label_key_codes = NULL; box_gtab_im_name = NULL; label_page = NULL; label_edit = NULL; label_...
false
false
false
false
false
0
bnx2x_sync_link(struct link_params *params, struct link_vars *vars) { struct bnx2x *bp = params->bp; u8 link_10g_plus; if (vars->link_status & LINK_STATUS_PHYSICAL_LINK_FLAG) vars->phy_flags |= PHY_PHYSICAL_LINK_FLAG; vars->link_up = (vars->link_status & LINK_STATUS_LINK_UP); if (vars->link_up) { DP(NE...
false
false
false
false
false
0
dir_project_get_node_info (DirProject *project, GError **error) { static AnjutaProjectNodeInfo node_info[] = { {ANJUTA_PROJECT_GROUP, N_("Group"), "", NULL}, {ANJUTA_PROJECT_SOURCE, N_("Source"), "", NULL}, {ANJUTA_PROJECT_UNKNOWN, NULL, NULL, NULL}}; static...
false
false
false
false
false
0
filter_certs_for_valid_issuers ( NSSCertificate **certs ) { NSSCertificate **cp; nssDecodedCert *dcp; int nextOpenSlot = 0; for (cp = certs; *cp; cp++) { dcp = nssCertificate_GetDecoding(*cp); if (dcp && dcp->isValidIssuer(dcp)) { certs[nextOpenSlot++] = *cp; } else { NSSCertificate_Dest...
false
false
false
false
false
0
mpd_alloc(mpd_size_t nmemb, mpd_size_t size) { mpd_size_t req, overflow; req = mul_size_t_overflow(nmemb, size, &overflow); if (overflow) { return NULL; } return mpd_mallocfunc(req); }
false
false
false
false
false
0
json_gobject_serialize (GObject *gobject) { JsonNode *retval; g_return_val_if_fail (G_IS_OBJECT (gobject), NULL); retval = json_node_new (JSON_NODE_OBJECT); json_node_take_object (retval, json_gobject_dump (gobject)); return retval; }
false
false
false
false
false
0
ssl_engine_disable(conn_rec *c) { SSLSrvConfigRec *sc; SSLConnRec *sslconn = myConnConfig(c); if (sslconn) { sc = mySrvConfig(sslconn->server); } else { sc = mySrvConfig(c->base_server); } if (sc->enabled == SSL_ENABLED_FALSE) { return 0; } sslconn = ssl_in...
false
false
false
false
false
0
task_get_duration(u_long32 *duration, const lListElem *ja_task) { DENTER(TOP_LAYER, "task_get_duration"); if (ja_task != NULL) { *duration = lGetUlong(ja_task, JAT_wallclock_limit); if (*duration == U_LONG32_MAX) { *duration = sconf_get_default_duration(); } } else { *duratio...
false
false
false
false
false
0
TextFieldGetBuffer(Widget gw) { TextFieldWidget w = (TextFieldWidget)gw; char *buffer; long i, n; if (w->scrollable.height <= 0) return XtNewString(""); n = w->scrollable.height + 3; for (i = 0 ; i < w->scrollable.height ; i++) n += strlen(w->textfield.lines[i].buf); buffer = XtMalloc(...
false
false
false
false
false
0
split(symtab_ty *stp) { str_hash_ty new_hash_modulus; str_hash_ty new_hash_mask; symtab_row_ty **new_hash_table; str_hash_ty j; /* * double the modulus * * This is subtle. If we only increase the modulus by one, the * load always hovers around 80%, so we have to d...
false
false
false
false
false
0
nv04_dfp_create(struct drm_connector *connector, struct dcb_output *entry) { const struct drm_encoder_helper_funcs *helper; struct nouveau_encoder *nv_encoder = NULL; struct drm_encoder *encoder; int type; switch (entry->type) { case DCB_OUTPUT_TMDS: type = DRM_MODE_ENCODER_TMDS; helper = &nv04_tmds_helper_f...
false
false
false
false
false
0
pdc202xx_dma_end(ide_drive_t *drive) { if (drive->media != ide_disk || (drive->dev_flags & IDE_DFLAG_LBA48)) { ide_hwif_t *hwif = drive->hwif; unsigned long high_16 = hwif->extra_base - 16; unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); u8 clock = 0; outl(0, atapi_reg); /* zero out extr...
false
false
false
false
false
0
unionfind_union (struct web_entry *first, struct web_entry *second) { first = unionfind_root (first); second = unionfind_root (second); if (first == second) return; second->pred = first; }
false
false
false
false
false
0
get_operator_call_string(pIIR_FunctionDeclaration fd, const string arg1, const string arg2) { string macro; if (is_array_type(fd->interface_declarations->first->subtype)) macro = binary_array_operator_macro[fd->declarator->text.to_chars()]; else macro = binary_operator_macro[fd->declarator->text.to_chars(...
false
false
false
false
false
0
createNewVar(const Expr *RefE, std::string &VarName) { const Type *VarT = TheVarDecl->getType().getTypePtr(); TransAssert((VarT->isStructureType() || VarT->isUnionType() || VarT->isArrayType() || VarT->isPointerType()) && "Non-valid var type!"); createNewVarName(VarName); if (Var...
false
false
false
false
false
0
aa_create_dir_config(apr_pool_t *p, char *path) { apparmor_dir_cfg *newcfg = (apparmor_dir_cfg *) apr_pcalloc(p, sizeof(*newcfg)); ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, ap_server_conf, "aa_create_dir_cfg (%s)", path ? path : ":no path:"); if (newcfg == NULL) { ap_log_error(APLO...
false
false
false
false
false
0
readHuffmanNode(FILE *file, unsigned char *dataByte, unsigned char *dataMask) { hNode *node, *left, *right; int bit, payload; // Read payload or sub nodes. bit = readBit(file, dataByte, dataMask); if (bit) { left = NULL; right = NULL; payload = readByte(...
false
false
false
false
false
0
compress_savefile(const char *filename) { if (fork()) return; /* * Set to lowest priority so that this doesn't disturb the capture */ #ifdef NZERO setpriority(PRIO_PROCESS, 0, NZERO - 1); #else setpriority(PRIO_PROCESS, 0, 19); #endif if (execlp(zflag, zflag, filename, (char *)NULL) == -1) fprintf(stderr, ...
false
false
false
false
false
0
qed_change_pci_hwfn(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, u8 enable) { u32 delay_idx = 0, val, set_val = enable ? 1 : 0; /* Change PF in PXP */ qed_wr(p_hwfn, p_ptt, PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER, set_val); /* wait until value is set - try for 1 second every 50us */...
false
false
false
false
false
0
read_csv_field(FILE *in, char *text, int size) { int n, c; char sep[]=",\t \r\n"; char whitespace[]="\t \r\n"; int quoted; n=0; quoted=FALSE; text[0]='\0'; /* Read the field */ while (1) { c=fgetc(in); /* Look for EOF */ if (feof(in)) break; /* Look for qu...
false
false
false
false
false
0
addDatum(KeyArray *keys, Datum datum, GinNullCategory category) { if (keys->nvalues >= keys->maxvalues) { keys->maxvalues *= 2; keys->keys = (Datum *) repalloc(keys->keys, sizeof(Datum) * keys->maxvalues); keys->categories = (GinNullCategory *) repalloc(keys->categories, sizeof(GinNullCategory) * keys->ma...
false
false
false
false
false
0
get( void ) { static char linebuf[256], *lbp = linebuf; static int nlb = 0; int n; wchar_t wc; if( have_ungotten ) { flag = 1; *--sp = ungotten; have_ungotten = 0; return; } if( !nlb ) { if( NULL == fgets( linebuf, sizeof(linebuf)/sizeof(char), in )) { *--sp = fl...
false
false
false
false
false
0
fft_real_bitreverse_order(float data[], const size_t n) { /* This is the Gold-Rader bit-reversal algorithm */ size_t i; size_t j = 0; for (i = 0; i < n - 1; i++) { size_t k = n / 2; if (i < j) { const float tmp = data[i]; data[i] = data[j]; data[j] = tmp; } while (k <= j) { ...
false
false
false
false
false
0
_conference_element_added (FsElementAddedNotifier *notifier, GstBin *bin, GstElement *element, gpointer user_data) { GstElementFactory *factory; const gchar *name; factory = gst_element_get_factory (element); name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)); if (strcmp (name, "f...
false
false
false
false
false
0
gfire_buddy_free(gfire_buddy *p_buddy) { if(!p_buddy) return; if(p_buddy->p2p) { gfire_p2p_connection_remove_session(gfire_get_p2p(p_buddy->gc->proto_data), p_buddy->p2p); gfire_p2p_session_free(p_buddy->p2p, TRUE); } if(p_buddy->p2p_request_timeout) purple_timeout_remove(p_buddy->p2p_request_timeout); ...
false
false
false
false
false
0
read_net_edev(struct stats_net_edev *st_net_edev, int nbr) { FILE *fp; struct stats_net_edev *st_net_edev_i; static char line[256]; char iface[MAX_IFACE_LEN]; int dev = 0; int pos; if ((fp = fopen(NET_DEV, "r")) == NULL) return; while ((fgets(line, 256, fp) != NULL) && (dev < nbr)) { pos = strcspn(line, ...
true
true
true
false
true
1
draw_rounded_rectangle(GdkDrawable *drawable, GdkGC *gc, gboolean filled, gint x, gint y, gint width, gint height) { gint warc = 16; /* Width & height of arc rectangle */ gint harc = 16; /* 16 is an arbitrary number that looks good on my system */ if((width < warc) && (height < harc)){ gdk_draw_arc(drawa...
false
false
false
false
false
0
cb_Prefab_Platonic_Octahedral (wxCommandEvent &event) { undoableAction (_("Make prefab")); delete graph; graph = Factory::Octahedral (); canvas->redraw (); }
false
false
false
false
false
0
c_bindings_start_stmt_expr (struct c_spot_bindings* switch_bindings) { struct c_scope *scope; for (scope = current_scope; scope != NULL; scope = scope->outer) { struct c_binding *b; if (!scope->has_label_bindings) continue; for (b = scope->bindings; b != NULL; b = b->prev) { struct c_l...
false
false
false
false
false
0
cmd_le_adv(int ctl, int hdev, char *opt) { struct hci_request rq; le_set_advertise_enable_cp advertise_cp; uint8_t status; int dd, ret; if (hdev < 0) hdev = hci_get_route(NULL); dd = hci_open_dev(hdev); if (dd < 0) { perror("Could not open device"); exit(1); } memset(&advertise_cp, 0, sizeof(advertise...
false
false
false
false
false
0
globus_hashtable_empty( globus_hashtable_t * table) { return ((!table || !*table || (*table)->first == GLOBUS_NULL) ? GLOBUS_TRUE : GLOBUS_FALSE); }
false
false
false
false
false
0
include_down(st_select_lex_node *upper) { if ((next= upper->slave)) next->prev= &next; prev= &upper->slave; upper->slave= this; master= upper; slave= 0; }
false
false
false
false
false
0
SerializeWeakReferences() { for (int i = partial_snapshot_cache_length_; i < kPartialSnapshotCacheCapacity; i++) { sink_->Put(kRootArray + kPlain + kStartOfObject, "RootSerialization"); sink_->PutInt(Heap::kUndefinedValueRootIndex, "root_index"); } Heap::IterateWeakRoots(this, VISIT_ALL); }
false
false
false
false
false
0
close_heap(char *filename, hid_t fapl, hid_t dxpl, fheap_test_param_t *tparam, hid_t file, H5F_t *f, H5HF_t **fh, haddr_t fh_addr, fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids, h5_stat_size_t empty_size) { h5_stat_size_t file_size; /* Size of file currently */ /* Check f...
false
false
false
false
false
0
dfb_gfxcard_texture_triangles( DFBVertex *vertices, int num, DFBTriangleFormation formation, CardState *state ) { bool hw = false; D_DEBUG_AT( Core_GraphicsOps, "%s( %p [%d], %s, %p )\n", __FUNCTION__, vertices, num, (fo...
false
false
false
false
false
0
gwy_enum_freev(GwyEnum *enum_table) { gsize i = 0; while (enum_table[i].name) { g_free((gpointer)enum_table[i].name); i++; } g_free(enum_table); }
false
false
false
false
false
0
getFileFilterExtension( const QString& filter ) { if ( filter == GSC_FILE_FILTER ) return GSC_FILE_EXTENSION; else if ( filter == PNG_FILE_FILTER ) return PNG_FILE_EXTENSION; else if ( filter == PDF_FILE_FILTER ) return PDF_FILE_EXTENSION; else if ( filter == PS_FILE_FILTER ) return PS_FILE_EXTENSION; else...
false
false
false
false
false
0
maki_plugin_load (const gchar* name) { gchar* path; GModule* module = NULL; if ((path = g_module_build_path(MAKI_PLUGIN_DIRECTORY, name)) != NULL) { if ((module = g_module_open(path, G_MODULE_BIND_LOCAL)) != NULL) { makiPluginInitFunc init; if (g_module_symbol(module, "init", (gpointer*)&init)) { ...
false
false
false
false
false
0
GetFieldHandles() { static FieldHandle<Calendar>::ListT fhv; if( fhv.size() ) return fhv; #undef CONTAINER_OBJECT_NAME #define CONTAINER_OBJECT_NAME fhv #undef RECORD_CLASS_NAME #define RECORD_CLASS_NAME Calendar #define ALL_COMMON_CALENDAR_FIELDS \ FHP(RecType, _("Record Type Code")); \ FHP(RecordId, _("Uniq...
false
false
false
false
false
0
getCookieList(const QString & _domain, const QString & _fqdn ) { QString domain; if (_domain.isEmpty()) stripDomain(_fqdn, domain); else domain = _domain; return m_cookieDomains.value(domain); }
false
false
false
false
false
0
u32_toggle_endianness(int big_endian, uint32_t what) { return big_endian == HOST_IS_BIG_ENDIAN ? what : swab32(what); }
false
false
false
false
false
0
fileopen(deflt, extension, mode, prompt) char *deflt; char *extension; /* default extension */ char *mode; /* read "r" or write "w" */ char *prompt; /* prompt for user */ { char extname[100]; /* trial name with extension added */ FILE *fp = NULL; /* file corresponding to file...
false
false
false
false
false
0
ib_umad_close(struct inode *inode, struct file *filp) { struct ib_umad_file *file = filp->private_data; struct ib_umad_device *dev = file->port->umad_dev; struct ib_umad_packet *packet, *tmp; int already_dead; int i; mutex_lock(&file->port->file_mutex); mutex_lock(&file->mutex); already_dead = file->agents_de...
false
false
false
false
false
0
dump_unicast_tables(ib_portid_t * portid, int startlid, int endlid) { char lft[IB_SMP_DATA_SIZE] = { 0 }; char nd[IB_SMP_DATA_SIZE] = { 0 }; uint8_t sw[IB_SMP_DATA_SIZE] = { 0 }; char str[200], *s; uint64_t nodeguid; int block, i, e, top; unsigned nports; int n = 0, startblock, endblock; if ((s = check_switch...
false
false
false
false
false
0
get_starting_point(Index n, bool init_x, Number* x, bool init_z, Number* z_L, Number* z_U, Index m, bool init_lambda, Number* lambda) { bool retval=true; DBG_ASSERT(n == n_var_); DBG_ASSERT(m == n_con_); if (init_x) { for (Index i=0; i<n; i++) { x[i] = start_x_[...
false
false
false
false
false
0
NCD3_initialize(void) { int i; /* Create our dispatch table as the merge of NC3 table plus some overrides */ NC_dispatch_overlay(&NCD3_dispatch_base, NC3_dispatch_table, &NCD3_dispatcher); NCD3_dispatch_table = &NCD3_dispatcher; for(i=0;i<NC_MAX_VAR_DIMS;i++) {dapzerostart3[i] = 0; dapsi...
false
false
false
false
false
0
get_next_req_id(jdns_session_t *s) { int n, k, id; id = -1; while(id == -1) { id = _int_wrap(&s->next_req_id, 1); /* no query using this? */ for(n = 0; n < s->queries->count; ++n) { query_t *q = (query_t *)s->queries->item[n]; for(k = 0; k < q->req_ids_count; ++k) { if(q->req_ids[k] == id) ...
false
false
false
false
false
0
ext4_mb_good_group(struct ext4_allocation_context *ac, ext4_group_t group, int cr) { unsigned free, fragments; int flex_size = ext4_flex_bg_size(EXT4_SB(ac->ac_sb)); struct ext4_group_info *grp = ext4_get_group_info(ac->ac_sb, group); BUG_ON(cr < 0 || cr >= 4); free = grp->bb_free; if (free == 0) return 0...
false
false
false
false
false
0
ggd_tag_find_parent (const GPtrArray *tags, filetype_id geany_ft, const TMTag *child) { TMTag *tag = NULL; g_return_val_if_fail (tags != NULL, NULL); g_return_val_if_fail (child != NULL, NULL); if (! child->atts.entry.scope) { /* tag has no parent, we...
false
false
false
false
false
0
ipmi_sdr_add_from_file(struct ipmi_intf *intf, const char *ifile) { int rc; struct sdrr_queue sdrr_queue; struct sdr_record_list *sdrr; struct sdr_record_list *sdrr_next; /* read the SDR records from file */ rc = ipmi_sdr_read_records(ifile, &sdrr_queue); if (ipmi_sdr_repo_clear(intf)) { printf("Can...
false
false
false
false
true
1
drive_tostr(char *s, word32 *ap, word32 *bp, struct net_pin_t *npp, int32 rhswid, int32 nonz_only) { int32 nd_xpop; int32 wlen, ubits; struct xstk_t *tmpxsp; struct npaux_t *npauxp; nd_xpop = FALSE; /* if lhs is concatenate, must isolate part dirving this npp wire section */ if ((npauxp = npp->npaux) != NULL...
false
false
false
false
false
0
xmlSchemaPIllegalFacetAtomicErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, xmlSchemaTypePtr type, xmlSchemaTypePtr baseType, xmlSchemaFacetPtr facet) { xmlChar *des = NULL, *strT = NULL; xmlSchemaFo...
false
false
false
false
false
0
reset(void) { MSMenuItem *mi=menuItem(selectedItem()); if (mi!=0&&mi->cascade()==MSTrue) mi->disarm(); undrawSelectedItem(); selectedItem(-1); }
false
false
false
false
false
0
hso_create_shared_int(struct usb_interface *interface) { struct hso_shared_int *mux = kzalloc(sizeof(*mux), GFP_KERNEL); if (!mux) return NULL; mux->intr_endp = hso_get_ep(interface, USB_ENDPOINT_XFER_INT, USB_DIR_IN); if (!mux->intr_endp) { dev_err(&interface->dev, "Can't find INT IN endpoint\n"); ...
false
false
false
false
false
0
gee_array_queue_iterator_real_get_valid (GeeIterator* base) { gboolean result; GeeArrayQueueIterator* self; gboolean _tmp0_ = FALSE; gint _tmp1_ = 0; gboolean _tmp3_ = FALSE; self = (GeeArrayQueueIterator*) base; _tmp1_ = self->priv->_offset; if (_tmp1_ != (-1)) { gboolean _tmp2_ = FALSE; _tmp2_ = self->pri...
false
false
false
false
false
0
v4l2_fh_del(struct v4l2_fh *fh) { unsigned long flags; spin_lock_irqsave(&fh->vdev->fh_lock, flags); list_del_init(&fh->list); spin_unlock_irqrestore(&fh->vdev->fh_lock, flags); v4l2_prio_close(fh->vdev->prio, fh->prio); }
false
false
false
false
false
0