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
add_inbuf(struct virtqueue *vq, struct port_buffer *buf) { struct scatterlist sg[1]; int ret; sg_init_one(sg, buf->buf, buf->size); ret = virtqueue_add_inbuf(vq, sg, 1, buf, GFP_ATOMIC); virtqueue_kick(vq); if (!ret) ret = vq->num_free; return ret; }
false
false
false
false
false
0
send_spawned (gboolean succeeded, char *error_message, guint32 error_code, GDestroyNotify callback, gpointer user_data) { GVfsDBusSpawner *proxy; GError *error; SpawnData *data; if (error_message == NULL) error_message = ""; if (spawner_id == NULL...
false
false
false
false
false
0
f_at_qp(const QUAD *quad, REAL (*f)(const REAL [N_LAMBDA]), REAL *vec) { FUNCNAME("f_at_qp"); static REAL *quad_vec = nil; static size_t size = 0; REAL *val; int i; if (vec) { val = vec; } else { if (size < (size_t) quad->n_points) { size_t new_size ...
false
false
false
false
false
0
_dxfTrisRI2DInterpolator_LocalizeInterpolator(TrisRI2DInterpolator ti) { if (ti->fieldInterpolator.localized) return (Interpolator)ti; ti->fieldInterpolator.localized = 1; if (ti->fieldInterpolator.initialized) { ti->triangles = (Triangle *)DXGetArrayDataLocal(ti->tArray); ti->neighbo...
false
false
false
false
false
0
stream_reqbody_chunked(apr_pool_t *p, request_rec *r, proxy_conn_rec *p_conn, conn_rec *origin, apr_bucket_brigade *header_brigade, ...
true
true
false
false
false
1
btdm_BTCoexist8723AHandler(struct rtw_adapter *padapter) { struct hal_data_8723a *pHalData; pHalData = GET_HAL_DATA(padapter); if (btdm_BtWifiAntNum(padapter) == Ant_x2) { RTPRINT(FBT, BT_TRACE, ("[BTCoex], 2 Ant mechanism\n")); BTDM_2AntBtCoexist8723A(padapter); } else { RTPRINT(FBT, BT_TRACE, ("[BTCoex], ...
false
false
false
false
false
0
addview ( void ) { if ( viewOnMap ) fatalError ("void Building :: addview - the building is already viewing the map"); viewOnMap = true; tcomputebuildingview bes ( gamemap ); bes.init( this, +1 ); bes.startsearch(); }
false
false
false
false
false
0
GetBounds() { if (!this->GetInput()) { vtkMath::UninitializeBounds(this->Bounds); return this->Bounds; } this->UpdateInformation(); int extent[6]; extent[0] = this->DisplayExtent[0]; extent[1] = this->DisplayExtent[1]; extent[2] = this->DisplayExtent[2]; extent[3] = this->DisplayExtent[3...
false
false
false
false
false
0
visitExtractValueInst(ExtractValueInst &EVI) { // If this returns a struct, mark all elements over defined, we don't track // structs in structs. if (EVI.getType()->isStructTy()) return markAnythingOverdefined(&EVI); // If this is extracting from more than one level of struct, we don't know. if (EVI....
false
false
false
false
false
0
g_vfs_ftp_parse_mode (char file_mode[10], guint32 *mode, GFileType *file_type) { /* File type */ switch (file_mode[0]) { case '-': /* Regular file */ *mode = S_IFREG; *file_type = G_FILE_TYPE_REGULAR; break; case 'b': /* Block special...
false
false
false
false
false
0
probe_gfs(blkid_probe pr, const struct blkid_idmag *mag) { struct gfs2_sb *sbd; sbd = blkid_probe_get_sb(pr, mag, struct gfs2_sb); if (!sbd) return errno ? -errno : 1; if (be32_to_cpu(sbd->sb_fs_format) == GFS_FORMAT_FS && be32_to_cpu(sbd->sb_multihost_format) == GFS_FORMAT_MULTI) { if (*sbd->sb_locktab...
false
false
false
false
false
0
vfio_domains_have_iommu_cache(struct vfio_iommu *iommu) { struct vfio_domain *domain; int ret = 1; mutex_lock(&iommu->lock); list_for_each_entry(domain, &iommu->domain_list, next) { if (!(domain->prot & IOMMU_CACHE)) { ret = 0; break; } } mutex_unlock(&iommu->lock); return ret; }
false
false
false
false
false
0
hasOperand(const SCEV *O) const { for (op_iterator I = op_begin(), E = op_end(); I != E; ++I) { const SCEV *S = *I; if (O == S || S->hasOperand(O)) return true; } return false; }
false
false
false
false
false
0
lr_ignore_rest (struct linereader *lr, int verbose) { if (verbose) { while (isspace (lr->buf[lr->idx]) && lr->buf[lr->idx] != '\n' && lr->buf[lr->idx] != lr->comment_char) if (lr->buf[lr->idx] == '\0') { if (lr_next (lr) < 0) return; } else ++lr->idx; if (lr->buf[lr->idx]...
false
false
false
false
false
0
bytwiddle(const P *ego, R *rio, R *iio) { INT iv, ir, im; INT r = ego->r, rs = ego->rs; INT m = ego->m, mb = ego->mb, me = ego->me, ms = ego->ms; INT v = ego->v, vs = ego->vs; const R *W = ego->td->W; mb += (mb == 0); /* skip m=0 iteration */ for (iv = 0; iv < v; ++iv) { for (ir =...
false
false
false
false
false
0
test_util_asprintf(void *ptr) { #define LOREMIPSUM \ "Lorem ipsum dolor sit amet, consectetur adipisicing elit" char *cp=NULL, *cp2=NULL; int r; (void)ptr; /* empty string. */ r = tor_asprintf(&cp, "%s", ""); tt_assert(cp); tt_int_op(r, ==, strlen(cp)); tt...
false
false
false
false
false
0
networkqueuePartialImage(const char* node, int percentage) { CONDITION cond; CTNNETWORK_Queue entry; int imageQueue; imageQueue = findQueue(node); if (imageQueue < 0) return; cond = GQ_GetQueue(queueNumber, sizeof(CTNNETWORK_Queue)); if (cond != GQ_NORMAL) { COND_DumpConditions(); return; ...
false
true
false
false
false
1
dofwrdc(BW *bw, int k, void *object, int *notify) { int c; P *q; if (notify) *notify = 1; if (k < 0 || k >= 256) { nungetc(k); return -1; } q = pdup(bw->cursor, USTR "dofwrdc"); if (dobkwdc) { while ((c = prgetc(q)) != NO_MORE_DATA) if (c == k) break; } else { while ((c = pgetc(q)) != NO_MORE_...
false
false
false
false
false
0
print_dst_unreach (struct icmp6_hdr *icmp6) { struct icmp_code_descr *p; printf ("Destination unreachable: "); for (p = icmp_dest_unreach_desc; p < icmp_dest_unreach_desc + NITEMS (icmp_dest_unreach_desc); p++) { if (p->code == icmp6->icmp6_code) { puts (p->diag); return; } } prin...
false
false
false
false
false
0
readConfig(const KConfigGroup& group) { // FIXME: add support for several categories later on // FIXME: read out only when actually installing as a performance improvement? QString uncompresssetting = group.readEntry("Uncompress", QString("never")); // support old value of true as equivalent of always ...
false
false
false
false
false
0
spear1340_miphy_suspend(struct device *dev) { struct spear1340_miphy_priv *priv = dev_get_drvdata(dev); int ret = 0; if (priv->mode == SATA) ret = spear1340_miphy_sata_exit(priv); return ret; }
false
false
false
false
false
0
OutputXmlTestInfo(::std::ostream* stream, const char* test_case_name, const TestInfo& test_info) { const TestResult& result = *test_info.result(); *stream << " <testcase name=\"" << EscapeXmlAttribute(test...
false
false
false
false
false
0
ipmiconsole_process_ctxs (List console_engine_ctxs, unsigned int *timeout) { ListIterator itr = NULL; ipmiconsole_ctx_t c; int ctxs_count = 0; unsigned int min_timeout = UINT_MAX; int rv = -1; assert (console_engine_ctxs); assert (timeout); *timeout = 0; if (!list_count (console_engine_ctxs)) r...
false
false
false
false
false
0
SystematicRotorSearch(unsigned int geomSteps) { if (SystematicRotorSearchInitialize(geomSteps)) while (SystematicRotorSearchNextConformer(geomSteps)) {} }
false
false
false
false
false
0
exception_withdraw(unsigned long interrupt_level) { TRACE("Exception withdrawn at interrupt level %d\n", interrupt_level); if(iack_func[interrupt_level] == NULL) { ERR("Attempting to withdraw interrupt level %d which is not set.\n", interrupt_level); } exception_pending &= ~(0x1 << interrupt_level); iack_fun...
true
true
false
false
false
1
event_selfarg_cb(evutil_socket_t fd, short event, void *arg) { struct event *ev = arg; struct event_base *base = event_get_base(ev); event_base_assert_ok_(base); event_base_loopexit(base, NULL); tt_want(ev == event_base_get_running_event(base)); }
false
false
false
false
false
0
save_movie_screen(void) { FILE *f; /* file to save game in */ count_t i; piece_info_t *p; f = fopen ("empmovie.dat", "a"); /* open for append */ if (f == NULL) { perror ("Cannot open empmovie.dat"); return; } for (i = 0; i < MAP_SIZE; i++) { if (map[i].cityp) mapbuf[i] = city_char[map[i...
false
false
false
false
true
1
broadcast( SP_Response * response, const char * buffer, SP_Sid_t * ignoreSid ) { if( mOnlineSidList->getCount() > 0 ) { SP_Message * msg = new SP_Message(); mOnlineSidList->copy( msg->getToList(), ignoreSid ); msg->setCompletionKey( ++mMsgSeq ); msg->getMsg()->append( buffer ); response->addMessage( msg ); ...
false
false
false
false
false
0
bfa_diag_ledtest(struct bfa_diag_s *diag, struct bfa_diag_ledtest_s *ledtest) { bfa_trc(diag, ledtest->cmd); if (!bfa_ioc_is_operational(diag->ioc)) return BFA_STATUS_IOC_NON_OP; if (diag->beacon.state) return BFA_STATUS_BEACON_ON; if (diag->ledtest.lock) return BFA_STATUS_LEDTEST_OP; /* Send msg to fw *...
false
false
false
false
false
0
_hidden_job(struct job_record *job_ptr) { int i; if (job_ptr->job_id < slurmctld_conf.first_job_id) { /* jobs submitted directly by Moab */ return 0; } for (i=0; i<HIDE_PART_CNT; i++) { if (hide_part_ptr[i] == NULL) break; if (hide_part_ptr[i] == job_ptr->part_ptr) return 1; } return 0; }
false
false
false
false
false
0
validatekeys(UCS ch) { if(F_ON(F_USE_FK,ps_global)){ if(ch >= 'a' && ch <= 'z') return(KEY_JUNK); } else{ if(ch >= PF1 && ch <= PF12) return(KEY_JUNK); } return(ch); }
false
false
false
false
false
0
gtk_source_completion_words_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtkSourceCompletionWords *self = GTK_SOURCE_COMPLETION_WORDS (...
false
false
false
false
false
0
FindNestedElementWithName(const char* name) { if (!name) { return 0; } int i; for(i=0;i < this->NumberOfNestedElements;++i) { const char* nname = this->NestedElements[i]->GetName(); if(nname && (strcmp(nname, name) == 0)) { return this->NestedElements[i]; } } retur...
false
false
false
false
false
0
pp_channel_open(mud_device *pd, const char *sn, HPMUD_CHANNEL *cd) { int index; enum HPMUD_RESULT stat = HPMUD_R_DEVICE_BUSY; /* Check for valid service requests. */ if ((stat = service_to_channel(pd, sn, &index)) != HPMUD_R_OK) goto bugout; pthread_mutex_lock(&pd->mutex); if (new_channel(pd,...
false
false
false
false
false
0
_elm_genlist_smart_on_focus(Evas_Object *obj) { ELM_GENLIST_DATA_GET(obj, sd); if (!ELM_WIDGET_CLASS(_elm_genlist_parent_sc)->on_focus(obj)) return EINA_FALSE; if (elm_widget_focus_get(obj) && (sd->items) && (sd->selected) && (!sd->last_selected_item)) sd->last_selected_item = eina_list_data...
false
false
false
false
false
0
reuseImage(ViewLayer::ViewID viewID) { if (m_currentGraphicsView == NULL) return; ViewThing * afterViewThing = m_viewThings.value(viewID); if (afterViewThing->itemBase == NULL) return; QString afterFilename = afterViewThing->itemBase->filename(); ViewThing * beforeViewThing = m_viewThings.value(m_currentGraphic...
false
false
false
false
false
0
gee_tim_sort_slice_merge_in_reversed (GeeTimSortSlice* self, void** dest_array, gint index, gint dest_index, gint count) { void** _tmp0_ = NULL; gint _tmp1_ = 0; void** _tmp2_ = NULL; gint _tmp3_ = 0; gint _tmp4_ = 0; g_return_if_fail (self != NULL); _tmp0_ = dest_array; _tmp1_ = dest_index; _tmp2_ = self->lis...
false
false
false
false
false
0
loadGame( const KConfigGroup& config ) { int pwc = config.readEntry( "PWC", -1 ); int phc = config.readEntry( "PHC", -1 ); int colorCount = config.readEntry( "ColorCount", -1 ); int gameId = config.readEntry( "GameId", -1 ); if ( pwc == -1 || phc == -1 || colorCount == -1 || gameId == -1 ) { ...
false
false
false
false
false
0
mpi_add_abs( mpi *X, const mpi *A, const mpi *B ) { int ret; size_t i, j; t_uint *o, *p, c; if( X == B ) { const mpi *T = A; A = X; B = T; } if( X != A ) MPI_CHK( mpi_copy( X, A ) ); /* * X should always be positive as a result of unsigned additions. */ ...
false
false
false
false
false
0
poll_register(pollObject *self, PyObject *args) { PyObject *o, *key, *value; int fd, events = POLLIN | POLLPRI | POLLOUT; int err; if (!PyArg_ParseTuple(args, "O|i:register", &o, &events)) { return NULL; } fd = PyObject_AsFileDescriptor(o); if (fd == -1) return NULL; /* Add en...
false
false
false
false
false
0
tracker_data_query_rdf_type (gint id) { TrackerDBCursor *cursor = NULL; TrackerDBInterface *iface; TrackerDBStatement *stmt; GPtrArray *ret = NULL; GError *error = NULL; iface = tracker_db_manager_get_db_interface (); stmt = tracker_db_interface_create_statement (iface, TRACKER_DB_STATEMENT_CACHE_TYPE_SELECT, ...
false
false
false
false
false
0
checkVR(const OFString &value, size_t *pos, const OFBool checkLength) { unsigned char c; size_t i; const size_t length = value.length(); const size_t maxlen = (length < MAX_CS_LENGTH) || (!checkLength) ? length : MAX_CS_LENGTH; /* iterate o...
false
false
false
false
false
0
push_replacement (rtx *loc, int reloadnum, enum machine_mode mode) { if (replace_reloads) { struct replacement *r = &replacements[n_replacements++]; r->what = reloadnum; r->where = loc; r->mode = mode; } }
false
false
false
false
false
0
brw_blorp_blit_miptrees(struct brw_context *brw, struct intel_mipmap_tree *src_mt, unsigned src_level, unsigned src_layer, struct intel_mipmap_tree *dst_mt, unsigned dst_level, unsigned dst_layer, flo...
false
false
false
false
false
0
storeBinaryField( FlmRecord * pRec, void * pvField, const char * pszFldValue) { RCODE rc = FERR_OK; F_DynamicBuffer * pBuf = NULL; const char * pszTmp; FLMBOOL bHaveFirstNibble = FALSE; FLMBYTE ucVal = 0; FLMUINT uiNibble; if (pszFldValue == '\0' || *pszFldValue == '\0') { goto Exit...
false
false
false
false
false
0
KernelBessel_Q1(const float x) { double p, q; register long i; static const double Pone[] = { 0.3511751914303552822533318e+3, 0.7210391804904475039280863e+3, 0.4259873011654442389886993e+3, 0.831898957673850827325226e+2, 0.45681716295512267064405e+1, 0.3532840052740123642735e-1 }, Qone[] = { 0...
false
false
false
false
false
0
find_cb(Fl_Widget* w, void* v) { EditorWindow* e = (EditorWindow*)v; const char *val; val = fl_input("Search String:", e->search); if (val != NULL) { // User entered a string - go find it! strcpy(e->search, val); find2_cb(w, v); } }
false
false
false
false
false
0
upnp_ctrl_ret_GetStatusInfo(nv_table_t *ret, size_t *lenp) { struct upnp_GetStatusInfo *r; const char *status; time_delta_t uptime; status = nv_table_lookup_str(ret, "NewConnectionStatus"); if (NULL == status) return NULL; if (!upnp_ctrl_get_time_delta(ret, "NewUptime", &uptime)) return NULL; WALLOC(r); ...
false
false
false
false
false
0
ab3100_get_voltage_regulator(struct regulator_dev *reg) { struct ab3100_regulator *abreg = rdev_get_drvdata(reg); u8 regval; int err; /* * For variable types, read out setting and index into * supplied voltage list. */ err = abx500_get_register_interruptible(abreg->dev, 0, abreg->regreg, &regval); if...
false
false
false
false
false
0
diagnose_invalid_sha1_path(const char *prefix, const char *filename, const unsigned char *tree_sha1, const char *object_name) { struct stat st; unsigned char sha1[20]; unsigned mode; if (!prefix) prefix = ""; if (!lstat(filename, &st)) die("Path '%s' exists on disk, but not i...
true
true
false
false
false
1
dht_c_class_update_count(knode_t *kn, int pmone) { knode_check(kn); g_assert(pmone == +1 || pmone == -1); if (!host_addr_is_ipv4(kn->addr)) return; acct_net_update(c_class, kn->addr, NET_CLASS_C_MASK, pmone); }
false
false
false
false
false
0
insertWindow(Focusable &win, int pos) { IconButton *button = 0; IconMap::iterator icon_it = m_icons.find(&win); if (icon_it != m_icons.end()) button = icon_it->second; if (button) m_icon_container.removeItem(button); else button = makeButton(win); if (!button) return; ...
false
false
false
false
false
0
rtp_session_process_rtcp (RTPSession * sess, GstBuffer * buffer, GstClockTime current_time, guint64 ntpnstime) { GstRTCPPacket packet; gboolean more, is_bye = FALSE, do_sync = FALSE; RTPArrivalStats arrival; GstFlowReturn result = GST_FLOW_OK; g_return_val_if_fail (RTP_IS_SESSION (sess), GST_FLOW_ERROR);...
false
false
false
false
false
0
dns_decode(unsigned char *start, unsigned int size, unsigned char *ptr, \ char *out, unsigned int outsize, unsigned char **next){ unsigned char *end; char *w; unsigned int clabels=0, nlabels=0; end= start+size; w= out; while(nlabels <= MAX_DNS_LABELS){ switch((*ptr & 0xc0)){ case 0x00: /* No compres...
false
true
false
false
false
1
AdjustLevel(int dev, int incr, int setlevel) /* * dev: device to adjust * incr: signed percentage to increase (decrease) level, ignored unless * setlevel = -1 * setlevel: level to set directly, or -1 to increment */ { int balset, max, left, right, temp; if (!((1 << dev) & devmask) || (dev > S...
false
false
false
false
false
0
intel_attach_aspect_ratio_property(struct drm_connector *connector) { if (!drm_mode_create_aspect_ratio_property(connector->dev)) drm_object_attach_property(&connector->base, connector->dev->mode_config.aspect_ratio_property, DRM_MODE_PICTURE_ASPECT_NONE); }
false
false
false
false
false
0
LoadSignature (ZIO* Z) { char* s=SIGNATURE; while (*s!=0 && ezgetc(Z)==*s) ++s; if (*s!=0) luaL_verror("bad signature in %s",zname(Z)); }
false
false
false
false
false
0
getChars(int nChars, Guchar *buffer) { int n, m; n = 0; while (n < nChars) { if (predIdx >= rowBytes) { if (!getNextLine()) { break; } } m = rowBytes - predIdx; if (m > nChars - n) { m = nChars - n; } memcpy(buffer + n, predLine + predIdx, m); predIdx += m; n +=...
false
false
false
false
false
0
nameinfo_callback(void *arg, int status, int timeouts, struct hostent *host) { struct nameinfo_query *niquery = (struct nameinfo_query *) arg; char srvbuf[33]; char *service = NULL; niquery->timeouts += timeouts; if (status == ARES_SUCCESS) { /* They want a service too...
true
true
false
false
false
1
exfat_put_node(struct exfat* ef, struct exfat_node* node) { if (--node->references < 0) { char buffer[EXFAT_NAME_MAX + 1]; exfat_get_name(node, buffer, EXFAT_NAME_MAX); exfat_bug("reference counter of `%s' is below zero", buffer); } if (node->references == 0) { if (node->flags & EXFAT_ATTRIB_DIRTY) exf...
true
true
false
true
false
1
ParseAsciiData(int wordType) { istream& is = *(this->Stream); // Don't re-parse the same ascii data. if(this->AsciiDataPosition == static_cast<OffsetType>(this->TellG())) { return (this->AsciiDataBuffer? 1:0); } // Prepare for new data. this->AsciiDataPosition = this->TellG(); if(this->AsciiDa...
false
false
false
false
false
0
restart_monitor() { /* If we're supposed to be stopped -- stay stopped */ if (monitor_thread == AST_PTHREADT_STOP) return 0; if (ast_mutex_lock(&monlock)) { ast_log(LOG_WARNING, "Unable to lock monitor\n"); return -1; } if (monitor_thread == pthread_self()) { ast_mutex_unlock(&monlock); ast_log(LOG_WARNI...
true
true
false
false
true
1
create () { if(verbose) cout << " _16bit_processor :: create\n" ; fast_stack.init(this); /* ind0.init(this); ind1.init(this); ind2.init(this); */ pic_processor::create(); create_sfr_map(); tmr0l.initialize(); intcon.set_rcon(&rcon); intcon.set_intcon2(&intcon2); intcon.set_pir_set(&pir...
false
false
false
false
false
0
loadFromConfigFile( const mrpt::utils::CConfigFileBase &iniFile, const std::string &section) { MRPT_START MRPT_LOAD_CONFIG_VAR_NO_DEFAULT(adaptiveSampleSize,bool, iniFile,section.c_str()); MRPT_LOAD_CONFIG_VAR_NO_DEFAULT(BETA,double, iniFile,section.c_str()); MRPT_LOAD_CONFIG_VAR_NO_DEFAULT(sampleSize,int, ...
false
false
false
false
false
0
_update_block_record(sview_block_info_t *block_ptr, GtkTreeStore *treestore) { char cnode_cnt[20], cnode_cnt2[20]; char *tmp_char = NULL, *tmp_char2 = NULL, *tmp_char3 = NULL; convert_num_unit((float)block_ptr->cnode_cnt, cnode_cnt, sizeof(cnode_cnt), UNIT_NONE); if (cluster_flags & CLUSTER_FLAG_BGQ) { ...
false
false
false
false
false
0
display_rule(int ruleno, int indent, int focus) { int i, j; char **toknames = require_elidables ? full_toknames : norm_toknames; unsigned short *ruleindex = require_elidables ? full_ruleindex : norm_ruleindex; unsigned short *rulelhs = require_elidables ? full_rulelhs : norm_rulelhs; unsigned short *rulerhs =...
false
false
false
false
true
1
ex_fold(eap) exarg_T *eap; { if (foldManualAllowed(TRUE)) foldCreate(eap->line1, eap->line2); }
false
false
false
false
false
0
datetime_decompose_timezone(int tz, int *hours, int *minutes) { if (tz < 0) tz = -tz; *hours = tz / 60; *minutes = tz % 60; }
false
false
false
false
false
0
GetFileNumber(wad_file_t *handle) { int i; int result; for (i=0; i<num_open_wadfiles; ++i) { if (open_wadfiles[i] == handle) { return i; } } // Not found in list. This is a new file we haven't seen yet. // Allocate another slot for this file. open_...
false
false
false
false
false
0
pattern_compile_fast(const char *pattern, size_t plen) { cpattern_t *p; WALLOC(p); p->magic = CPATTERN_MAGIC; p->pattern = pattern; p->len = plen; p->duped = FALSE; return pattern_build_delta(p); }
false
false
false
false
false
0
_PyObject_GetDictPtr(PyObject *obj) { Py_ssize_t dictoffset; PyTypeObject *tp = Py_TYPE(obj); dictoffset = tp->tp_dictoffset; if (dictoffset == 0) return NULL; if (dictoffset < 0) { Py_ssize_t tsize; size_t size; tsize = ((PyVarObject *)obj)->ob_size; if (ts...
false
false
false
false
false
0
~CdlPackageBody() { CYG_REPORT_FUNCNAME("CdlPackageBody:: destructor"); CYG_REPORT_FUNCARG1XV(this); CYG_PRECONDITION_THISC(); loaded_for_template = false; loaded_for_hardware = false; cdlpackagebody_cookie = CdlPackageBody_Invalid; CYGDBG_MEMLEAK_DESTRUCTOR(); CYG_REPORT_RETUR...
false
false
false
false
false
0
comparison (lua_Type ttype_less, lua_Type ttype_equal, lua_Type ttype_great, IMS op) { TObject *l = top-2; TObject *r = top-1; int result; if (ttype(l) == LUA_T_NUMBER && ttype(r) == LUA_T_NUMBER) result = (nvalue(l) < nvalue(r)) ? -1 : (nvalue(l) == nvalue(r)) ? 0 : 1; else if (t...
false
false
false
false
false
0
parseTable(char *tag, uint32_t startline, const struct UString *comment, UErrorCode *status) { struct SResource *result; if (tag != NULL && uprv_strcmp(tag, "CollationElements") == 0) { return parseCollationElements(tag, startline, FALSE, status); } if (tag != NULL && uprv_strcmp(tag, "coll...
false
false
false
false
false
0
ibmasm_new_command(struct service_processor *sp, size_t buffer_size) { struct command *cmd; if (buffer_size > IBMASM_CMD_MAX_BUFFER_SIZE) return NULL; cmd = kzalloc(sizeof(struct command), GFP_KERNEL); if (cmd == NULL) return NULL; cmd->buffer = kzalloc(buffer_size, GFP_KERNEL); if (cmd->buffer == NULL) {...
false
false
false
false
false
0
removeFromQueues(Capability *cap, StgTSO *tso) { switch (tso->why_blocked) { case NotBlocked: case ThreadMigrating: return; case BlockedOnSTM: // Be careful: nothing to do here! We tell the scheduler that the // thread is runnable and we leave it to the stack-walking code to // abort the tr...
false
false
false
false
false
0
l2tp_send_SCCRP(struct l2tp_conn_t *conn) { struct l2tp_packet_t *pack; uint16_t chall_len; int err; log_tunnel(log_info2, conn, "sending SCCRP\n"); pack = l2tp_packet_alloc(2, Message_Type_Start_Ctrl_Conn_Reply, &conn->peer_addr, conn->hide_avps, conn->secret, conn->secret_len); if (!pack) { log_tu...
false
false
false
false
false
0
show_error_dialog (GError *error) { GtkWidget *dialog; const gchar *str; str = error->message ? error->message : _("No error was given"); dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_O...
false
false
false
false
false
0
escapeXML(std::string& text) { const Entities& ent = getEntities(); for (Entities::const_iterator i = ent.begin(), e = ent.end(); i != e; ++i) { boost::replace_all(text, i->second, i->first); } }
false
false
false
false
false
0
li_vector(li_object *lst) { li_object *obj; li_object *iter; int k; for (k = 0, iter = lst; iter; k++, iter = li_cdr(iter)) ; obj = li_create(LI_T_VECTOR); obj->data.vector.data = li_allocate(li_null, k, sizeof(*obj->data.vector.data)); obj->data.vector.length = k; f...
false
false
false
false
true
1
amdgpu_get_bios(struct amdgpu_device *adev) { bool r; uint16_t tmp; r = amdgpu_atrm_get_bios(adev); if (r == false) r = amdgpu_acpi_vfct_bios(adev); if (r == false) r = igp_read_bios_from_vram(adev); if (r == false) r = amdgpu_read_bios(adev); if (r == false) { r = amdgpu_read_bios_from_rom(adev); } i...
false
false
false
false
false
0
GsbReadOrientName() { char Layer; char Field; char LayerCount; char EndTable; char *FirstWord; rdsbegin(); EndTable = 0; LayerCount = 0; while ( ( EndTable != 1 ) && ( LayerCount <= MBK_MAX_ORIENT ) ) { GsbGetLine( GsbBuffer ); FirstWord = GsbGetFirst...
false
false
false
false
false
0
symbol_dl_firmware(struct orinoco_private *priv, const struct fw_info *fw) { struct device *dev = priv->dev; int ret; const struct firmware *fw_entry; if (!orinoco_cached_fw_get(priv, true)) { if (request_firmware(&fw_entry, fw->pri_fw, priv->dev) != 0) { dev_err(dev, "Cannot find firmware: %s\n", fw->pr...
false
false
false
false
false
0
tracker_evt_update_orphans_cb (GObject *object, GAsyncResult *result, tracker_evt_update_t *evt) { GError *error = NULL; GRL_DEBUG ("%s: evt=%p", __FUNCTION__, evt); evt->cursor = tracker_sparql_connection_query_finish (grl_track...
false
false
false
false
false
0
relobj(struct monst *mtmp, int show, bool is_pet) { register struct obj *otmp; register int omx = mtmp->mx, omy = mtmp->my; struct obj *keepobj = 0; struct obj *wep = MON_WEP(mtmp); bool item1 = false, item2 = false; if (!is_pet || mindless(mtmp->data) || is_animal(mtmp->data)) item...
false
false
false
false
false
0
begin(const std::string &src_chset, const std::string &dst_chset) { end(); if ((handle=libmail_u_convert_init(src_chset.c_str(), dst_chset.c_str(), &iconv_trampoline, this)) == NULL) return false; return true; }
false
false
false
false
false
0
init_communication(void) { const char *user = "Find Family"; /*** create and init local com structure ***/ if( aisc_create(link, PT_MAIN, com, MAIN_LOCS, PT_LOCS, &locs, LOCS_USER, user, NULL)){ return GB_export_error("Cannot initialize commun...
false
false
false
false
false
0
ves_icall_System_Runtime_InteropServices_Marshal_GetCCW (MonoObject* object, MonoReflectionType* type) { #ifndef DISABLE_COM MonoClass* klass = NULL; void* itf = NULL; g_assert (type); g_assert (type->type); klass = mono_type_get_class (type->type); g_assert (klass); if (!mono_class_init (klass)) mono_raise_ex...
false
false
false
false
false
0
changed(GtkWidget *widget, GdkEventMotion *event, gpointer data) { switch (get_status(widget)) { case es_unchanged: entry_color(widget, COLOR_EDIT_ASIS); break; case es_good: entry_color(widget, COLOR_EDIT_GOOD); break; case es_bad: entry_color(widget, COLOR_EDIT_BAD); break; default: abort(); }...
false
false
false
false
false
0
AcquireFxInfo(const Image *image,const char *expression) { char fx_op[2]; const Image *next; FxInfo *fx_info; register ssize_t i; fx_info=(FxInfo *) AcquireMagickMemory(sizeof(*fx_info)); if (fx_info == (FxInfo *) NULL) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFai...
false
false
false
false
false
0
eval_clause_in_rule(Topform c, Clause_eval p) { Literals lits = c->literals; switch (p->type) { case CL_EVAL_AND: return eval_clause_in_rule(c, p->left) && eval_clause_in_rule(c, p->right); case CL_EVAL_OR: return eval_clause_in_rule(c, p->left) || eval_clause_in_rule(c, p->rig...
false
false
false
false
false
0
giggle_git_update_description (GiggleGit *git) { /* FIXME: read .git/description into description; install a file watch */ GiggleGitPriv *priv; GError *error; gchar* description; priv = git->priv; g_free (priv->description); priv->description = NULL; description = giggle_git_get_description_file (git)...
false
false
false
false
false
0
sm_free_pool_memory(const char *fname, int lineno, POOLMEM *obuf) { struct abufhead *buf; int pool; ASSERT(obuf); P(mutex); buf = (struct abufhead *)((char *)obuf - HEAD_SIZE); pool = buf->pool; pool_ctl[pool].in_use--; if (pool == 0) { free((char *)buf); /* free nonpooled me...
false
false
false
true
false
1
wil_find_cid(struct wil6210_priv *wil, const u8 *mac) { int i; int rc = -ENOENT; for (i = 0; i < ARRAY_SIZE(wil->sta); i++) { if ((wil->sta[i].status != wil_sta_unused) && ether_addr_equal(wil->sta[i].addr, mac)) { rc = i; break; } } return rc; }
false
false
false
false
false
0
heim_sipc_service_unix(const char *service, heim_ipc_callback callback, void *user, heim_sipc *ctx) { struct sockaddr_un un; int fd, ret; un.sun_family = AF_UNIX; snprintf(un.sun_path, sizeof(un.sun_path), "/var/run/.heim_%s-socket", service); fd = socket(AF_UNIX, SOCK_STRE...
false
false
false
false
true
1
mwifiex_write_data_sync(struct mwifiex_adapter *adapter, u8 *buffer, u32 pkt_len, u32 port) { struct sdio_mmc_card *card = adapter->card; int ret; u8 blk_mode = (port & MWIFIEX_SDIO_BYTE_MODE_MASK) ? BYTE_MODE : BLOCK_MODE; u32 blk_size = (blk_mode == BLOCK_MODE) ? MWIFIEX_SDIO_BLOCK_SIZE : 1; u32 blk_cnt = ...
false
false
false
false
false
0
sdbm_fetch(DBM *db, datum key) { if G_UNLIKELY(db == NULL || bad(key)) { errno = EINVAL; return nullitem; } sdbm_check(db); if G_UNLIKELY(db->flags & DBM_BROKEN) { errno = ESTALE; return nullitem; } SDBM_WARN_ITERATING(db); if (getpage(db, exhash(key))) return getpair(db, db->pagbuf, key); ioerr(db, ...
false
false
false
false
false
0
move(const char *srcpath, const char *dstpath) { struct stat sb; if (copy(srcpath, dstpath) == -1) return -1; /* * Remove the source, but if the source file cannot be checked or is not * writable revert to the original state, i.e. remove the file copy. */ if (stat(srcpath, &sb) == -1 || !(sb...
false
false
false
false
false
0
parse_index(git_index *index, const char *buffer, size_t buffer_size) { unsigned int i; struct index_header header; git_oid checksum_calculated, checksum_expected; #define seek_forward(_increase) { \ if (_increase >= buffer_size) \ return git__throw(GIT_EOBJCORRUPTED, "Failed to seek forward. Buffer size exceede...
false
false
false
false
false
0
mpw_getstring(mpw_ptr num, int max_digits, gboolean scientific_notation, gboolean results_as_floats, gboolean mixed_fractions, /* GelOutputStyle */ int style, int integer_output_base, gboolean add_parenths) { mpw_uncomplex(num); if (MPW_IS_REAL (num)) { return mpwl_getstrin...
false
false
false
false
false
0