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_class_vars(zend_class_entry *ce, int statics, zval *return_value TSRMLS_DC) { HashPosition pos; zend_property_info *prop_info; zval *prop, *prop_copy; char *key; uint key_len; ulong num_index; zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos); while (zend_hash_get_current_data_ex(&ce->propert...
false
false
false
false
false
0
Transport_Delegate_CreateOwnerDelegation(TSS_HCONTEXT tspContext, /* in */ TSS_BOOL increment, /* in */ UINT32 publicInfoSize, /* in */ BYTE *publicInfo, /* in */ TPM_ENCAUTH *encDelAuth, /* in */ TPM_AUTH *ownerAuth, /* in, out */ UINT32 ...
false
false
false
false
false
0
iwl_pcie_apply_destination(struct iwl_trans *trans) { struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); const struct iwl_fw_dbg_dest_tlv *dest = trans->dbg_dest_tlv; int i; if (dest->version) IWL_ERR(trans, "DBG DEST version is %d - expect issues\n", dest->version); IWL_INFO(trans, "Ap...
false
false
false
false
false
0
I_cluster_signatures(struct Cluster *C) { int c, p, band1, band2; int n; double m1, m2; double p1, p2; double dn; /* fprintf (stderr, "c_sig: 1\n"); fprintf (stderr, " nclasses %d\n", C->nclasses); fprintf (stderr, " npoints %d\n", C->npoints ); fprintf (stderr, "...
false
false
false
false
false
0
anthy_feature_list_add(struct feature_list *fl, int f) { if (fl->nr < NR_EM_FEATURES) { fl->u.index[fl->nr] = f; fl->nr++; } }
false
false
false
false
false
0
rewriteUpdateSelect(const Expr& e) { Proof pf; switch(e.getOpKind()) { case RECORD_SELECT: { if(CHECK_PROOFS) CHECK_SOUND(e[0].getOpKind() == RECORD_UPDATE, "expected RECORD_UPDATE child" + e.toString()); if(withProof()) pf = newPf("rewrite_record_update_and_select", e); if(getField(e)...
false
false
false
false
false
0
adf_dev_in_use(struct adf_accel_dev *accel_dev) { return atomic_read(&accel_dev->ref_count) != 0; }
false
false
false
false
false
0
cache_rstr(FILE * fp, char *s) { INTsys i; char buff[256 + 4]; linput(fp, buff, 256); sscanf(buff, INTsysP, &i); if (i < 0 || i > 32768) /* error, something nasty happened */ i = 0; if (i > 0) { if ((int) fread(s, 1, i, fp) != i) { assertf(! "fread_cache_failed"); } } *(s + i) =...
true
true
false
false
true
1
zeagle_n2ition3_device_read (dc_device_t *abstract, unsigned int address, unsigned char data[], unsigned int size) { zeagle_n2ition3_device_t *device = (zeagle_n2ition3_device_t*) abstract; unsigned int nbytes = 0; while (nbytes < size) { // Calculate the package size. unsigned int len = size - nbytes; if (le...
true
true
false
false
false
1
luaK_patchlist (FuncState *fs, int list, int target) { if (target == fs->lasttarget) /* same target that list `jlt'? */ luaK_concat(fs, &fs->jlt, list); /* delay fixing */ else luaK_patchlistaux(fs, list, target, OP_END, 0); }
false
false
false
false
false
0
get_subaddr(struct snd_dice *dice, enum snd_dice_addr_type type, u64 offset) { switch (type) { case SND_DICE_ADDR_TYPE_TX: offset += dice->tx_offset; break; case SND_DICE_ADDR_TYPE_RX: offset += dice->rx_offset; break; case SND_DICE_ADDR_TYPE_SYNC: offset += dice->sync_offset; break; case SND_...
false
false
false
false
false
0
ReceiveSharedInvalidMessages( void (*invalFunction) (SharedInvalidationMessage *msg), void (*resetFunction) (void)) { #define MAXINVALMSGS 32 static SharedInvalidationMessage messages[MAXINVALMSGS]; /* * We use volatile here to prevent bugs if a compiler doesn't realize that * recursion is a possi...
false
false
false
false
false
0
determine_god(object *op) { int godnr = -1; const char *godname; /* spells */ if ((op->type == SPELL || op->type == SPELL_EFFECT) && op->title) { if (lookup_god_by_name(op->title) >= 0) return op->title; } if (op->type != PLAYER && QUERY_FLAG(op, FLAG_ALIVE)) { ...
false
false
false
true
false
1
uv__setsockopt_maybe_char(uv_udp_t* handle, int option, int val) { #if __sun char arg = val; #else int arg = val; #endif #if __sun if (val < 0 || val > 255) { uv__set_sys_error(handle->loop, EINVAL); return -1; } #endif if (setsockopt(handle->fd, IPPROTO_IP, option, &arg, sizeof(arg))) { uv__set...
false
false
false
false
false
0
on_notify_view_is_active (UnityWebappsGenContext *context, gint interest_id, gboolean view_is_active, gpointer user_data) { unity_webapps_context_notify_data *data; data = (unity_webapps_context_notify_data *)user_data; g_return_if_fail (data != NULL); g_return_if_fail (data->context != NULL); ...
false
false
false
false
false
0
gfs_l_gfork_closed_cb( gfork_child_handle_t handle, void * user_arg, pid_t from_pid) { gfs_l_memlimit_entry_t * entry; globus_mutex_lock(&g_mutex); { g_connection_count--; gfs_l_gfork_log( ...
false
false
false
false
false
0
output_c_string(FILE *out, const char *z){ unsigned int c; fputc('"', out); while( (c = *(z++))!=0 ){ if( c=='\\' ){ fputc(c, out); fputc(c, out); }else if( c=='"' ){ fputc('\\', out); fputc('"', out); }else if( c=='\t' ){ fputc('\\', out); fputc('t', out); }els...
false
false
false
false
false
0
copy_name(isc_mem_t *mctx, dns_message_t *msg, dns_name_t *name, dns_name_t **newnamep) { isc_result_t result; dns_name_t *newname = NULL; isc_region_t r; isc_buffer_t *namebuf = NULL, *rdatabuf = NULL; dns_rdatalist_t *rdatalist; dns_rdataset_t *rdataset, *newrdataset; dns_rdata_t rdata = DNS_RDATA_INIT, *ne...
false
false
false
false
false
0
MakePanel(wxWindow *parent) { DebuggerConfigurationPanel *panel = new DebuggerConfigurationPanel; if (!wxXmlResource::Get()->LoadPanel(panel, parent, wxT("dlgDebuggerOptions"))) return panel; XRCCTRL(*panel, "txtExecutablePath", wxTextCtrl)->ChangeValue(GetDebuggerExecutable(false)); panel->Val...
false
false
false
false
false
0
print_shadow_for_address(const void *addr) { int i; const void *shadow = kasan_mem_to_shadow(addr); const void *shadow_row; shadow_row = (void *)round_down((unsigned long)shadow, SHADOW_BYTES_PER_ROW) - SHADOW_ROWS_AROUND_ADDR * SHADOW_BYTES_PER_ROW; pr_err("Memory state around the buggy address:\n"); f...
true
true
false
false
true
1
drbd_may_do_local_read(struct drbd_device *device, sector_t sector, int size) { unsigned long sbnr, ebnr; sector_t esector, nr_sectors; if (device->state.disk == D_UP_TO_DATE) return true; if (device->state.disk != D_INCONSISTENT) return false; esector = sector + (size >> 9) - 1; nr_sectors = drbd_get_capaci...
false
false
false
false
false
0
mkRep(StochasticNode const *snode) { vector<Node const *> par = snode->parents(); return snode->clone(par); }
false
false
false
false
false
0
get_absolute_top_line_number() const { if (!mContinuousWrap) return mTopLineNum; if (maintaining_absolute_top_line_number()) return mAbsTopLineNum; return 0; }
false
false
false
false
false
0
f_inputlist(argvars, rettv) typval_T *argvars; typval_T *rettv; { listitem_T *li; int selected; int mouse_used; #ifdef NO_CONSOLE_INPUT /* While starting up, there is no place to enter text. */ if (no_console_input()) return; #endif if (argvars[0].v_type != VAR_LIST || argvars[0].vva...
false
false
false
false
false
0
g2_packet_steal_data_space(g2_packet_t *p, size_t bytes) { struct packet_data_store *pds; if(sizeof(p->pd.out) < bytes) goto must_malloc; p->data_trunk.data = p->pd.out; p->data_trunk.limit = p->data_trunk.capacity = sizeof(p->pd.out); p->data_trunk.pos = sizeof(p->pd.out) - bytes; p->data_trunk_is_freeabl...
false
false
false
false
false
0
bm_unlock( int handle ) { bitmap_entry *be; bitmap *bmp; if ( !bm_inited ) bm_init(); int bitmapnum = handle % MAX_BITMAPS; #ifndef NDEBUG if(bm_bitmaps[bitmapnum].handle != handle) { mprintf(("bm_unlock - %s: bm_bitmaps[%d].handle = %d, handle = %d\n", bm_bitmaps[bitmapnum].filename, bitmapnum, bm_bitmaps...
false
false
false
false
false
0
check(const QUrl &url) { LOG(tkTr(Trans::Constants::CHECKING_UPDATE_FROM_1).arg(url.toString())); d->getFile(url); }
false
false
false
false
false
0
x509_parse_authorityKeyIdentifier(chunk_t blob, int level0, chunk_t *authKeySerialNumber) { asn1_parser_t *parser; chunk_t object; int objectID; chunk_t authKeyIdentifier = chunk_empty; *authKeySerialNumber = chunk_empty; parser = asn1_parser_create(authKeyIdentifierObjects, blob); parser->set_top_...
false
false
false
false
false
0
iser_post_send(struct ib_conn *ib_conn, struct iser_tx_desc *tx_desc, bool signal) { struct ib_send_wr *bad_wr, *wr = iser_tx_next_wr(tx_desc); int ib_ret; ib_dma_sync_single_for_device(ib_conn->device->ib_device, tx_desc->dma_addr, ISER_HEADERS_LEN, DMA_TO_DEVICE); wr->next = NULL; wr->...
false
false
false
false
false
0
_get_vars_helper(Transaction *txn, void *var_hash_data) { GHashTable *var_hash = (GHashTable*)var_hash_data; GList *split_list; kvp_frame *kvpf; kvp_value *kvp_val; Split *s; char *str; gnc_commodity *first_cmdty = NULL; split_list = xaccTransGetSplitList(txn); if (split_list == NUL...
false
false
false
false
false
0
set_subqueryscan_references(PlannerInfo *root, SubqueryScan *plan, int rtoffset) { RelOptInfo *rel; Plan *result; /* Need to look up the subquery's RelOptInfo, since we need its subroot */ rel = find_base_rel(root, plan->scan.scanrelid); Assert(rel->subplan == plan->subplan); /* Recursively pro...
false
false
false
false
false
0
clish_pargv_dump(const clish_pargv_t *this) { unsigned i; lub_dump_printf("pargv(%p)\n",this); lub_dump_indent(); for(i =0; i < this->pargc; i++) { /* get the appropriate parameter definition */ clish_parg_dump(&this->pargs[i]); } lub_dump_undent(); }
false
false
false
false
false
0
createInstance(OfxImageEffectHandle effect) { // get a pointer to the effect properties OfxPropertySetHandle effectProps; gEffectHost->getPropertySet(effect, &effectProps); // get a pointer to the effect's parameter set OfxParamSetHandle paramSet; gEffectHost->getParamSet(effect, &paramSet); // make my ...
false
false
false
false
false
0
WaypointReached(uint32 i) override { switch (i) { // First Ambush(3 Yetis) case 11: DoScriptText(SAY_OOX_AMBUSH, m_creature); m_creature->SummonCreature(NPC_YETI, -4841.01f, 1593.91f, 73.42f, 3.98f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); ...
false
false
false
false
false
0
ax88179_set_mac_addr(struct net_device *net, void *p) { struct usbnet *dev = netdev_priv(net); struct sockaddr *addr = p; int ret; if (netif_running(net)) return -EBUSY; if (!is_valid_ether_addr(addr->sa_data)) return -EADDRNOTAVAIL; memcpy(net->dev_addr, addr->sa_data, ETH_ALEN); /* Set the MAC address *...
false
false
false
false
false
0
timezone_repr(PyDateTime_TimeZone *self) { /* Note that although timezone is not subclassable, it is convenient to use Py_TYPE(self)->tp_name here. */ const char *type_name = Py_TYPE(self)->tp_name; if (((PyObject *)self) == PyDateTime_TimeZone_UTC) return PyUnicode_FromFormat("%s.utc", type...
false
false
false
false
false
0
domain_detach_iommu(struct dmar_domain *domain, struct intel_iommu *iommu) { int num, count = INT_MAX; assert_spin_locked(&device_domain_lock); assert_spin_locked(&iommu->lock); domain->iommu_refcnt[iommu->seq_id] -= 1; count = --domain->iommu_count; if (domain->iommu_refcnt[iommu->seq_id] == 0) { n...
false
false
false
false
false
0
pine_imap_envelope(MAILSTREAM *stream, long unsigned int rawno, ENVELOPE *env) { MESSAGECACHE *mc; dprint((7, "imap_env(%ld)\n", rawno)); if(stream && !sp_mail_box_changed(stream) && stream == ps_global->mail_stream && rawno > 0L && rawno <= stream->nmsgs && (mc = mail_elt(stream,rawno...
false
false
false
false
false
0
_kdc_fast_mk_response(krb5_context context, krb5_crypto armor_crypto, METHOD_DATA *pa_data, krb5_keyblock *strengthen_key, KrbFastFinished *finished, krb5uint32 nonce, krb5_data *data) { PA_FX_FAST_REPLY fxfastrep; KrbFastResponse fastrep; krb5_error_code ret;...
false
false
false
false
false
0
print_makervalue(struct ifd_entry *entry_ptr,int make,int model,char *prefix) { if(entry_ptr) { switch(make) { case MAKER_AGFA: print_agfa_makervalue(entry_ptr,make,model,PREFIX); break; case MAKER_ASAHI: /* Asahi is Pentax ...
false
false
false
false
false
0
samenumspstate(AjPPhyloState state, long *chars, long ith) { /* check if spp is same as the first set in other data sets */ if (state->Size != spp) { ajErr("\nERROR: Inconsistent number of species in data set %ld", ith); exxit(-1); } *chars = state->Len; }
false
false
false
false
false
0
udl_crtc_write_mode_to_hw(struct drm_crtc *crtc) { struct drm_device *dev = crtc->dev; struct udl_device *udl = dev->dev_private; struct urb *urb; char *buf; int retval; urb = udl_get_urb(dev); if (!urb) return -ENOMEM; buf = (char *)urb->transfer_buffer; memcpy(buf, udl->mode_buf, udl->mode_buf_len); re...
false
false
false
false
false
0
GDmm2ll_cea(int32 projcode,int32 zonecode, int32 spherecode, float64 projparm[], int32 xdimsize, int32 ydimsize, float64 upleftpt[], float64 lowrightpt[], int32 npnts, float64 x[], float64 y[], float64 longitude[], float64 latitude[]) { intn status = 0; /* routine return status variable *...
false
false
false
false
false
0
color_scale_pre_remove (GogObject *parent, GogObject *scale) { /* Unlink the color scale */ GSList const *l = gog_axis_contributors (gog_color_scale_get_axis (GOG_COLOR_SCALE (scale))); gog_color_scale_set_axis (GOG_COLOR_SCALE (scale), NULL); for (; l; l = l->next) gog_object_request_update (GOG_OBJECT (l->data)...
false
false
false
false
false
0
getZ() { return (ends[0].z < ends[1].z ? ends[0].z : ends[1].z)+(abs(ends[0].z-ends[1].z)/2.0); }
false
false
false
false
false
0
utf16_to_unicode(uint32_t *pwc, const char *s, size_t n, int be) { const char *utf16 = s; unsigned uc; if (n == 0) return (0); if (n == 1) { /* set the Replacement Character instead. */ *pwc = UNICODE_R_CHAR; return (-1); } if (be) uc = archive_be16dec(utf16); else uc = archive_le16dec(utf16); utf...
false
false
false
false
false
0
fits_get_col_minmax(fitsfile *fptr, int colnum, float *datamin, float *datamax, int *status) /* Simple utility routine to compute the min and max value in a column */ { int anynul; long nrows, ntodo, firstrow, ii; float array[1000], nulval; ffgky(fptr, TLONG, "NAXIS2", &nrows,...
false
false
false
false
false
0
_cirrus_get_lfb_address(void) { unsigned long value; /* read PCI10 display memory base address */ value = _cirrus_pci_read_cirrus(0x10); if ((value & 0xfe000000) == 0xfe000000 || (value & 0xfe000000) == 0x00000000) { #ifdef CIRRUS_WARNINGS dprintf("WARNING: Ci...
false
false
false
false
false
0
connection_or_send_authenticate_cell(or_connection_t *conn, int authtype) { var_cell_t *cell; crypto_pk_t *pk = tor_tls_get_my_client_auth_key(); int authlen; size_t cell_maxlen; /* XXXX make sure we're actually supposed to send this! */ if (!pk) { log_warn(LD_BUG, "Can't compute authenticate cell: no ...
false
false
false
false
false
0
watch_handle_write(watch_t *w) { int (*handler)(int, int, const char *, void *) = w->handler; int res = -1; int len = (w && w->buf) ? w->buf->len : 0; if (!w || w->removed == -1) return -1; /* watch is running in another thread / context */ if (w->transfer_limit == -1) return 0; /* transfer limit turned on, don't...
false
false
false
false
false
0
gcm_add_header(gcm* g,char *header,int len) { /* Add some header. Won't be encrypted, but will be authenticated. len is length of header */ int i,j=0; if (g->status!=GCM_ACCEPTING_HEADER) return FALSE; while (j<len) { for (i=0;i<16 && j<len;i++) { g->stateX[i]^=header[j++]; g->lenA[1]++; if (g->lenA[1]==...
false
false
false
false
false
0
per_scan_setup (j_decompress_ptr cinfo) /* Do computations that are needed before processing a JPEG scan */ /* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */ { int ci, mcublks, tmp; jpeg_component_info *compptr; if (cinfo->comps_in_scan == 1) { /* Noninterleaved (single-co...
false
false
false
false
false
0
handleDynamicAllocaCall(AllocaInst *AI) { IRBuilder<> IRB(AI); const unsigned Align = std::max(kAllocaRzSize, AI->getAlignment()); const uint64_t AllocaRedzoneMask = kAllocaRzSize - 1; Value *Zero = Constant::getNullValue(IntptrTy); Value *AllocaRzSize = ConstantInt::get(IntptrTy, kAllocaRzSize); Value *A...
false
false
false
false
false
0
drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_mode_obj_get_properties *arg = data; struct drm_mode_object *obj; int ret = 0; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -EINVAL; drm_modeset_lock_all(dev); obj = drm_mode_o...
false
false
false
false
false
0
SetImageColorCallBack(void *mutable_data, /* User provided mutable data */ const void *immutable_data, /* User provided immutable data */ Image *image, /* Modify image */ PixelPacket *pixels, /* Pixel row */ ...
false
false
false
false
false
0
write_chain_(FLAC::Metadata::Chain &chain, bool use_padding, bool preserve_file_stats, bool filename_based, const char *filename) { if(filename_based) return chain.write(use_padding, preserve_file_stats); else { ::FLAC__IOCallbacks callbacks; memset(&callbacks, 0, sizeof(callbacks)); callbacks.read = (::FLAC...
false
false
false
false
false
0
csio_rns_offline(struct csio_rnode *rn, enum csio_rn_ev evt) { struct csio_lnode *ln = csio_rnode_to_lnode(rn); int ret = 0; CSIO_INC_STATS(rn, n_evt_sm[evt]); switch (evt) { case CSIO_RNFE_LOGGED_IN: case CSIO_RNFE_PLOGI_RECV: ret = csio_rn_verify_rparams(ln, rn, rn->rdev_entry); if (!ret) { csio_set_st...
false
false
false
false
false
0
ensure_dirfile_exists (char *dirfile) { int desc; if (chicken_flag) return; desc = open (dirfile, O_RDONLY); if (desc < 0 && errno == ENOENT) { FILE *f; char *readerr = strerror (errno); close (desc); f = fopen (dirfile, "w"); if (f) { fprintf (f, ...
false
false
false
false
false
0
workqueue_set_max_active(struct workqueue_struct *wq, int max_active) { struct pool_workqueue *pwq; /* disallow meddling with max_active for ordered workqueues */ if (WARN_ON(wq->flags & __WQ_ORDERED_EXPLICIT)) return; max_active = wq_clamp_max_active(max_active, wq->flags, wq->name); mutex_lock(&wq->mutex); ...
false
false
false
false
false
0
checkExistsWithValue(DcmItem *dataset, const DcmTagKey &key, const char *filename) { /* first, check whether tag exists, and report an error if not */ OFBool result = checkExists(dataset, key, filename); if (result...
false
false
false
false
false
0
isCrwType(BasicIo& iIo, bool advance) { bool result = true; byte tmpBuf[14]; iIo.read(tmpBuf, 14); if (iIo.error() || iIo.eof()) { return false; } if (!( ('I' == tmpBuf[0] && 'I' == tmpBuf[1]) || ('M' == tmpBuf[0] && 'M' == tmpBuf[1]))) { ...
false
false
false
false
false
0
make_kill_quadruple(Quadruple *qr_head) { Quadruple *qpt; qpt = qr_head; while(qpt != NULL){ if(qpt->ope != OPE_WRITE && qpt->op[0] != NULL) make_kill_operand(qpt, qpt->op[0]); qpt = qpt->next; } }
false
false
false
false
false
0
add_std_star(struct vs_recipy *vs, double x, double y, double mag) { if (vs->cnt >= vs->max_cnt) return -1; vs->s[vs->cnt].x = x; vs->s[vs->cnt].y = y; vs->s[vs->cnt].aph.stdmag = mag; vs->s[vs->cnt].aph.flags |= AP_STD_STAR; vs->cnt ++; return (vs->cnt) - 1; }
false
false
false
false
false
0
NewSymMatrix(symmatrix_t **symmat, int nrows, int ncols) { int i; /* aux */ assert(nrows>0 && ncols>0 && ncols>=nrows); assert(ncols>0 && ncols>=nrows); (*symmat) = (symmatrix_t *) malloc(1*sizeof(symmatrix_t)); if (NULL == (*symmat)) { fprintf(stderr, "Couldn't allocate memory (%s|%s)...
false
true
false
false
true
1
HFASetGDALMetadata( HFAHandle hHFA, int nBand, char **papszMD ) { if( papszMD == NULL ) return CE_None; HFAEntry *poNode; if( nBand > 0 && nBand <= hHFA->nBands ) poNode = hHFA->papoBand[nBand - 1]->poNode; else if( nBand == 0 ) poNode = hHFA->poRoot; else return ...
false
false
false
false
false
0
synthesize_exception_spec (tree type, tree (*extractor) (tree, void*), void *client) { tree raises = empty_except_spec; tree fields = TYPE_FIELDS (type); int i, n_bases = CLASSTYPE_N_BASECLASSES (type); tree binfos = TYPE_BINFO_BASETYPES (type); for (i = 0; i != n_bases; i++) {...
false
false
false
false
true
1
FcParseInt (FcConfigParse *parse) { FcChar8 *s, *end; int l; if (!parse->pstack) return; s = FcStrBufDoneStatic (&parse->pstack->str); if (!s) { FcConfigMessage (parse, FcSevereError, "out of memory"); return; } end = 0; l = (int) strtol ((char *) s, (char **)&end, 0); if...
false
false
false
false
false
0
readDWord(Uint32& result) { int c1, c2, c3, c4; c1 = bmpFile.fgetc(); if (c1 == EOF) return EOF; c2 = bmpFile.fgetc(); if (c2 == EOF) return EOF; c3 = bmpFile.fgetc(); if (c3 == EOF) return EOF; c4 = bmpFile.fgetc(); if (c4 == EOF) return EOF; result = (OFstatic_cast(Uint32, c4) << 2...
false
false
false
false
false
0
sge_worker_terminate(sge_gdi_ctx_class_t *ctx) { bool do_final_spooling; DENTER(TOP_LAYER, "sge_worker_terminate"); sge_tq_wakeup_waiting(Master_Task_Queue); /* * trigger pthread_cancel for each thread so that further * shutdown process will be faster */ { cl_thread_list_elem_t *thr...
false
false
false
false
false
0
setup_bsnp_file(const blt_options& opt, const prog_info& pinfo, const char* const cmdline, std::auto_ptr<std::ostream>& apo, const std::string& filename, const char* label, const bool is_include_seq_name, con...
false
false
false
false
false
0
shield_starvation(const struct cityresult *result) { /* Avoid resource starvation. */ return (result->city_center.tdc->shield + (result->best_other.tdc ? result->best_other.tdc->shield : 0) == 0); }
false
false
false
false
false
0
fvwm_send(int s, const void *buf, size_t len, int flags) { int rc; size_t offset; const char *data; data = buf; offset = 0; do { rc = send(s, (char *)data + offset, len - offset, flags); if (rc > 0) { offset += rc; } } while ((rc > 0 && (offset < len)) || (rc == -1 && errno == EINTR)); return rc; ...
false
false
false
false
false
0
composeCct (pC, name, pt) pCircuit pC; char *name; pNode pt; { long i; short index; pElemTH pEl; pEl = (pC->pTO)->pElem; /* pointeur courant de la table pTI */ index = searchInputCct (pC, name); if (index == EMPTYTH) { printf ("bdd1-composeCct : la variable a expanser n'est pas une...
false
false
false
false
false
0
ppc32_exec_RLWINM(cpu_ppc_t *cpu,ppc_insn_t insn) { int rs = bits(insn,21,25); int ra = bits(insn,16,20); int sh = bits(insn,11,15); int mb = bits(insn,6,10); int me = bits(insn,1,5); register m_uint32_t r,mask; r = (cpu->gpr[rs] << sh) | (cpu->gpr[rs] >> (32 - sh)); mask = ppc32_rotate_mask...
false
false
false
false
false
0
fiji_send_msg_to_smc_with_parameter(struct pp_smumgr *smumgr, uint16_t msg, uint32_t parameter) { if (!fiji_is_smc_ram_running(smumgr)) return -1; if (1 != SMUM_READ_FIELD(smumgr->device, SMC_RESP_0, SMC_RESP)) { printk(KERN_ERR "Failed to send Previous Message."); SMUM_WAIT_FIELD_UNEQUAL(smumgr, SMC_RESP_0,...
false
false
false
false
false
0
rehash(Array *tp) /* rehash items in small table into big one */ { int i, nh, nsz; Cell *cp, *op, **np; nsz = GROWTAB * tp->size; np = (Cell **) calloc(nsz, sizeof(Cell *)); if (np == NULL) /* can't do it, but can keep running. */ return; /* someone else will run out later. */ for (i = 0; i < tp->size; i++) ...
false
false
false
false
false
0
findNSet(string setName, int member) { for (map<int, pair<string, int> >::const_iterator i = initializedSets.begin(); i != initializedSets.end(); ++i) { int iSet = i->first; string iName = i->second.first; int iMember = i->second.second; if (iName == setName && iMember == member) ret...
false
false
false
false
false
0
XTR_Exponentiate(const GFP2Element &b, const Integer &e, const Integer &p) { unsigned int bitCount = e.BitCount(); if (bitCount == 0) return GFP2Element(-3, -3); // find the lowest bit of e that is 1 unsigned int lowest1bit; for (lowest1bit=0; e.GetBit(lowest1bit) == 0; lowest1bit++) {} GFP2_ONB<MontgomeryRep...
false
false
false
false
false
0
dvb_id_bus_schedule_proxy_GetAllEventInfos (DVBIDBusSchedule* self, int* result_length1, GError** error) { GDBusMessage *_message; GVariant *_arguments; GVariantBuilder _arguments_builder; GDBusMessage *_reply_message; GVariant *_reply; GVariantIter _reply_iter; DVBEventInfo* _result; int _result_length1; GVar...
false
false
false
false
false
0
_gfxop_grab_pixmap(gfx_state_t *state, gfx_pixmap_t **pxmp, int x, int y, int xl, int yl, int priority, rect_t *zone) /* Returns 1 if the resulting data size was zero, GFX_OK or an error code otherwise */ { int xfact = state->driver->mode->xfact; int yfact = state->driver->mode->yfact; int unscaled_xl = (x...
false
false
false
false
false
0
max_queue_store(struct device_driver *ddp, const char *buf, size_t count) { unsigned long iflags; int n, k; if ((count > 0) && (1 == sscanf(buf, "%d", &n)) && (n > 0) && (n <= SCSI_DEBUG_CANQUEUE)) { spin_lock_irqsave(&queued_arr_lock, iflags); k = find_last_bit(queued_in_use_bm, SCSI_DEBUG_CANQU...
false
false
false
false
false
0
fcntl_flock(PyObject *self, PyObject *args) { int fd; int code; int ret; if (!PyArg_ParseTuple(args, "O&i:flock", conv_descriptor, &fd, &code)) return NULL; #ifdef HAVE_FLOCK Py_BEGIN_ALLOW_THREADS ret = flock(fd, code); Py_END_ALLOW_THREADS #else #ifndef...
false
false
false
false
false
0
garray_setsaveit(t_garray *x, int saveit) { if (x->x_saveit && !saveit) post("warning: array %s: clearing save-in-patch flag", x->x_name->s_name); x->x_saveit = saveit; }
false
false
false
false
false
0
__ecereProp_ProjectNode_IsSet_configurations(struct ProjectNode * this) { if(!this->parent) return 0x1; if(this->configurations) { { struct __ecereNameSpace__ecere__com__Iterator c = { this->configurations, 0 }; while(__ecereMethod___ecereNameSpace__ecere__com__Iterator_Next(&c)) { unsigned int somethingSet = __ecere...
false
false
false
false
false
0
find_rc(VOID) { FILE *fp; char *fname; char *homedir=getenv("HOME"); /* Allocate enough space to hold rc file name. Now you see why so many apps have buffer-overrun bugs. */ if( (fname = (char *)malloc(MAX(sizeof(UNIX_RC_FILE),sizeof(NONUNIX_RC_FILE)) + (homedir!=NULL?strlen(homedir): #i...
false
false
false
false
false
0
play_cb (GtkWidget* widget, gpointer data) { GtkTreeIter iter; if (gtk_tree_selection_get_selected (sel, NULL, &iter)) { play_item_t *item = peek_play_item (&iter); if (item) playlist_play (playlist_add (play_item_copy (item), -1)); } }
false
false
false
false
false
0
rewrite(rview kc_current_view_base) { if (is_nil()) { return this; } else { // not Nil, Cons patternchain l_patternchain_1 = patternchain_1->rewrite(kc_current_view_base); patternchains l_patternchains_1 = patternchains_1->rewrite(kc_current_view_base); switch(kc_current_view_base) { default:...
false
false
false
false
false
0
progress_callback(ext2_filsys fs, ext2_inode_scan scan EXT2FS_ATTR((unused)), dgrp_t group, void * priv_data) { ext2_resize_t rfs = (ext2_resize_t) priv_data; errcode_t retval; /* * This check is to protect against old ext2 libraries. It * shouldn't be needed against new libraries. */ if ((gr...
false
false
false
false
false
0
hud_config_render_description() { int w,h,sx,sy; if ( HC_gauge_selected >= 0 ) { gr_set_color_fast(&Color_normal); gr_get_string_size(&w, &h, HC_gauge_descriptions(HC_gauge_selected)); sx = fl2i(HC_gauge_description_coords[gr_screen.res][0] + (HC_gauge_description_coords[gr_screen.res][2] - w)/2.0f); sy = H...
false
false
false
false
false
0
baseUrl() const { if (d->native) return selectedUrl().isEmpty() ? KUrl() : KUrl::fromPath(selectedUrl().path()); return d->w->baseUrl(); }
false
false
false
false
false
0
InitModule() { SpinLockHolder h(Static::pageheap_lock()); if (!phinited) { Static::InitStaticVars(); threadcache_allocator.Init(); phinited = 1; } }
false
false
false
false
false
0
ignoresig(int signo) { if (sigmode[signo - 1] != S_IGN && sigmode[signo - 1] != S_HARD_IGN) { signal(signo, SIG_IGN); } sigmode[signo - 1] = S_HARD_IGN; }
false
false
false
false
false
0
usage(int status, const char *program_name) { if (status != 0) { fprintf(stderr, "Wrong input parameters," " try %s -h' for more information.\n", program_name); } else { fprintf(stdout, "Usage: %s [-h] [[-g] <controllers>:<path>] "\ "[...]\n", program_name); fprintf(stdout, " -g <controllers>:<path> ...
false
false
false
false
false
0
svc_getreq_poll (struct pollfd *pfdp, int pollretval) { if (pollretval == 0) return; register int fds_found; for (int i = fds_found = 0; i < svc_max_pollfd; ++i) { register struct pollfd *p = &pfdp[i]; if (p->fd != -1 && p->revents) { /* fd has input waiting */ if (p->revents & POLLNV...
false
false
false
false
false
0
dht_parse_decommissioned_bricks (xlator_t *this, dht_conf_t *conf, const char *bricks) { int i = 0; int ret = -1; char *tmpstr = NULL; char *dup_brick = NULL; char *node = NULL; if (!conf || !bricks) ...
false
false
false
false
false
0
findUsedBy(const ContainedPtr& contained) const { ContainedList usedBy; for(map<string, ContainedList>::const_iterator p = _contentMap.begin(); p != _contentMap.end(); ++p) { for(ContainedList::const_iterator q = p->second.begin(); q != p->second.end(); ++q) { if((*q)->uses(conta...
false
false
false
false
false
0
start_frigate_anim() { GdkPixbuf *pixmap; int w; if(!with_frigate) return; if (frigate_item) stop_frigate_anim(); // the antisubmarine warfare frigate pixmap = gc_pixmap_load("submarine/asw_frigate.png"); w = gdk_pixbuf_get_width(pixmap); frigate_item = goo_canvas_image_new (goo_canvas_get_r...
false
false
false
false
false
0
e_focus_event_mouse_in(E_Border *bd) { if ((e_config->focus_policy == E_FOCUS_MOUSE) || (e_config->focus_policy == E_FOCUS_SLOPPY)) { e_border_focus_set(bd, 1, 1); } if (bd->raise_timer) ecore_timer_del(bd->raise_timer); bd->raise_timer = NULL; if (e_config->use_auto_raise) { ...
false
false
false
false
false
0
init_text_display(void) { size_t nchars; struct vesa_char *ptr; struct vesa_char def_char = { .ch = ' ', .attr = 0, }; if (__vesacon_text_display) free(__vesacon_text_display); __vesacon_text_cols = TEXT_PIXEL_COLS / FONT_WIDTH; __vesacon_text_rows = TEXT_PIXEL_ROWS / __vesacon_font_hei...
false
false
false
false
false
0
ext4_mb_scan_aligned(struct ext4_allocation_context *ac, struct ext4_buddy *e4b) { struct super_block *sb = ac->ac_sb; struct ext4_sb_info *sbi = EXT4_SB(sb); void *bitmap = e4b->bd_bitmap; struct ext4_free_extent ex; ext4_fsblk_t first_group_block; ext4_fsblk_t a; ext4_grpblk_t i; int max; BUG_ON(sbi->s...
false
false
false
false
false
0