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
text_dup(const char *text) { char *text_new; size_t size; size = text_len(text) + 1; text_new = malloc(size); if (text_new == NULL) { return NULL; } text_copy(text_new, text); return text_new; }
false
false
false
false
false
0
__ecereNameSpace__ecere__gfx__bitmaps__JPEG_EmptyOutputBuffer(j_compress_ptr cinfo) { DestinationManager * dest = (DestinationManager *)(*cinfo).dest; if(((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({ struct __ecereNameSpace__ecere__co...
false
false
false
false
false
0
htable_values_set(struct hash *h, const void **values) { htable_t *ht = HASH_TABLE(h); g_assert(values != NULL); htable_check(ht); ht->values = values; }
false
false
false
false
false
0
mixh10h11h12(cmph_uint32 b, double p1, double p2, cmph_uint32 initial_index) { register cmph_uint32 int_p2 = (cmph_uint32)p2; if (initial_index < p1) initial_index %= int_p2; /* h11 o h10 */ else { /* h12 o h10 */ initial_index %= b; if(initial_index < p2) initial_index += int_p2; } return initial_index; }
false
false
false
false
false
0
getBaseName() const { // lazy init UErrorCode status = U_ZERO_ERROR; // semantically const if(baseName == 0) { ((Locale *)this)->baseName = ((Locale *)this)->baseNameBuffer; int32_t baseNameSize = uloc_getBaseName(fullName, baseName, ULOC_FULLNAME_CAPACITY, &status); if(baseNameS...
false
false
false
false
false
0
cType (Type t) { return (t->nature() == kInt) ? "int" : "float"; }
false
false
false
false
false
0
test_repo_head__orphan_branch_does_not_count(void) { git_signature *sig; git_oid id; const char *msg; cl_git_pass(git_signature_now(&sig, "me", "foo@example.com")); /* Have something known */ msg = "message1"; git_oid_fromstr(&id, "e90810b8df3e80c413d903f631643c716887138d"); cl_git_pass(git_repository_set_hea...
false
false
false
false
false
0
K051649_update(int ch, INT16 *buffer, int length) { k051649_sound_channel *voice=channel_list; short *mix; int i,v,f,j,k; /* zap the contents of the mixer buffer */ memset(mixer_buffer, 0, length * sizeof(short)); for (j=0; j<5; j++) { v=voice[j].volume; f=voice[j].frequency; k=voice[j].key; ...
false
false
false
false
false
0
adjust_varargs (lua_State *L, Proto *p, int actual) { int i; int nfixargs = p->numparams; Table *htab = NULL; StkId base, fixed; for (; actual < nfixargs; ++actual) setnilvalue(L->top++); #if defined(LUA_COMPAT_VARARG) if (p->is_vararg & VARARG_NEEDSARG) { /* compat. with old-style vararg? */ int nv...
false
false
false
false
false
0
gst_avdtp_sink_finalize(GObject *object) { GstAvdtpSink *self = GST_AVDTP_SINK(object); if (self->data) gst_avdtp_sink_stop(GST_BASE_SINK(self)); if (self->device) g_free(self->device); if (self->transport) g_free(self->transport); g_mutex_free(self->sink_lock); G_OBJECT_CLASS(parent_class)->finalize(o...
false
false
false
false
false
0
qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter) { struct qlcnic_recv_context *recv_ctx; struct qlcnic_host_rds_ring *rds_ring; struct qlcnic_host_sds_ring *sds_ring; struct qlcnic_rx_buffer *rx_buf; int ring, i; recv_ctx = adapter->recv_ctx; rds_ring = kcalloc(adapter->max_rds_rings, sizeof(str...
false
false
false
false
false
0
soup_session_send_queue_item (SoupSession *session, SoupMessageQueueItem *item, SoupMessageCompletionFn completion_cb) { SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session); const char *conn_header; if (priv->user_agent) { soup_message_headers_replace (item->msg->request_headers, ...
false
false
false
false
false
0
bcp_columns(DBPROCESS * dbproc, int host_colcount) { int i; tdsdump_log(TDS_DBG_FUNC, "bcp_columns(%p, %d)\n", dbproc, host_colcount); CHECK_DBPROC(); DBPERROR_RETURN(IS_TDSDEAD(dbproc->tds_socket), SYBEDDNE); CHECK_PARAMETER(dbproc->bcpinfo, SYBEBCPI, FAIL); CHECK_PARAMETER(dbproc->hostfileinfo, SYBEBIVI, FAIL)...
false
false
false
false
false
0
apply_match(match *m) { if(id == m->root->id) { if(parent == NULL && m->get_param(999999) != NULL) { term *r = m->get_rule()->reactum->instantiate(m); if(r->type != TPAR) return r; parallel *rp = (parallel *) r; term *ht = m->get_param(999999)->instantiate(NULL); if(ht->type == TNIL) return rp; ...
false
false
false
false
false
0
sortScores(vector<float>* scores, int f, int l) { int i,last; if(f >= l) return; swap(scores, f, (f + l) / 2); last = f; for(i = f + 1; i <= l; i++) { if((*scores)[i] > (*scores)[f]) { swap(scores, ++last, i); } } swap(scores, f, last); ...
false
false
false
false
false
0
initializeFrameLowering(StringRef CPU, StringRef FS) { ARMSubtarget &STI = initializeSubtargetDependencies(CPU, FS); if (STI.isThumb1Only()) return (ARMFrameLowering *)new Thumb1FrameLowering(STI); return new ARMFrameLowering(STI); }
false
false
false
false
false
0
ldns_dnssec_trust_tree_contains_keys(ldns_dnssec_trust_tree *tree, ldns_rr_list *trusted_keys) { size_t i; ldns_status result = LDNS_STATUS_CRYPTO_NO_DNSKEY; bool equal; ldns_status parent_result; if (tree && trusted_keys && ldns_rr_list_rr_count(trusted_keys) > 0) { if (tree->rr) { for (i = 0; i ...
false
false
false
false
false
0
snd_pcm_xrun_injection_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_pcm_substream *substream = entry->private_data; struct snd_pcm_runtime *runtime; snd_pcm_stream_lock_irq(substream); runtime = substream->runtime; if (runtime && runtime->status->state == SNDRV_PCM_STATE_...
false
false
false
false
false
0
print (void) const { ACE_TRACE ("ACE_Parse_Node::print"); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("svc = %s\n"), this->name ())); if (this->next_) this->next_->print (); }
false
false
false
false
false
0
add_sensor_monitor(Sensor *sr, GkrellmPanel **p, GList **smon_list) { SensorMon *smon; gfloat t; gchar units; gboolean set_loc = FALSE; sr->smon = NULL; if (!sr->enabled) return; if (sr->location != SENSOR_PANEL_LOCATION) { if (sr->group == SENSOR_GROUP_MAINBOARD) { if (sr->location == PROC_...
false
false
false
false
false
0
emitLOAD(const Instruction *i) { int32_t offset = SDATA(i->src(0)).offset; switch (i->src(0).getFile()) { case FILE_MEMORY_GLOBAL: code[1] = 0xc0000000; code[0] = 0x00000000; break; case FILE_MEMORY_LOCAL: code[1] = 0x7a000000; code[0] = 0x00000002; break; case FILE_MEMORY_SHARED: code[1] = 0x7ac00000;...
false
false
false
false
false
0
read_in_old_ascii (struct cpio_file_stat *file_hdr, int in_des) { struct old_ascii_header ascii_header; unsigned long dev; tape_buffered_read (ascii_header.c_dev, in_des, sizeof ascii_header - sizeof ascii_header.c_magic); dev = FROM_OCTAL (ascii_header.c_dev); file_hdr->c_dev_maj = major (dev); fi...
false
false
false
false
false
0
T1_MirrorVMatrix( T1_TMATRIX *matrix) { if (matrix==NULL){ if ((matrix=(T1_TMATRIX *)malloc( sizeof(T1_TMATRIX)))==NULL){ T1_errno=T1ERR_ALLOC_MEM; return( NULL); } matrix->cxx=1.0; matrix->cyx=0.0; matrix->cxy=0.0; matrix->cyy=1.0; } matrix->cxy *=-1.0; matrix->cyy *=-1.0...
false
false
false
false
false
0
mv88e6xxx_phy_page_write(struct dsa_switch *ds, int port, int page, int reg, int val) { struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); int ret; mutex_lock(&ps->smi_mutex); ret = _mv88e6xxx_phy_write_indirect(ds, port, 0x16, page); if (ret < 0) goto error; ret = _mv88e6xxx_phy_write_indirect(ds, por...
false
false
false
false
false
0
get_author(const char *name) { static const char **authors; static size_t authors_size; int from = 0, to = authors_size - 1; while (from <= to) { size_t pos = (to + from) / 2; int cmp = strcmp(name, authors[pos]); if (!cmp) return authors[pos]; if (cmp < 0) to = pos - 1; else from = pos + 1; ...
false
false
false
false
true
1
CreatePhotonMapSurfaceIntegrator(const ParamSet &params) { int nCaustic = params.FindOneInt("causticphotons", 20000); int nIndirect = params.FindOneInt("indirectphotons", 100000); int nUsed = params.FindOneInt("nused", 50); if (PbrtOptions.quickRender) nCaustic = nCaustic / 10; if (PbrtOptions.quick...
false
false
false
false
false
0
globus_l_error_protocol_violated_copy (void *srcvp, void **dstvpp) { globus_error_protocol_violated_instance_t *src, *dst; if (srcvp==NULL || dstvpp==NULL) return; src = ((globus_error_protocol_violated_instance_t *) srcvp); (*dstvpp) = globus_malloc (sizeof(globus_error_protocol_violated_instance_t)); dst = ...
false
false
false
false
false
0
putLenString(const byte *string, int len, const char *desc) { byte bLen; if (len < 0xfe) { bLen = len; mStream->writex(&bLen, 1); } else if (len <= 0xffff) { byte neta[2]; createForeignInt(neta, len, 2, big_endian); bLen = 0xfe; mStream->writex(&bLen, 1); mStream->writex(neta, 2); } else { byte neta...
false
false
false
false
false
0
hasAttribute(const DOMString& attrName) { NodePtr node = attributes.getNamedItem(attrName); if (!node || node->getNodeType() != ATTRIBUTE_NODE) return false; return true; }
false
false
false
false
false
0
add(Uni32 chr) { Uni32 p = chr & mask; data[p]++; if (data[p] > max) max = data[p]; }
false
false
false
false
false
0
wentry_free(db_word_entry *wentry) { if (!wentry) return; free(wentry->word); if (wentry->freq) { EXT_ARRAY_FREE((*wentry->freq),long int); free(wentry->freq); } free(wentry); }
true
true
false
false
true
1
tree_ssa_lim_initialize (void) { sbitmap contains_call = sbitmap_alloc (last_basic_block); gimple_stmt_iterator bsi; struct loop *loop; basic_block bb; sbitmap_zero (contains_call); FOR_EACH_BB (bb) { for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi)) { if (nonpure_call_p (gsi_s...
false
false
false
false
false
0
session_destroy_fn(void *obj) { struct ast_websocket *session = obj; if (session->f) { fclose(session->f); ast_verb(2, "WebSocket connection from '%s' closed\n", ast_sockaddr_stringify(&session->address)); } ast_free(session->payload); }
true
true
false
false
false
1
fops_write(struct file *file, const char __user *data, size_t count, loff_t *ppos) { struct video_device *vdev = video_devdata(file); struct saa7146_fh *fh = file->private_data; int ret; switch (vdev->vfl_type) { case VFL_TYPE_GRABBER: return -EINVAL; case VFL_TYPE_VBI: if (fh->dev->ext_vv_data->vbi_fops.wri...
false
false
false
false
false
0
ina209_reset_history(struct device *dev, struct device_attribute *da, const char *buf, size_t count) { struct sensor_device_attribute *attr = to_sensor_dev_attr(da); struct ina209_data *data = dev_get_drvdata(dev); struct i2c_client *client = data->client; u32 mask = attr->index; long val; ...
false
false
false
false
false
0
read16() { int c1, c2; if ((c1 = iSource.getChar()) == EOF) return EOF; if ((c2 = iSource.getChar()) == EOF) return EOF; return (c1 << 8) + c2; }
false
false
false
false
false
0
ET_Free_File_Info_Item (ET_File_Info *ETFileInfo) { g_return_val_if_fail (ETFileInfo != NULL, FALSE); g_free(ETFileInfo->mpc_profile); g_free(ETFileInfo->mpc_version); g_free(ETFileInfo); return TRUE; }
false
false
false
false
false
0
test_revwalk_mergebase__initialize(void) { cl_git_pass(git_repository_open(&_repo, cl_fixture("testrepo.git"))); cl_git_pass(git_repository_open(&_repo2, cl_fixture("twowaymerge.git"))); }
false
false
false
false
false
0
eval_eq(List args, Env* env) { if (eval(*args, env) == (Sexp*)0 && eval(*(args+1), env) == (Sexp*)0){ return eval(mk_symbol("#t"), env); } if (eval(*args, env) == (Sexp*)0 || eval(*(args+1), env) == (Sexp*)0){ return eval(mk_symbol("#f"), env); } if (eq(eval(*args, env), eval(*(args+1), e...
false
false
false
false
false
0
pk_control_suggest_daemon_quit_async (PkControl *control, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GSimpleAsyncResult *res; PkControlState *state; GError *error = NULL; g_return_if_fail (PK_IS_CONTROL (control)); g_return_if_fail (callback != NUL...
false
false
false
false
false
0
sleep_monst(mon, amt, how) struct monst *mon; int amt, how; { if (resists_sleep(mon) || (how >= 0 && resist(mon, (char)how, 0, NOTELL))) { shieldeff(mon->mx, mon->my); } else if (mon->mcanmove) { amt += (int) mon->mfrozen; if (amt > 0) { /* sleep for N turns */ mon->mcanmove = 0; mon->mfrozen = m...
false
false
false
false
false
0
lstackPrint(FILE *fp, L_STACK *lstack) { l_int32 i; PROCNAME("lstackPrint"); if (!fp) return ERROR_INT("stream not defined", procName, 1); if (!lstack) return ERROR_INT("lstack not defined", procName, 1); fprintf(fp, "\n Stack: nalloc = %d, n = %d, array = %p\n", ...
false
false
false
false
false
0
callAsFunction(ExecState *exec, JSObject *thisObj, const List &args) { KJS_CHECK_THIS( KJS::DOMCSSStyleSheet, thisObj ); DOM::CSSStyleSheetImpl& styleSheet = *static_cast<DOMCSSStyleSheet *>(thisObj)->impl(); DOMExceptionTranslator exception(exec); switch (id) { case DOMCSSStyleSheet::InsertRule: ret...
false
false
false
true
false
1
stats_oper(struct Client *source_p) { if (!IsOper(source_p) && ConfigFileEntry.stats_o_oper_only) sendto_one(source_p, form_str(ERR_NOPRIVILEGES), from, to); else report_confitem_types(source_p, OPER_TYPE, 0); }
false
false
false
false
false
0
get_fortified_defense_power(const struct unit *attacker, const struct unit *defender) { struct unit_type *att_type = NULL; if (attacker != NULL) { att_type = unit_type(attacker); } return defense_multiplication(att_type, unit_type(defender), ...
false
false
false
false
false
0
clearRegisterDeads(unsigned Reg) { for (MachineOperand &MO : operands()) { if (!MO.isReg() || !MO.isDef() || MO.getReg() != Reg) continue; MO.setIsDead(false); } }
false
false
false
false
false
0
keyPressEvent (QKeyEvent * event) { if (!m_bEditable) return; bool ok; int iTmp = event->text ().toInt (&ok); // If the key is an integer, use its value for the Box if (ok) { setValue (iTmp); return; } // If we press backspace or delete, we reset the box if (event->key () == Qt::...
false
false
false
false
false
0
get_bg2_tile_info(int tile_index) { UINT16 code = aerofgt_bg2videoram[tile_index]; int bank = 4 + ((code & 0x1800) >> 11); SET_TILE_INFO( 1, (code & 0x07ff) + (gfxbank[bank] << 11), (code & 0xe000) >> 13, 0) }
false
false
false
false
false
0
new_TermDEFAULT(CTX ctx, kclass_t cid, ktype_t reqt) { switch(cid) { case CLASS_Class: reqt = (reqt == TYPE_var) ? TYPE_dyn : reqt; return new_TermCONST(ctx, new_Type(ctx, reqt)); case CLASS_NameSpace: return new_TermCONST(ctx, K_GMANS); case CLASS_Script: return new_TermCONST(ctx, ctx->gma->scr); default: r...
false
false
false
false
false
0
SetExtent(int extent[6]) { int i; if ( extent[0] != this->Extent[0] || extent[1] != this->Extent[1] || extent[2] != this->Extent[2] || extent[3] != this->Extent[3] || extent[4] != this->Extent[4] || extent[5] != this->Extent[5] ) { this->Modified(); for (i=0; i<3; i++) { if ( ...
false
false
false
false
false
0
accept() { QSettings settings; if(settings.value("actions/checkCodeSyntaxAutomatically", QVariant(true)).toBool() && !ui->editor->checkSyntax()) showSyntaxCheckError(); else QDialog::accept(); }
false
false
false
false
false
0
PKIX_PL_Cert_GetExtendedKeyUsage( PKIX_PL_Cert *cert, PKIX_List **pKeyUsage, /* list of PKIX_PL_OID */ void *plContext) { CERTOidSequence *extKeyUsage = NULL; CERTCertificate *nssCert = NULL; PKIX_PL_OID *pkixOID = NULL; PKIX_List *oidsList = NULL; SECIte...
false
false
false
false
false
0
reset_index_and_workdir( git_repository *repo, git_commit *commit, bool remove_untracked, bool remove_ignored) { git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_FORCE; if (remove_untracked) opts.checkout_strategy |= GIT_CHECKOUT_REMOVE_UNTRACKED; if (remove_igno...
false
false
false
false
false
0
setShowerStartingScales( bool isTrial, bool doMergeFirstEmm, double& pTscaleIn, const Event& event, double& pTmaxFSRIn, bool& limitPTmaxFSRIn, double& pTmaxISRIn, bool& limitPTmaxISRIn, double& pTmaxMPIIn, bool& limitPTmaxMPIIn ) { // MPI treated differently in case of qcd djiet merging, since hard MPI //...
false
false
false
false
false
0
imonLogKeyError( IF_FileHdl * pLogFile, F_NameTable * pNameTable, CORRUPT_INFO * pCorrupt) { FLMUINT uiLogItem; FlmRecord * pRecord = NULL; void * pvField; REC_KEY * pTempKeyList = NULL; FLMUINT uiIndent; FLMUINT uiLevelOffset; char szNameBuf [128]; char szTmpBuf [128]; if (!pNameTable || !pNam...
false
false
false
false
false
0
sumo_construct_sclk_voltage_mapping_table(struct amdgpu_device *adev, struct sumo_sclk_voltage_mapping_table *sclk_voltage_mapping_table, ATOM_AVAILABLE_SCLK_LIST *table) { u32 i; u32 n = 0; u32 prev_sclk = 0; for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++) { if (table[i].ulSupportedS...
false
false
false
false
false
0
bma150_set_any_motion_interrupt(struct bma150_data *bma150, u8 enable, u8 dur, u8 thres) { int error; error = bma150_set_reg_bits(bma150->client, dur, BMA150_ANY_MOTION_DUR_POS, BMA150_ANY_MOTION_DUR_MSK, BMA150_ANY_MOTION_DUR_REG); if (error) return error; error = bma150_write_byte(bma150->cl...
false
false
false
false
false
0
clutter_cairo_texture_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { ClutterCairoTexturePrivate *priv; priv = CLUTTER_CAIRO_TEXTURE (object)->priv; ...
false
false
false
false
false
0
evbuffer_readline(struct evbuffer *buffer) { u_char *data = EVBUFFER_DATA(buffer); size_t len = EVBUFFER_LENGTH(buffer); char *line; unsigned int i; for (i = 0; i < len; i++) { if (data[i] == '\r' || data[i] == '\n') break; } if (i == len) return (NULL); if ((line = malloc(i + 1)) == NULL) { fprintf...
false
false
false
false
false
0
read_110(IgesDirectoryEntry* de, bool check_only_status) { bool result = true; int i,j; int int_fld; char chr_fld; static Point3 points[2]; locateParamEntry(de); //-Read one data-line readDataLine(lineBuffer, dataBuffer); istrstream* data_line = new istrstream(dataBuffer); //-Read two points ...
false
false
false
false
false
0
__seq_open_private(struct file *f, const struct seq_operations *ops, int psize) { int rc; void *private; struct seq_file *seq; private = kzalloc(psize, GFP_KERNEL); if (private == NULL) goto out; rc = seq_open(f, ops); if (rc < 0) goto out_free; seq = f->private_data; seq->private = private; return p...
false
false
false
false
false
0
get_device(int index) { switch (index) { case 0: return "/dev/mmcblk0"; case 1: return "/dev/mmcblk1"; default: error_msg("Unknown Device"); } return NULL; }
false
false
false
false
false
0
Close() { if( poModule != NULL ) { poModule->Close(); delete poModule; poModule = NULL; } return TRUE; }
false
false
false
false
false
0
rtp_session_create_new_ssrc (RTPSession * sess) { guint32 ssrc; while (TRUE) { ssrc = g_random_int (); /* see if it exists in the session, we're done if it doesn't */ if (g_hash_table_lookup (sess->ssrcs[sess->mask_idx], GINT_TO_POINTER (ssrc)) == NULL) break; } return ssrc; }
false
false
false
false
true
1
memBufAppend(MemBuf * mb, const void *buf, int sz) { assert(mb && buf && sz >= 0); assert(mb->buf); assert(!mb->stolen); /* not frozen */ if (sz > 0) { if (mb->size + sz + 1 > mb->capacity) memBufGrow(mb, mb->size + sz + 1); assert(mb->size + sz <= mb->capacity); /* paranoid */ xmemcpy(mb->buf ...
false
false
false
true
false
1
get_u_short(pool *p, const char **arg, u_short *num, u_short min) { char *ptr; long tmp; const char *txt = ap_getword_conf(p, arg); if (*txt == '\0') { return "\"\""; } tmp = strtol(txt, &ptr, 10); if (*ptr != '\0') { return ap_pstrcat(p, "\"", txt, "\" must be a positive inte...
false
false
false
false
false
0
find_pager(char *buf) { const char **i, **j; for (i = pager_search_list; *i; i++) { for (j = pager_dir_list; *j; j++) { sprintf(buf, "%s/%s", *j, *i); if (access(buf, X_OK) == 0) return(buf); } } return 0; }
false
false
false
false
true
1
rtnl_link(struct nlmsghdr *hdr) { struct ifinfomsg *msg; struct rtattr *attr; int bytes; msg = (struct ifinfomsg *) NLMSG_DATA(hdr); bytes = IFLA_PAYLOAD(hdr); print("ifi_index %d ifi_flags 0x%04x", msg->ifi_index, msg->ifi_flags); for (attr = IFLA_RTA(msg); RTA_OK(attr, bytes); attr = RTA_NEXT(attr, byt...
false
false
false
false
false
0
print_check_result(struct file_info *info, int print_name, int print_result) { if(print_name) { fprintf(rhash_data.out, "%-51s ", info->print_path); } if(print_result) { if(info->error == -1) { /* print error to stdout */ fprintf(rhash_data.out, "%s\n", strerror(errno)); } else if(!HC_FAILED(info->hc.fla...
false
false
false
false
false
0
checkIncorrectStringCompare() { if (!_settings->isEnabled("style")) return; for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) { if (Token::Match(tok, ". substr ( %any% , %num% ) ==|!= %str%")) { MathLib::bigint clen = MathLib::toLongNumber(tok->strAt(5)); ...
false
false
false
false
false
0
browse_host_dl_close(struct browse_ctx *bc) { g_assert(bc != NULL); if (bc->rx) { rx_disable(bc->rx); } }
false
false
false
false
false
0
read_compressed (cdk_stream_t inp, size_t pktlen, cdk_pkt_compressed_t c) { if (!inp || !c) return CDK_Inv_Value; if (DEBUG_PKT) _gnutls_write_log ("read_compressed: %d octets\n", (int) pktlen); c->algorithm = cdk_stream_getc (inp); if (c->algorithm > 3) return CDK_Inv_Packet; /* don't know the...
false
false
false
false
false
0
InstallProject() { cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Install projects" << std::endl); this->CleanTemporaryDirectory(); std::string bareTempInstallDirectory = this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY"); std::string tempInstallDirectoryStr = bareTempInstallDirectory; bool setDestDir = cmSyst...
false
false
false
false
false
0
psb_mmu_flush(struct psb_mmu_driver *driver) { struct drm_device *dev = driver->dev; struct drm_psb_private *dev_priv = dev->dev_private; uint32_t val; down_write(&driver->sem); val = PSB_RSGX32(PSB_CR_BIF_CTRL); if (atomic_read(&driver->needs_tlbflush)) PSB_WSGX32(val | _PSB_CB_CTRL_INVALDC, PSB_CR_BIF_CTRL);...
false
false
false
false
false
0
si_init_smc_table(struct radeon_device *rdev) { struct rv7xx_power_info *pi = rv770_get_pi(rdev); struct si_power_info *si_pi = si_get_pi(rdev); struct radeon_ps *radeon_boot_state = rdev->pm.dpm.boot_ps; const struct si_ulv_param *ulv = &si_pi->ulv; SISLANDS_SMC_STATETABLE *table = &si_pi->smc_statetable; int r...
false
false
false
false
false
0
readElementGroupInfo(FidapElementGroupInfo& gi) { static char key_buffer[80]; static char value_buffer[80]; eat_white(infile); // First group info line readFileLine(infile, read_buffer); strstream strm1; strm1 << read_buffer; while( !strm1.eof() ) { ws(strm1); strm1.getline(key_buffer, 80, '...
false
false
false
false
false
0
au_xino_lock_dir(struct super_block *sb, struct file *xino, struct au_xino_lock_dir *ldir) { aufs_bindex_t brid, bindex; ldir->hdir = NULL; bindex = -1; brid = au_xino_brid(sb); if (brid >= 0) bindex = au_br_index(sb, brid); if (bindex >= 0) { ldir->hdir = au_hi(d_inode(sb->s_root), bindex); au_hn_...
false
false
false
false
false
0
utils_init_application_cache (void) { GHashTable* _tmp0_ = NULL; gboolean _tmp1_ = FALSE; _tmp0_ = utils_app_to_desktop_file; _tmp1_ = G_UNLIKELY (_tmp0_ == NULL); if (_tmp1_) { GHashFunc _tmp2_ = NULL; GEqualFunc _tmp3_ = NULL; GHashTable* _tmp4_ = NULL; _tmp2_ = g_str_hash; _tmp3_ = g_str_equal; _tmp...
false
false
false
false
false
0
QuestAccept_npc_oox17tn(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { if (pQuest->GetQuestId() == QUEST_RESCUE_OOX_17TN) { DoScriptText(SAY_OOX_START, pCreature); pCreature->SetStandState(UNIT_STAND_STATE_STAND); if (pPlayer->GetTeam() == ALLIANCE) { ...
false
false
false
false
false
0
brasero_data_disc_project_loaded_cb (BraseroTrackDataCfg *project, GSList *errors, BraseroDataDisc *self) { BraseroDataDiscPrivate *priv; GtkWidget *message; priv = BRASERO_DATA_DISC_PRIVATE (self); priv->loading = FALSE; message = brasero_notify_get_message_by_context_id (priv->message, BRASER...
false
false
false
false
false
0
write_handler(const String &s_in, Element *e, void *thunk, ErrorHandler *errh) { FromNetFlowSummaryDump *fd = static_cast<FromNetFlowSummaryDump *>(e); String s = cp_uncomment(s_in); switch ((intptr_t)thunk) { case H_ACTIVE: { bool active; if (BoolArg().parse(s, active)) { fd->_active = a...
false
false
false
false
false
0
inflateNoCompression(ucvector* out, const unsigned char* in, size_t* bp, size_t* pos, size_t inlength) { /*go to first boundary of byte*/ size_t p; unsigned LEN, NLEN, n, error = 0; while(((*bp) & 0x7) != 0) (*bp)++; p = (*bp) / 8; /*byte position*/ /*read LEN (2 bytes) and NLEN (2 bytes)*/ if(p >= inl...
false
false
false
false
false
0
TI_actualizeSeries() { TI_DBEntry *db; TI_StudyEntry *study; db = dbEntries[currentdb]; if (db->studyCount == 0) if (!TI_actualizeStudies()) return OFFalse; study = db->studies[db->currentStudy]; /* get a list of all the available series in the current study */ if (!T...
false
false
false
false
false
0
getItemAt(FXint x,FXint y) const { register FXint index; y-=pos_y; x-=pos_x; y-=header->getDefaultHeight(); index=y/lineHeight; if(index<0 || index>=items.no()) return -1; return index; }
false
false
false
false
false
0
_db_set_syslog(const char *facility) { opt_syslog_enable = 1; #ifdef LOG_LOCAL4 #ifdef LOG_DAEMON syslog_facility = LOG_DAEMON; #else syslog_facility = LOG_LOCAL4; #endif if (facility) { struct syslog_facility_name *n; for (n = syslog_facility_names; n->name; n++) { if (strcmp(n->name, facility) ...
false
false
false
false
false
0
gs_type1_endchar(gs_type1_state * pcis) { gs_imager_state *pis = pcis->pis; if (pcis->seac_accent >= 0) { /* We just finished the base character of a seac. */ /* Do the accent. */ gs_font_type1 *pfont = pcis->pfont; gs_glyph_data_t agdata; int achar = pcis->seac_accent; ...
true
true
false
false
false
1
strw(char *s) { unsigned short c; float w; w = 0; for (;;) { c = *s++; if (c == '\0') break; w += cwid(c) * 1.1; } return w * gcur.font_s; }
false
false
false
false
false
0
m_qid(pIIR_Subtype t, RegionStack &rstack, id_type obj_access) { if (implicit_subtype_declaration(t) != NULL) return qid(implicit_subtype_declaration(t), rstack, obj_access); else return qid(get_declaration(t), rstack, obj_access); }
false
false
false
false
false
0
pppoe_check_options(void) { unsigned int mac[6]; int i; if (pppoe_reqd_mac != NULL) { if (sscanf(pppoe_reqd_mac, "%x:%x:%x:%x:%x:%x", &mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]) != 6) { option_error("cannot parse pppoe-mac option value"); exit(EXIT_OPTION_ERROR); } for (i =...
false
false
false
false
false
0
dataname(int stg, long memno) #endif { static char varname[64]; register char *s, *t; char buf[16]; if (stg == STGCOMMON) { varname[0] = '2'; sprintf(s = buf, "Q.%ld", memno); } else { varname[0] = stg==STGEQUIV ? '1' : '0'; s = memname(stg, memno); } t = varname + 1; while(*t++ = *s++); *t = 0; r...
false
false
false
false
false
0
writeMap(ByteStream &str_out,const GUTF8String &name,const int height) const { if(ant) { ant->writeMap(str_out,name,height); }else { str_out.writestring(get_xmlmap(name,height)); } }
false
false
false
false
false
0
GetStartPosition() const { if (IsDeadCheck("v8::Message::GetStartPosition()")) return 0; ENTER_V8; HandleScope scope; i::Handle<i::JSObject> data_obj = Utils::OpenHandle(this); return static_cast<int>(GetProperty(data_obj, "startPos")->Number()); }
false
false
false
false
false
0
insert_submenu(ht_context_menu *submenu) { ht_context_menu_entry *entry = new ht_context_menu_entry(); entry->type = CME_SUBMENU; entry->submenu = submenu; submenu->xpos = 0; context_menu_entry->insert(entry); }
false
false
false
false
false
0
eval (Tree exp, Tree visited, Tree localValEnv) { Tree id; Tree result; if (!getEvalProperty(exp, localValEnv, result)) { LD.detect(cons(exp,localValEnv)); //cerr << "ENTER eval("<< *exp << ") with env " << *localValEnv << endl; result = realeval(exp, visited, localValEnv); setEvalProperty(...
false
false
false
false
false
0
s_netlist_print(NETLIST * ptr) { NETLIST *nl_current = NULL; nl_current = ptr; if (nl_current == NULL) { return; } while (nl_current != NULL) { if (nl_current->nlid != -1) { if (nl_current->component_uref) { printf("component %s \n", nl_current->component_uref); } else { printf(...
false
false
false
false
false
0
unset_variable(std::string name) { CYG_REPORT_FUNCNAME("CdlInterpreter::unset_variable"); CYG_REPORT_FUNCARG2("this %p, name %s", this, name.c_str()); CYG_PRECONDITION_THISC(); CYG_PRECONDITIONC("" != name); Tcl_UnsetVar(tcl_interp, CDL_TCL_CONST_CAST(char*, name.c_str()), TCL_GLOBAL_ONLY); CYG...
false
false
false
false
false
0
constraint_equal (struct constraint a, struct constraint b) { return constraint_expr_equal (a.lhs, b.lhs) && constraint_expr_equal (a.rhs, b.rhs); }
false
false
false
false
false
0
process_cmd_rtcreport(char *line) { CMD_Request request; CMD_Reply reply; struct timeval ref_time; struct tm ref_time_tm; unsigned short n_samples; unsigned short n_runs; unsigned long span_seconds; double coef_seconds_fast; double coef_gain_rate_ppm; request.command = htons(REQ_RTCREPORT); if ...
false
false
false
false
false
0
tdb_reopen_all(int parent_longlived) { struct tdb_context *tdb; for (tdb=tdbs; tdb; tdb = tdb->next) { bool active_lock = (tdb->flags & TDB_CLEAR_IF_FIRST); /* * If the parent is longlived (ie. a * parent daemon architecture), we know * it will keep it's active lock on a * tdb opened with CLEAR_IF_F...
false
false
false
false
false
0
gog_object_is_deletable (GogObject const *obj) { g_return_val_if_fail (GOG_IS_OBJECT (obj), FALSE); if (GOG_IS_GRAPH (obj)) return FALSE; return obj->role == NULL || obj->role->can_remove == NULL || (obj->role->can_remove) (obj); }
false
false
false
false
false
0