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
find_volume (GVfsBackendAfpBrowse *afp_backend, char *filename) { char *end; guint len; guint i; while (*filename == '/') filename++; end = strchr (filename, '/'); if (end) { len = end - filename; while (*end == '/') end++; if (*end != 0) return NULL; } els...
false
false
false
false
false
0
on_listitem3_button_press (GtkWidget * widget, GdkEvent * event, tListItem3 * parent) { if ((!parent->selected)&&(parent->can_select)) { playsound (SND_BUTTONDOWN); } return TRUE; }
false
false
false
false
false
0
save_acl(const char *identifier, const maildir_aclt *acl, void *cb_arg) { if (fprintf((FILE *)cb_arg, "%s %s\n", identifier, maildir_aclt_ascstr(acl)) < 0) return -1; return 0; }
false
false
false
false
false
0
add_line (struct backtrace_state *state, struct dwarf_data *ddata, uintptr_t pc, const char *filename, int lineno, backtrace_error_callback error_callback, void *data, struct line_vector *vec) { struct line *ln; /* If we are adding the same mapping, ignore it. This can happen when using discriminato...
false
false
false
false
false
0
cmd_selecttype(MainInfo *min, DirPane *src, DirPane *dst, const CmdArg *ca) { const gchar *tname; GList *types = NULL; GtkTreeModel *m = dp_get_tree_model(src); GtkTreeIter iter; if((tname = car_bareword_get(ca, 0U)) != NULL) types = typ_type_lookup_glob(min->cfg.type, tname); else { GdkEventButton *evt; ...
false
false
false
false
false
0
setAddrParams(int prefix, int bitfield) { AddrParams = new TSrvOptAddrParams(prefix, bitfield, 0 /* parent */); }
false
false
false
false
false
0
GetIndex(uint32_t RecordId, IndexType *pFoundIndex) const { StateMapType::const_iterator i = StateMap.begin(); for( ; i != StateMap.end(); ++i ) { if( i->second.RecordId == RecordId ) { if( pFoundIndex ) *pFoundIndex = i->first; return true; } } return false; }
false
false
false
false
false
0
nfs2_xdr_dec_readlinkres(struct rpc_rqst *req, struct xdr_stream *xdr, void *__unused) { enum nfs_stat status; int error; error = decode_stat(xdr, &status); if (unlikely(error)) goto out; if (status != NFS_OK) goto out_default; error = decode_path(xdr); out: return error; out_default: return nfs_st...
false
false
false
false
false
0
qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 6) qt_static_metacall(this, _c, _id, _a); _id -= 6; } #ifndef QT_NO_PROPERTIES else if ...
false
false
false
false
false
0
flakey_status(struct dm_target *ti, status_type_t type, unsigned status_flags, char *result, unsigned maxlen) { unsigned sz = 0; struct flakey_c *fc = ti->private; unsigned drop_writes; switch (type) { case STATUSTYPE_INFO: result[0] = '\0'; break; case STATUSTYPE_TABLE: DMEMIT("%s %llu %u %u ", fc->...
false
false
false
false
false
0
makeLegSvg(QPointF offset, double dpi, double printerScale, bool blackOnly) { if (!m_rubberBandLeg) return ""; QString data("M"); QPointF p = m_legPolygon.at(0); data += TextUtils::pointToSvgString(mapToScene(p), offset, dpi, printerScale); for (int i = 1; i < m_legPolygon.count(); i++) { QPointF p = m_legPolyg...
false
false
false
false
false
0
vectors_substractionf(int n, float *vector1, float *vector2, float *result) { int i; for (i = 0; i < n; i++) { result[i] = vector1[i] - vector2[i]; } }
false
false
false
false
false
0
CanEnter(Player* player) { if (player->GetMapRef().getTarget() == this) { sLog.outError("Map::CanEnter -%s already in map!", player->GetGuidStr().c_str()); MANGOS_ASSERT(false); return false; } return true; }
false
false
false
false
false
0
canFoldOffset(unsigned OffsetSize, unsigned AS, const AMDGPUSubtarget &STI) { switch (AS) { case AMDGPUAS::GLOBAL_ADDRESS: { // MUBUF instructions a 12-bit offset in bytes. return isUInt<12>(OffsetSize); } case AMDGPUAS::CONSTANT_ADDRESS: { // SMRD instructions have an 8-bi...
false
false
false
false
false
0
__cbc_decrypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk) { struct bf_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); unsigned int bsize = BF_BLOCK_SIZE; unsigned int nbytes = walk->nbytes; u64 *src = (u64 *)walk->src.virt.addr; u64 *dst = (u64 *)walk->dst.virt.addr; u64 ivs[4 - 1]; u64 last_iv; ...
false
false
false
false
false
0
dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) { Q_UNUSED(column) if(action == Qt::IgnoreAction) return true; if(parent.isValid()) return false; if(data->hasFormat("application/actionaz.add.action")) { QByteArray encodedData = data->data("applica...
false
false
false
false
false
0
dupe_item_remove(DupeWindow *dw, DupeItem *di) { if (!di) return; /* handle things that may be in progress... */ if (dw->working && dw->working->data == di) { dw->working = dw->working->prev; } if (dw->thumb_loader && dw->thumb_item == di) { dupe_thumb_step(dw); } if (dw->setup_point && dw->setup_poin...
false
false
false
false
false
0
gftp_descramble_password (const char *password) { const char *passwordpos; char *newstr, *newpos; int error; if (*password != '$') return (g_strdup (password)); passwordpos = password + 1; newstr = g_malloc0 ((gulong) strlen (passwordpos) / 2 + 1); newpos = newstr; error = 0; while (*passwordp...
false
false
false
false
false
0
SubstituteAll(GtkWidget *W,gpointer Unused) { GtkTextIter Start,End; GtkTextMark *Mark; gint i; gchar StatusLine[MAX_STAT],*BufTxt; const gchar *FTxt; FTxt=gtk_entry_get_text(GTK_ENTRY(RFind)); if (!strlen(FTxt)) return; MaskBufChg=TRUE; SubsAll=TRUE; //Ensure BufferChanged wont act an...
false
false
false
false
false
0
dlm_should_restart_join(struct dlm_ctxt *dlm, struct domain_join_ctxt *ctxt, enum dlm_query_join_response_code response) { int ret; if (response == JOIN_DISALLOW) { mlog(0, "Latest response of disallow -- should restart\n"); return 1; } spin_lock(&dlm->spinlock); /* For now, we restart the proc...
false
false
false
false
false
0
dumpRoleMembership(PGconn *conn) { PGresult *res; int i; res = executeQuery(conn, "SELECT ur.rolname AS roleid, " "um.rolname AS member, " "a.admin_option, " "ug.rolname AS grantor " "FROM pg_auth_members a " "LEFT JOIN pg_authid ur on ur.oid = a.roleid " "LEFT JO...
false
false
false
false
false
0
reverse(const std::string& seq) { return std::string(seq.rbegin(), seq.rend()); }
false
false
false
false
false
0
get_dot(Token *token) #else /* K&R style */ get_dot(token) Token *token; #endif /* HAVE_STDC */ { if(src_text_len < MAX_SRC_TEXT) src_text_buf[src_text_len++] = curr_char; closeup(); /* Advance till nonspace char in next_char */ if(isadigit(next_char)) get_number(token); /* Numeric const */ else if(isalet...
false
false
false
false
false
0
cache_rrset_new(dns_msg_question_t *q, dns_tls_t *tls) { dns_cache_rrset_t *rrset; if ((rrset = (dns_cache_rrset_t *) dns_mpool_get(&CacheSetPool, tls->tls_id)) == NULL) { if ((rrset = cache_rrset_drain(tls)) == NULL) return NULL; } cache_rrset_reset(rrset, tls); if (cache_rrs...
false
false
false
false
false
0
Free() { if (!m_data) return; uint32 offset = 0; for (uint32 x = 0; x < m_dstFieldCount; ++x) { switch (m_dst_format[x]) { case FT_LOGIC: offset += sizeof(bool); break; case FT_STRING: { for (uin...
false
false
false
false
false
0
Disconnect() { if (state_ != STATE_CLOSED) { EnterExit ee(this); if (state_ == STATE_OPEN) *output_ << "</stream:stream>"; state_ = STATE_CLOSED; } return XMPP_RETURN_OK; }
false
false
false
false
false
0
bdelta_done_alg(void *instance) { BDelta_Instance *b = (BDelta_Instance*)instance; while (!b->matches.empty()) { delete b->matches.first->obj; b->matches.erase(b->matches.first); } delete b; }
false
false
false
false
false
0
dc1394_usb_free_device_list (platform_device_list_t * d) { usb_device_list_t * list = (usb_device_list_t *) d; int i; for (i = 0; i < d->num_devices; i++) free (d->devices[i]); free (d->devices); libusb_free_device_list (list->libusb_list, 1); free (d); }
false
false
false
false
false
0
est_aidx_attr_out(VILLA *db, int id, const char *vbuf, int vsiz){ char *tbuf; int err, tsiz; assert(db && id >= 0 && vbuf && vsiz >= 0); err = FALSE; tsiz = vsiz + sizeof(int) + 1; CB_MALLOC(tbuf, tsiz); memcpy(tbuf, vbuf, vsiz + 1); memcpy(tbuf + vsiz + 1, &id, sizeof(int)); if(!vlout(db, tbuf, tsiz)...
false
false
false
false
false
0
ctf_visitor_print_type_specifier_list(FILE *fd, int depth, struct ctf_node *node) { struct ctf_node *iter; int ret; print_tabs(fd, depth); fprintf(fd, "<type_specifier_list>\n"); bt_list_for_each_entry(iter, &node->u.type_specifier_list.head, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (r...
false
false
false
false
false
0
mouseReleaseEvent(QMouseEvent *e) { if (!isVisible()) return; emit clicked((int)e->button()); hide(); }
false
false
false
false
false
0
field_has_null_values(const sharedptr<const Field>& field) { //Note that "= Null" doesn't work, though it doesn't error either. //Note also that SELECT COUNT always returns 0 if all the values are NULL, so we can't use that to be more efficient. Glib::RefPtr<Gnome::Gda::SqlBuilder> builder = Gnome::Gda::SqlBu...
false
false
false
false
false
0
perf_iommu_stop(struct perf_event *event, int flags) { struct hw_perf_event *hwc = &event->hw; u64 config; pr_debug("perf: amd_iommu:perf_iommu_stop\n"); if (hwc->state & PERF_HES_UPTODATE) return; perf_iommu_disable_event(event); WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED); hwc->state |= PERF_HES_STOPPED; ...
false
false
false
false
false
0
log_initialize() { int i; if (_initialized) return; for (i = 0; i < LOG_MAXLOGS; i++) { loglist[i].in_use = 0; loglist[i].level = 2; loglist[i].size = 0; loglist[i].trigger_level = 0; loglist[i].filename = NULL; loglist[i].logfile = NULL; loglist[i]....
false
false
false
false
false
0
jinit_huff_decoder (j_decompress_ptr cinfo) { huff_entropy_ptr entropy; int i; entropy = (huff_entropy_ptr) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(huff_entropy_decoder)); cinfo->entropy = (struct jpeg_entropy_decoder *) entropy; entropy->pub.start_pass = start_pass_huff...
false
false
false
false
false
0
c_gc_show_freeable(state_t *s) { reg_t addr = cmd_params[0].reg; GET_SEG_INTERFACE(addr.segment); sciprintf("Freeable in segment %04x:\n", addr.segment); seg_interface->list_all_deallocatable(seg_interface, NULL, _print_address); seg_interface->deallocate_self(seg_interface); return 0; }
false
false
false
false
false
0
fso_gsm_base_unsolicited_response_handler_registerUrcPdu (FsoGsmBaseUnsolicitedResponseHandler* self, const gchar* prefix, UnsolicitedResponsePduHandlerFunc func, void* func_target) { GeeHashMap* _tmp0_ = NULL; const gchar* _tmp1_ = NULL; UnsolicitedResponsePduHandlerFunc _tmp2_ = NULL; void* _tmp2__target = NULL; ...
false
false
false
false
false
0
uprv_getPOSIXID(void) { static const char* posixID = NULL; if (posixID == 0) { /* * On Solaris two different calls to setlocale can result in * different values. Only get this value once. * * We must check this first because an application can set this. * ...
false
false
false
false
false
0
setContents( const QString &contents ) { Q_D( Annotation ); if (!d->pdfAnnot) { d->contents = contents; return; } GooString *s = QStringToUnicodeGooString(contents); d->pdfAnnot->setContents(s); delete s; }
false
false
false
false
false
0
event_terminate(void * x) { TerminateArgs * args = (TerminateArgs *)x; Context * ctx = args->ctx; ContextExtensionRC * ext = EXT(ctx); Channel * c = args->channel; LINK * l = ctx->children.next; while (l != &ctx->children) { Context * x = cldl2ctxp(l); ContextExtensionRC * y = EX...
false
false
false
false
false
0
copy_original_table_set (htab_t tab, unsigned obj, unsigned val) { struct htab_bb_copy_original_entry **slot; struct htab_bb_copy_original_entry key; if (!original_copy_bb_pool) return; key.index1 = obj; slot = (struct htab_bb_copy_original_entry **) htab_find_slot (tab, &key, INSERT); if (!*slot) ...
false
false
false
false
false
0
lookupFunction(const Function *F) { // Function not found, look it up... start by figuring out what the // composite function name should be. std::string ExtName = "lle_"; FunctionType *FT = F->getFunctionType(); for (unsigned i = 0, e = FT->getNumContainedTypes(); i != e; ++i) ExtName += getTypeID(FT->ge...
false
false
false
false
false
0
kvp_frame_delete(KvpFrame * frame) { if (!frame) return; if (frame->hash) { /* free any allocated resource for frame or its children */ g_hash_table_foreach(frame->hash, & kvp_frame_delete_worker, (gpointer)frame); /* delete the hash table */ g_...
false
false
false
false
false
0
drop_privileges(void) { #ifdef HAVE_SETGROUPS gid_t gr_list[1]; #endif /* set uid and gid */ if(global_options.gid) { if(setgid(global_options.gid)) { sockerror("setgid"); die(1); } #ifdef HAVE_SETGROUPS gr_list[0]=global_options.gid; if(setgroups(1, ...
false
false
false
false
false
0
addArgumentOnTheFly(const string & name, int numValues, ...) { va_list args; va_start(args, numValues); if (numValues == 0) { _resArgs[name].push_back(""); } for (int i = 0; i < numValues; ++i) { char* v = va_arg(args, char *); ...
false
false
false
false
false
0
mainwindow_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer data) { MainWindow *mainwin = (MainWindow*) data; if (!mainwin || !event) return FALSE; if (quicksearch_has_focus(mainwin->summaryview->quicksearch)) { lastkey = event->keyval; return FALSE; } switch (event->keyval) { case...
false
false
false
false
false
0
JoinAnyTeam(TM_TeamMember *teamMember, int *resultCode) { TeamMemberLimit balancedLimit = GetBalancedTeamLimit(); unsigned int idx = GetAvailableTeamIndexWithFewestMembers(balancedLimit, ALLOW_JOIN_ANY_AVAILABLE_TEAM); if (idx == (unsigned int ) -1) { // If any team is joinable but full, return full. Othe...
false
false
false
false
false
0
DecodeTime(char *str, int fmask, int *tmask, struct tm * tm, fsec_t *fsec) { char *cp; *tmask = DTK_TIME_M; tm->tm_hour = strtol(str, &cp, 10); if (*cp != ':') return -1; str = cp + 1; tm->tm_min = strtol(str, &cp, 10); if (*cp == '\0') { tm->tm_sec = 0; *fsec = 0; } else if (*cp != ':') return -...
false
false
false
false
false
0
ipa_tm_mayenterirr_function (struct cgraph_node *node) { struct tm_ipa_cg_data *d; tree decl; unsigned flags; d = get_cg_data (&node, true); decl = node->decl; flags = flags_from_decl_or_type (decl); /* Handle some TM builtins. Ordinarily these aren't actually generated at this point, but handling...
false
false
false
false
false
0
Mono_Posix_FromEpollEvents (unsigned int x, unsigned int *r) { *r = 0; if ((x & Mono_Posix_EpollEvents_EPOLLERR) == Mono_Posix_EpollEvents_EPOLLERR) #ifdef EPOLLERR *r |= EPOLLERR; #else /* def EPOLLERR */ {errno = EINVAL; return -1;} #endif /* ndef EPOLLERR */ if ((x & Mono_Posix_EpollEvents_EPOLLET) == Mono_Po...
false
false
false
false
false
0
getLevels(int rpt_index) { if (rpt_index < 0 || rpt_index > reports->number_of_rows() - 1) { return NULL; } else { return dynamic_cast<libdap::Sequence*>(reports->var_value(rpt_index, levels->name())); } }
false
false
false
false
false
0
max8997_led_brightness_set(struct led_classdev *led_cdev, enum led_brightness value) { struct max8997_led *led = container_of(led_cdev, struct max8997_led, cdev); if (value) { max8997_led_set_current(led, value); max8997_led_enable(led, true); } else { max8997_led_set_current(led, value); max8997_led...
false
false
false
false
false
0
array_tobytes(arrayobject *self, PyObject *unused) { if (Py_SIZE(self) <= PY_SSIZE_T_MAX / self->ob_descr->itemsize) { return PyBytes_FromStringAndSize(self->ob_item, Py_SIZE(self) * self->ob_descr->itemsize); } else { return PyErr_NoMemory(); } }
false
false
false
false
false
0
proc_bufname(p) Process p; { Buffer *b = p->p_buffer; return (b != NULL) ? b->b_name : "<Deleted>"; }
false
false
false
false
false
0
get_const_signature (DBusHeader *header, const DBusString **type_str_p, int *type_pos_p) { if (_dbus_header_get_field_raw (header, DBUS_HEADER_FIELD_SIGNATURE, type_str_p, ...
false
false
false
false
false
0
_mixer_popup_cb_mixer(void *data, void *data2 __UNUSED__) { E_Mixer_Instance *inst = data; E_Mixer_Module_Context *ctxt; E_Container *con; _mixer_popup_del(inst); ctxt = mixer_mod->data; if (ctxt->mixer_dialog) { _mixer_app_select_current(ctxt->mixer_dialog, inst); e_dialog_show...
false
false
false
false
false
0
vid_cap_buf_prepare(struct vb2_buffer *vb) { struct vivid_dev *dev = vb2_get_drv_priv(vb->vb2_queue); unsigned long size; unsigned buffers = tpg_g_buffers(&dev->tpg); unsigned p; dprintk(dev, 1, "%s\n", __func__); if (WARN_ON(NULL == dev->fmt_cap)) return -EINVAL; if (dev->buf_prepare_error) { /* * Err...
false
false
false
false
true
1
calc_week(MYSQL_TIME *l_time, uint week_behaviour, uint *year) { uint days; ulong daynr=calc_daynr(l_time->year,l_time->month,l_time->day); ulong first_daynr=calc_daynr(l_time->year,1,1); bool monday_first= test(week_behaviour & WEEK_MONDAY_FIRST); bool week_year= test(week_behaviour & WEEK_YEAR); bool firs...
false
false
false
false
false
0
GetStringSize(char *string, int level) { if (level > this->MaxFontLevel) { level = this->MaxFontLevel; } int size = 0, i; for(i = 0; string[i] != '\0'; i++) { if (string[i] < 32) { continue; } if (string[i] > 126) { continue; } size += this-...
false
false
false
false
false
0
__Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { PyObject *local_type, *local_value, *local_tb; PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->cur...
false
false
false
false
false
0
LoadTarballs() { for( int i = 0; i < 2; i++ ) { // load data into memory Restore builder(m_tarpaths[i]); StoreParser parser(m_tars[i]); Pipe pipe(builder); pipe.PumpFile(parser, m_ic.get()); // sort each database's record data by UniqueId for( DatabaseMap::iterator b = m_tars[i].begin(); b != m_tars...
false
false
false
false
false
0
gst_play_sink_set_subtitle_encoding (GstPlaySink * playsink, const gchar * encoding) { GstPlayTextChain *chain; GST_PLAY_SINK_LOCK (playsink); chain = (GstPlayTextChain *) playsink->textchain; g_free (playsink->subtitle_encoding); playsink->subtitle_encoding = g_strdup (encoding); if (chain && chain->o...
false
false
false
false
false
0
snuff_light_source(x, y) int x, y; { light_source *ls; struct obj *obj; for (ls = light_base; ls; ls = ls->next) /* Is this position check valid??? Can I assume that the positions will always be correct because the objects would have been updated with the last vision update? [Is that recent enough...
false
false
false
false
false
0
dw_sort_postings(HashTable *plists_ht) { int i, j; HashEntry *he; PostingList **plists = (PostingList **)plists_ht->table; const int num_entries = plists_ht->mask + 1; for (i = 0, j = 0; i < num_entries; i++) { he = &plists_ht->table[i]; if (he->value) { plists[j++] = (Po...
false
false
false
false
false
0
parse_noreturn() { if (noreturn.empty()) { noreturn.insert("exit"); noreturn.insert("_exit"); noreturn.insert("_Exit"); noreturn.insert("abort"); noreturn.insert("err"); noreturn.insert("verr"); noreturn.insert("errx"); noreturn.insert("verrx"); ...
false
false
false
false
false
0
find_scope(const std::list<hname_t>&path) const { if (path.empty()) return 0; for (list<NetScope*>::const_iterator scope = root_scopes_.begin() ; scope != root_scopes_.end(); scope++) { NetScope*cur = *scope; if (path.front() != cur->fullname()) continue; std::list<hname_t> tmp...
false
false
false
false
false
0
_e_order_save(E_Order *eo) { FILE *f; Eina_List *l; Efreet_Desktop *desktop; if (!eo->path) return; f = fopen(eo->path, "wb"); if (!f) return; EINA_LIST_FOREACH(eo->desktops, l, desktop) { const char *id; id = efreet_util_path_to_file_id(desktop->orig_path); if (id) ...
false
false
false
false
false
0
altera_ps2_open(struct serio *io) { struct ps2if *ps2if = io->port_data; /* clear fifo */ while (readl(ps2if->base) & 0xffff0000) /* empty */; writel(1, ps2if->base + 4); /* enable rx irq */ return 0; }
false
false
false
false
false
0
X509_NAME_to_string(std::string& str,const X509_NAME* name) { str.resize(0); if(name == NULL) return; char* s = X509_NAME_oneline((X509_NAME*)name,NULL,0); if(s) { str=s; OPENSSL_free(s); }; return; }
false
false
false
false
false
0
main(void) { deque_t *deque; int errcode,integer,integer_; size_t counter = 0; deque = deque_initialize(sizeof(int),NULL); if(!deque){ fputs("Error!\n",stderr); return -1; } while(counter != 64){ integer = counter; errcode = deque_push_front(deque,&integer); if(errcode){ deque_release(deque); fpu...
false
false
false
false
false
0
yylex(void) { extern YYSTYPE yylval; extern YYLTYPE yylloc; int result; int old_n; int is_elidable; int is_boiveho; if (!show_elisions) { /* Minimalist approach, no need for the fancy buffering */ TokenType tok; yylex1(&tok); yylval = tok.yylval; yylloc = tok.yylloc; return tok.va...
false
false
false
false
true
1
checkDBVersion() { // get a CRC for metadata.xml QString metadataXML = QString(home.absolutePath()) + "/metadata.xml"; int metadatacrcnow = computeFileCRC(metadataXML); // get a CRC for measures.xml //QString measuresXML = QString(home.absolutePath()) + "/measures.xml"; int measurescrcnow = 0...
false
false
false
false
false
0
ibus_serializable_real_deserialize (IBusSerializable *object, GVariant *variant) { const gchar *key; GVariant *value; GVariantIter *iter = NULL; g_variant_get_child (variant, 1, "a{sv}", &iter); while (g_variant_iter_loop (iter, "{&sv}", &key, &value)) { ...
false
false
false
false
false
0
lmc_shm_create(const char* namespace, size_t size, lmc_error_t *e) { lmc_shm_t *mc = calloc(1, sizeof(lmc_shm_t)); if (!mc) { STD_OUT_OF_MEMORY_ERROR("lmc_shm_create"); return NULL; } snprintf((char *)&mc->namespace, 1023, "%s", namespace); mc->size = size; lmc_shm_ensure_namespace_file(mc->names...
false
false
false
false
false
0
Vertical_XOR_line_tall2(word x_pos,word y_pos,word height) { int i; byte *dest=Screen_pixels+x_pos*ZOOMX+y_pos*VIDEO_LINE_WIDTH*ZOOMY; for (i=height;i>0;i--) { *(dest+3*VIDEO_LINE_WIDTH+1)=*(dest+3*VIDEO_LINE_WIDTH)=*(dest+2*VIDEO_LINE_WIDTH+1)=*(dest+2*VIDEO_LINE_WIDTH)=*(dest+VIDEO_LINE_WIDTH+1)=*(dest+VI...
false
false
false
false
false
0
DepthEvent(GtkWidget * UNUSED(widget), GdkEvent * event, rollswidget * prw) { switch (event->type) { case GDK_BUTTON_PRESS: fScrollComplete = FALSE; break; case GDK_BUTTON_RELEASE: fScrollComplete = TRUE; g_signal_emit_by_name(G_OBJECT(prw->pScale), "value-changed", prw); ...
false
false
false
false
false
0
button_release_event(GtkWidget *widget, GdkEventButton *event) { struct imgrect *ir; ir = find_image_rectangle(click.x, click.y); if (ir && ir == find_image_rectangle((int)event->x, (int)event->y)) { /* We draw a little frame around the image while we're saving it, to * give some visual fee...
false
false
false
false
false
0
v4lconvert_rotate90_rgbbgr24(const unsigned char *src, unsigned char *dst, int destwidth, int destheight) { int x, y; #define srcwidth destheight #define srcheight destwidth for (y = 0; y < destheight; y++) for (x = 0; x < destwidth; x++) { int offset = ((srcheight - x - 1) * srcwidth + y) * 3; *dst++ = sr...
false
false
false
false
false
0
ossl_pkcs7_s_encrypt(int argc, VALUE *argv, VALUE klass) { VALUE certs, data, cipher, flags; STACK_OF(X509) *x509s; BIO *in; const EVP_CIPHER *ciph; int flg, status = 0; VALUE ret; PKCS7 *p7; rb_scan_args(argc, argv, "22", &certs, &data, &cipher, &flags); if(NIL_P(cipher)){ #if !def...
false
false
false
false
true
1
insert(int type, int idno, int nindex, int*indexarray) { int i, j; int variableid; int found; if (Variable.getidnumber(idno)!=-1) { outerror(glno, "id exist."); return; } i=getidnumber(idno); if (i!=-1) { outerror(glno, "id exist."); return; } ...
false
false
false
false
false
0
dbmetaprint(kc::BasicDB* db, bool verbose) { if (verbose) { std::map<std::string, std::string> status; status["opaque"] = ""; if (db->status(&status)) { uint32_t type = kc::atoi(status["type"].c_str()); oprintf("type: %s (%s) (type=0x%02X)\n", kc::BasicDB::typecname(type), kc::Ba...
false
false
false
false
false
0
alarm_action_toggle_list_win (GtkAction *action, gpointer data) { AlarmApplet *applet = (AlarmApplet *)data; AlarmListWindow *list_window = applet->list_window; gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); g_debug ("AlarmAction: toggle list window"); /* if (!a || a...
false
false
false
false
false
0
unmount_callback(DBusGProxy *proxy, GError *error, gpointer user_data) { AsyncData* data = (AsyncData*)user_data; GSimpleAsyncResult* res; if(error) { error = g_udisks_error_to_gio_error(error); res = g_simple_async_result_new_from_error(G_OBJECT(data->mnt), ...
false
false
false
false
false
0
common_sh_start(const struct MachineSound *msound, const char *name) { int i, j; UINT32 shiftreg; poly18 = (UINT32 *)auto_malloc((1ul << (18-5)) * sizeof(UINT32)); if( !poly18 ) return 1; shiftreg = 0; for( i = 0; i < (1ul << (18-5)); i++ ) { UINT32 bits = 0; for( j = 0; j < 32; j++ ) {...
false
false
false
false
false
0
hiface_pcm_prepare(struct snd_pcm_substream *alsa_sub) { struct pcm_runtime *rt = snd_pcm_substream_chip(alsa_sub); struct pcm_substream *sub = hiface_pcm_get_substream(alsa_sub); struct snd_pcm_runtime *alsa_rt = alsa_sub->runtime; int ret; if (rt->panic) return -EPIPE; if (!sub) return -ENODEV; mutex_loc...
false
false
false
false
false
0
on_action_public_default(struct recv_frame *precv_frame, u8 action) { unsigned int ret = _FAIL; u8 *pframe = precv_frame->rx_data; u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); u8 token; token = frame_body[2]; if (rtw_action_public_decache(precv_frame, token) == _FAIL) goto exit; ret = _...
false
false
false
false
false
0
setValue(const QVariant &value) { if (d->m_Type==ExtraDocument) { d->setDocumentHtml(value); d->setDirty(); } else if (d->m_Value != value) { d->m_Value = value; d->setDirty(); } }
false
false
false
false
false
0
iio_init(void) { int ret; /* Register sysfs bus */ ret = bus_register(&iio_bus_type); if (ret < 0) { pr_err("could not register bus type\n"); goto error_nothing; } ret = alloc_chrdev_region(&iio_devt, 0, IIO_DEV_MAX, "iio"); if (ret < 0) { pr_err("failed to allocate char dev region\n"); goto error_unr...
false
false
false
false
false
0
bf_actt_c1( FMField *out, FMField *bf, FMField *in ) { int32 iqp, ir, ic, nEP, nQP, dim; float64 *pout, *pbf, *pin; nEP = bf->nCol; nQP = bf->nLev; dim = in->nRow; #ifdef DEBUG_FMF if ((out->nRow != dim * nEP) || (out->nCol != 1) || (out->nLev != in->nLev) || (out->nLev != bf->nLev) || (in->nRow != ...
false
false
false
false
false
0
request( void ) throw ( NullPointerException ) { if( theState != NULLPTR ) { theState->handle(); } else { throw NullPointerException( LOCATION ); } }
false
false
false
false
false
0
print_save_msg(buf, nchars) nbbuf_T *buf; off_t nchars; { char_u c; char_u *p; if (nchars >= 0) { /* put fname in IObuff with quotes */ msg_add_fname(buf->bufp, buf->bufp->b_ffname); c = FALSE; msg_add_lines(c, buf->bufp->b_ml.ml_line_count, buf->bufp->b_orig_size); vim_free(keep_m...
false
false
false
false
false
0
rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev) { int retval; if (!rt2x00_has_cap_flag(rt2x00dev, REQUIRE_FIRMWARE)) return 0; if (!rt2x00dev->fw) { retval = rt2x00lib_request_firmware(rt2x00dev); if (retval) return retval; } /* * Send firmware to the device. */ retval = rt2x00dev->ops->lib-...
false
false
false
false
false
0
GetOrCreateTaskProfile(char* fileName, int lineNum) { for(int i=0;i<(int)mTasks.size();i++) { if(strcmp(fileName,mTasks[i]->mFileName)==0 && lineNum == mTasks[i]->mLine) return mTasks[i]; } TaskProfile* tp = new TaskProfile(); mTasks.push_back(tp); return tp; }
false
false
false
false
false
0
CountChar(char *string,char sep) { char *sp; int count = 0; if (string == NULL) { return 0; } if (string && strlen(string) == 0) { return 0; } for (sp = string; *sp != '\0'; sp++) { if (*sp == '\\' && *(sp+1) == sep) { ++sp; } else if (*sp == sep) { count++...
false
false
false
false
false
0
expandargv (int *argcp, char ***argvp) { /* The argument we are currently processing. */ int i = 0; /* Non-zero if ***argvp has been dynamically allocated. */ int argv_dynamic = 0; /* Limit the number of response files that we parse in order to prevent infinite recursion. */ unsigned int iteration_l...
false
true
false
false
true
1
latencyCommandGenSparkeline(char *event, struct latencyTimeSeries *ts) { int j; struct sequence *seq = createSparklineSequence(); sds graph = sdsempty(); uint32_t min = 0, max = 0; for (j = 0; j < LATENCY_TS_LEN; j++) { int i = (ts->idx + j) % LATENCY_TS_LEN; int elapsed; ch...
false
false
false
false
false
0
addlist (List **listp, char *key) { Node *p; if (*listp == NULL) *listp = getlist (); p = getnode (); p->type = FILES; p->key = xstrdup (key); if (addnode (*listp, p) != 0) freenode (p); }
false
false
false
false
false
0
prt_fnc(fnc) struct c_fnc *fnc; { struct code *sig; char *name; char *prefix; if (fnc->flag & CF_SigOnly) { /* * This function only returns a signal. A shared function is used in * its place. Make sure that function has been printed. */ sig = fnc->cd.next->SigRef->sig; ...
false
false
false
false
false
0
codec_copy_filtered (FsCodec *codec, FsParamType paramtypes) { FsCodec *copy = fs_codec_copy (codec); GList *item = NULL; const struct SdpNegoFunction *nf; nf = get_sdp_nego_function (codec->media_type, codec->encoding_name); if (nf) { for (item = copy->optional_params; item;) { FsCodecParam...
false
false
false
false
false
0
iscsit_tmr_task_reassign( struct iscsi_cmd *cmd, unsigned char *buf) { struct iscsi_cmd *ref_cmd = NULL; struct iscsi_conn *conn = cmd->conn; struct iscsi_conn_recovery *cr = NULL; struct iscsi_tmr_req *tmr_req = cmd->tmr_req; struct se_tmr_req *se_tmr = cmd->se_cmd.se_tmr_req; struct iscsi_tm *hdr = (struct is...
false
false
false
false
false
0