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
testAdjoint() //returns the characteristic polynomial and adjoint cmatrix { cmatrix c(n,n,1.0,1), p(n,n); int i = 0, j; double det,b; for (;;) { i++; if (i == n) break; p = *this * c; c = p; b = - c.trace() / i; for (j = 0; j < n; j++) c[j][j] += b; } p = m * c; det = - p.trace() ...
false
false
false
false
false
0
zipmapLookupRaw(unsigned char *zm, unsigned char *key, unsigned int klen, unsigned int *totlen) { unsigned char *p = zm+1, *k = NULL; unsigned int l,llen; while(*p != ZIPMAP_END) { unsigned char free; /* Match or skip the key */ l = zipmapDecodeLength(p); llen = zipmapEncod...
false
false
false
false
false
0
operator()(Merge_data_key k) const { const unsigned char* p = this->pomd_->constant(k); section_size_type entsize = convert_to_section_size_type(this->pomd_->entsize()); // Fowler/Noll/Vo (FNV) hash (type FNV-1a). if (sizeof(size_t) == 8) { size_t result = static_cast<size_t>(14695981039346656037...
false
false
false
false
false
0
ensPredictiontranscriptTrace( const EnsPPredictiontranscript pt, ajuint level) { AjIList iter = NULL; AjPStr indent = NULL; EnsPPredictionexon pe = NULL; if (!pt) return ajFalse; indent = ajStrNew(); ajStrAppendCountK(&indent, ' ', level * 2); ajDebug("%SensPredictiontr...
false
false
false
false
false
0
mc_set_uuid(TCS_KEY_HANDLE tcs_handle, TSS_UUID *uuid) { struct key_mem_cache *tmp; TSS_RESULT result = TCSERR(TSS_E_FAIL); MUTEX_LOCK(mem_cache_lock); LogDebugFn("looking for 0x%x", tcs_handle); for (tmp = key_mem_cache_head; tmp; tmp = tmp->next) { LogDebugFn("TCSD mem_cached handle: 0x%x", tmp->tcs_handle)...
false
false
false
false
false
0
mca_coll_hierarch_bcast_intra_seg (void *buff, int count, struct ompi_datatype_t *datatype, int root, struct ompi_communicator_t *comm, mca_coll_base_module_t *module, int segsize ) { struct ompi_communicator_t ...
false
false
false
false
false
0
display_plot (displayd * display, RedrawStyle type, ggobid * gg) { GList *slist; splotd *sp; for (slist = display->splots; slist; slist = slist->next) { sp = (splotd *) slist->data; if (sp != NULL) { splot_redraw (sp, type, gg); } } }
false
false
false
false
false
0
_rtpbin_on_bye_ssrc (GstElement *rtpbin, guint session_id, guint ssrc, gpointer user_data) { FsRtpConference *self = FS_RTP_CONFERENCE (user_data); FsRtpSession *session = fs_rtp_conference_get_session_by_id (self, session_id); if (session) { fs_rtp_session_bye_ssrc (session, ssrc); g_...
false
false
false
false
false
0
traceBitMask(u_int bits, const char* bitNames[]) { u_int i = 0; do { if ((bits & i) == i) { modemSupports(bitNames[i]); bits -= i; } i++; } while (bits); }
false
false
false
false
false
0
_rtl8723be_phy_path_a_iqk(struct ieee80211_hw *hw) { u32 reg_eac, reg_e94, reg_e9c, tmp; u8 result = 0x00; /* leave IQK mode */ rtl_set_bbreg(hw, RFPGA0_IQK, MASKDWORD, 0x00000000); /* switch to path A */ rtl_set_bbreg(hw, 0x948, MASKDWORD, 0x00000000); /* enable path A PA in TXIQK mode */ rtl_set_rfreg(hw, RF...
false
false
false
false
false
0
device_type_to_string (NMDevice *device) { NMDeviceModemCapabilities caps = NM_DEVICE_MODEM_CAPABILITY_NONE; switch (nm_device_get_device_type (device)) { case NM_DEVICE_TYPE_ETHERNET: return NM_SETTING_WIRED_SETTING_NAME; case NM_DEVICE_TYPE_ADSL: return NM_SETTING_ADSL_SETTING_NAME; case NM_DEVICE_TYPE_WIFI...
false
false
false
false
false
0
handle_dir (const gchar *dirname, time_t stored_mtime, GHashTable *converted) { time_t dir_mtime; struct stat statbuf; GDir *dir; const gchar *name; gchar *filename; GError *error; /* If the directory is not newer, exit */ if (stat (dirname, &statbuf) == 0) dir_mtime ...
false
false
false
false
false
0
getWmUserTime(long *userTime) { *userTime = -1; if (!prop.net_wm_user_time) return false; Atom r_type; int r_format; unsigned long count; unsigned long bytes_remain; unsigned char *prop; if (XGetWindowProperty(xapp->display(), handle(), ...
false
false
false
false
false
0
mark_loop_exit_edges (void) { basic_block bb; edge e; if (number_of_loops () <= 1) return; FOR_EACH_BB (bb) { edge_iterator ei; FOR_EACH_EDGE (e, ei, bb->succs) { if (loop_outer (bb->loop_father) && loop_exit_edge_p (bb->loop_father, e)) e->flags |= EDGE_LOOP_EXIT; else...
false
false
false
false
false
0
sge_parse_qquota(lList **ppcmdline, lList **host_list, lList **resource_list, lList **user_list, lList **pe_list, lList **project_list, lList **cqueue_list, report_handler_t **report_handler, lList **alpp) { u_long32 helpflag = 0; char *argstr = NULL; bool ret = true; DEN...
false
false
false
false
false
0
setenv_route (struct env_set *es, const struct route *r, int i) { struct gc_arena gc = gc_new (); if (r->defined) { setenv_route_addr (es, "network", r->network, i); setenv_route_addr (es, "netmask", r->netmask, i); setenv_route_addr (es, "gateway", r->gateway, i); if (r->metric_defined...
false
false
false
false
false
0
StringMatchFilter(const Properties& properties, tstring&) { init(); tstring tmp = properties.getProperty( LOG4CPLUS_TEXT("AcceptOnMatch") ); acceptOnMatch = (toLower(tmp) == LOG4CPLUS_TEXT("true")); stringToMatch = properties.getProperty( LOG4CPLUS_TEXT("StringToMatch") ); }
false
false
false
false
false
0
blk_mq_del_queue_tag_set(struct request_queue *q) { struct blk_mq_tag_set *set = q->tag_set; mutex_lock(&set->tag_list_lock); list_del_init(&q->tag_set_list); if (list_is_singular(&set->tag_list)) { /* just transitioned to unshared */ set->flags &= ~BLK_MQ_F_TAG_SHARED; /* update existing queue */ blk_mq_u...
false
false
false
false
false
0
all_tests() { mu_run_test(in_range); mu_run_test(below_range); mu_run_test(above_range); return 0; }
false
false
false
false
false
0
grp_getgrnam(PyObject *self, PyObject *args) { char *name; struct group *p; PyObject *arg, *bytes, *retval = NULL; if (!PyArg_ParseTuple(args, "U:getgrnam", &arg)) return NULL; if ((bytes = PyUnicode_EncodeFSDefault(arg)) == NULL) return NULL; if (PyBytes_AsStringAndSize(bytes, ...
false
false
false
false
false
0
GetRemoteSystemFromSystemAddress( const SystemAddress systemAddress, bool calledFromNetworkThread, bool onlyActive ) const { unsigned i; if ( systemAddress == UNASSIGNED_SYSTEM_ADDRESS ) return 0; if (calledFromNetworkThread) { unsigned int index = GetRemoteSystemIndex(systemAddress); if (index!=(...
false
false
false
false
false
0
rtl8169_set_speed_xmii(struct net_device *dev, u8 autoneg, u16 speed, u8 duplex, u32 adv) { struct rtl8169_private *tp = netdev_priv(dev); int giga_ctrl, bmcr; int rc = -EINVAL; rtl_writephy(tp, 0x1f, 0x0000); if (autoneg == AUTONEG_ENABLE) { int auto_nego; auto_nego = rtl_readphy(tp, MII_ADVERTISE); ...
false
false
false
false
false
0
calc_intervall_displayed_in_rectangle(AW_rectangle *rect, long *left_index, long *right_index) { // rect contains win-coords AW_pos x ,y; // int length_of_char = ED4_ROOT->font_info[ED4_G_SEQUENCES].get_width(); int length_of_char = ED4_ROOT->font_group.get_width(ED4_G_SEQUENCES); calc_world_coor...
false
false
false
false
false
0
decNumberIsSubnormal(const decNumber *dn, decContext *set) { Int ae; /* adjusted exponent */ #if DECCHECK if (decCheckOperands(DECUNRESU, DECUNUSED, dn, set)) return 0; #endif if (decNumberIsSpecial(dn)) return 0; /* not finite */ if (decNumberIsZero(dn)) return 0; /* not non-zero */ ae=dn->exponent+...
false
false
false
false
false
0
noraw(void) { int result = ERR; T((T_CALLED("noraw()"))); if (SP != 0 && cur_term != 0) { TTY buf; BEFORE("noraw"); _nc_setmode(O_TEXT); buf = cur_term->Nttyb; #ifdef TERMIOS buf.c_lflag |= ISIG | ICANON | (cur_term->Ottyb.c_lflag & IEXTEN); buf.c_iflag |= COOKED_INPUT; #else buf.sg_flags &=...
false
false
false
false
false
0
getDispersion( const CFeatureList & list, CVectorFloat & std, CVectorFloat & mean ) { std.assign(2,0); mean.assign(2,0); CFeatureList::const_iterator it; double varx = 0, vary = 0; for( it = list.begin(); it != list.end(); it+...
false
false
false
false
false
0
message_view_store_iter_n_children(GtkTreeModel * tree_model, GtkTreeIter * iter) { message_view_store_t *store; g_return_val_if_fail(SEAUDIT_IS_MESSAGE_VIEW_STORE(tree_model), -1); g_return_val_if_fail(iter == NULL || iter->user_data != NULL, 0); store = (message_view_store_t *) tree_model; /* return the number o...
false
false
false
false
false
0
validate_new_style ( XmpSpinboxWidget cw, int value ) { if ( value != XmSPINBOX_STACKED && value != XmSPINBOX_STACKED_LEFT && value != XmSPINBOX_STACKED_RIGHT && value != XmSPINBOX_LEFT && value != XmSPINBOX_RIGHT && value != XmSPINBOX_SEPARATE ) { XmpWarning ( (...
false
false
false
false
false
0
o_bit (void) { VALUE *v1, *v2; long index; int r; v1 = &stack[-1]; v2 = &stack[0]; if (v1->v_type == V_ADDR) v1 = v1->v_addr; if (v2->v_type == V_ADDR) v2 = v2->v_addr; if (v2->v_type != V_NUM || qisfrac(v2->v_num)) { freevalue(stack--); freevalue(stack); *stack = error_value(E_BIT1); return; } i...
false
false
false
false
false
0
MatchedGS(Clipboard* cb, int& count) { Graphic* gr = GetGraphicComp()->GetGraphic(); Iterator i; count = 0; for (cb->First(i); !cb->Done(i); cb->Next(i)) { Graphic* test = cb->GetComp(i)->GetGraphic(); if (gr->GetBrush() == test->GetBrush() && gr->GetFgColor() == test->GetFgColor() && gr->Ge...
false
false
false
false
false
0
req_ssl_var_lookup(requestobject *self, PyObject *args) { char *var_name; if (! PyArg_ParseTuple(args, "s", &var_name)) return NULL; /* error */ if (!optfn_ssl_var_lookup) optfn_ssl_var_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup); if (optfn_ssl_var_lookup) { const char *...
false
false
false
false
false
0
Verify(PK_MessageAccumulator *messageAccumulator) const { std::auto_ptr<PK_MessageAccumulator> m(messageAccumulator); return VerifyAndRestart(*m); }
false
false
false
false
false
0
snd_emu10k1_proc_acode_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { u32 pc; struct snd_emu10k1 *emu = entry->private_data; snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name); snd_iprintf(buffer, " Code dump :\n"); for (pc = 0; pc < (emu->audigy ? 102...
false
false
false
false
false
0
ubkwdc(BW *bw, int k) { dobkwdc = 1; if (k >= 0 && k < 256) return dofwrdc(bw, k, NULL, NULL); else if (mkqw(bw->parent, sc("Bkwd to char: "), dofwrdc, NULL, NULL, NULL)) return 0; else return -1; }
false
false
false
false
false
0
hashseq_nucleotides (unsigned char *nucleotides, int length) { int sum = 0; int i; for (i = 0; i < length; i++) { #if 0 if (nucleotides[i] > 0x3) { fprintf(stderr,"nucleotides[%d] = %d, length = %d\n", i,nucleotides[i],length); abort(); } #endif sum = sum*4 + nucleotides[i]; } ...
false
false
false
false
false
0
UtilComputeAngle(float_g dx, float_g dy) { double angle; if (dx == 0) return (dy > 0) ? 90.0 : 270.0; angle = atan2((double) dy, (double) dx) * 180.0 / M_PI; if (angle < 0) angle += 360.0; return angle; }
false
false
false
false
false
0
compute_scalar() { invoked_scalar = update->ntimestep; if (update->vflag_global != invoked_scalar) error->all(FLERR,"Virial was not tallied on needed timestep"); // invoke temperature it it hasn't been already double t; if (keflag) { if (temperature->invoked_scalar != update->ntimestep) t = te...
false
false
false
false
false
0
lintolpc10_frameout(struct ast_trans_pvt *pvt) { struct lpc10_coder_pvt *tmp = pvt->pvt; int x; int datalen = 0; /* output frame */ int samples = 0; /* output samples */ float tmpbuf[LPC10_SAMPLES_PER_FRAME]; INT32 bits[LPC10_BITS_IN_COMPRESSED_FRAME]; /* XXX what ??? */ /* We can't work on anything less than a ...
false
false
false
false
false
0
removeVariable(const char * name) { if (name == 0 || *name == '\0') return; const char * pointer; int n; REMOVE_BLANKS; if (n == 0) return; Struct * s = (Struct *)(p); (s->theDictionary).erase(string(pointer,n)); }
false
false
false
false
false
0
scanner_file(DOHFile * f) { if (!scan_init) scanner_init(); Scanner_clear(scan); Scanner_push(scan,f); }
false
false
false
false
false
0
exporthtml_find_stylesheet( ExportHtmlCtl *ctl ) { StylesheetEntry *retVal = NULL; StylesheetEntry *entry; GList *node; node = ctl->listStyle; while( node ) { entry = ( StylesheetEntry * ) node->data; if( entry->id == ctl->stylesheet ) return entry; if( entry->dflValue ) retVal = entry; node = g_list_next...
false
false
false
false
false
0
ssh_message_service_reply_success(ssh_message msg) { struct ssh_string_struct *service; ssh_session session; if (msg == NULL) { return SSH_ERROR; } session = msg->session; SSH_LOG(SSH_LOG_PACKET, "Sending a SERVICE_ACCEPT for service %s", msg->service_request.service); if (buffer_add_u8(sessio...
false
false
false
false
false
0
gedit_word_completion_create_configure_widget (PeasGtkConfigurable *configurable) { GtkBuilder *builder; GtkWidget *content; GtkWidget *interactive_completion; GtkWidget *min_word_size; GSettings *settings; GError *error = NULL; builder = gtk_builder_new (); gtk_builder_set_translation_domain (builder, GETTEXT...
false
false
false
false
false
0
optimize(const UnicodeSet &set, UErrorCode &errorCode) { if(U_FAILURE(errorCode) || set.isEmpty()) { return; } UnicodeSetIterator iter(set); while(iter.next() && !iter.isString()) { UChar32 c = iter.getCodepoint(); uint32_t ce32 = utrie2_get32(trie, c); if(ce32 == Collation::FALLBACK...
false
false
false
false
false
0
removeClient(KDirWatch* instance) { QList<Client *>::iterator it = m_clients.begin(); const QList<Client *>::iterator end = m_clients.end(); for ( ; it != end ; ++it ) { Client* client = *it; if (client->instance == instance) { client->count--; if (client->count == 0) { m_clients.erase...
false
false
false
false
false
0
spotter_matrix_vect_mult (double a[3][3], double b[3], double c[3]) { /* c = A * b */ int i, j; for (i = 0; i < 3; i++) for (j = 0, c[i] = 0.0; j < 3; j++) c[i] += a[i][j] * b[j]; }
false
false
false
false
false
0
parse_net_stat_bar_arg(struct text_object *obj, const char *arg, void *free_at_crash) { if (arg) { arg = scan_bar(obj, arg); obj->data.opaque = get_net_stat(arg, obj, free_at_crash); } else { // default to DEFAULTNETDEV char *buf = strndup(DEFAULTNETDEV, text_buffer_size); obj->data.opaque = get_net_stat(bu...
false
false
false
false
false
0
SetContext(char *id) { InstallObject(id); Verbose("\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n"); Verbose(" * (Changing context state to: %s) *",id); Verbose("\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n\n"); strncpy(CONTEXTID,id,31); }
false
false
false
false
false
0
update_operator_name(const char *name) { if (name == NULL) return; g_free(net.operator_name); net.operator_name = g_strndup(name, 16); DBG("telephony-maemo6: operator name updated: %s", name); }
false
false
false
false
false
0
cache_set_flush(struct closure *cl) { struct cache_set *c = container_of(cl, struct cache_set, caching); struct cache *ca; struct btree *b; unsigned i; if (!c) closure_return(cl); bch_cache_accounting_destroy(&c->accounting); kobject_put(&c->internal); kobject_del(&c->kobj); if (c->gc_thread) kthread_s...
false
false
false
false
false
0
layoutButtons() { if (titleY() == 0) return ; unsigned long decors = frameDecors(); if (fMinimizeButton) { if (decors & fdMinimize) fMinimizeButton->show(); else fMinimizeButton->hide(); } if (fMaximizeButton) { if (decors & fdMaximize) ...
false
false
false
true
false
1
find_root(const GtFeatureInfo *fi, const char *id) { const char *delim, *parents; GtFeatureNode *this_feature, *parent_pseudo_feature; gt_assert(fi && id); /* get feature */ delim = strchr(id, ';'); if (delim) { char *first_parent = gt_cstr_dup_nt(id, delim - id); this_feature = gt_hashmap_get(fi->i...
false
false
false
false
false
0
set_dtu_parameter_to_param_head(Block *target_bpt, Dt_info *dt_info, Dtu_mt *kick_mt, Dtu_mt *chk_mt, int src_mt, int dst_mt) { Dtu_parameter *param; Li...
false
false
false
false
false
0
gen_ldexpsf3 (rtx operand0, rtx operand1, rtx operand2) { rtx _val = 0; start_sequence (); { rtx operands[3]; operands[0] = operand0; operands[1] = operand1; operands[2] = operand2; #line 14479 "../../src/gcc/config/i386/i386.md" { rtx op0, op1; if (optimize_insn_for_size_p ()) FAIL; ...
false
false
false
false
false
0
e1000_adjust_serdes_amplitude(struct e1000_hw *hw) { uint16_t eeprom_data; int32_t ret_val; DEBUGFUNC("e1000_adjust_serdes_amplitude"); if (hw->media_type != e1000_media_type_internal_serdes) return E1000_SUCCESS; switch (hw->mac_type) { case e1000_82545_rev_3: case e1000_82546_r...
false
false
false
false
false
0
alloc(struct rtattr **tb) { struct crypto_instance *inst; struct crypto_alg *alg; int err; err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_BLKCIPHER); if (err) return ERR_PTR(err); alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, CRYPTO_ALG_TYPE_MASK); if (IS_ERR(alg)) return ERR_CAST(alg); i...
false
false
false
false
false
0
initialize(QScriptEngine *scriptEngine, ScriptAgent *scriptAgent, ActionTools::ActionFactory *actionFactory) { scriptEngine->setProcessEventsInterval(50); QScriptValue loadUIFunc = scriptEngine->newFunction(&loadUIFunction); scriptEngine->globalObject().setProperty("loadUI", loadUIFunc); QScriptValue include...
false
false
false
false
false
0
dbd_load(request_rec * r, const char *key, const char **val) { apr_status_t rv; ap_dbd_t *dbd = NULL; apr_dbd_prepared_t *statement = NULL; apr_dbd_results_t *res = NULL; apr_dbd_row_t *row = NULL; apr_int64_t expiry = (apr_int64_t) apr_time_now(); session_dbd_dir_conf *conf = ap_get_modul...
false
false
false
false
false
0
intif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag) { if (inter_fd < 0) return -1; WFIFOW(inter_fd, 0)=0x303d; WFIFOL(inter_fd, 2)=guild_id1; WFIFOL(inter_fd, 6)=guild_id2; WFIFOL(inter_fd,10)=account_id1; WFIFOL(inter_fd,14)=account_id2; WFIFOL(inter_fd,18)=flag; WFIFO...
false
false
false
false
false
0
ValidBottomSerif(SplinePoint *start,SplinePoint *end, double depth, double fuzz, double minbound, double maxbound ) { double max = start->me.y>end->me.y ? start->me.y : end->me.y; SplinePoint *sp, *last; int got_down = false, got_up=false; /* To be a serif it must go down about as far down as we expect...
false
false
false
false
false
0
__ecereProp_Workspace_Set_workspaceFile(struct __ecereNameSpace__ecere__com__Instance * this, char * value) { struct Workspace * __ecerePointer_Workspace = (struct Workspace *)(this ? (((char *)this) + __ecereClass_Workspace->offset) : 0); char dir[534]; if(__ecerePointer_Workspace->workspaceFile) (__ecereNameSpace__...
true
true
false
true
false
1
SBNCloseDiskTree( SBNSearchHandle hSBN ) { int i; int nMaxNodes; if (hSBN == NULL) return; if( hSBN->pasNodeDescriptor != NULL ) { nMaxNodes = (1 << hSBN->nMaxDepth) - 1; for(i = 0; i < nMaxNodes; i++) { if( hSBN->pasNodeDescriptor[i].pabyShapeDesc != NU...
false
false
false
false
false
0
select(uint symbol, size_t j) const { symbol = am->map(symbol); uint mask = (1<<height)-2; uint sum=2; uint level = height-1; size_t pos=j; while(true) { size_t start = get_start(symbol,mask); size_t end = min((size_t)max_v+1,start+sum); ...
false
false
false
false
false
0
inf_adopted_session_user_from_request_xml(InfAdoptedSession* session, xmlNodePtr xml, GError** error) { InfUserTable* user_table; InfUser* user; guint user_id; user_table = inf_session_get_user_table(INF_SESSION(session)); i...
false
false
false
false
false
0
_equalAConst(A_Const *a, A_Const *b) { if (!equal(&a->val, &b->val)) /* hack for in-line Value field */ return false; COMPARE_LOCATION_FIELD(location); return true; }
false
false
false
false
false
0
connect_complete(struct vhci_conn *conn) { uint8_t buf[HCI_MAX_FRAME_SIZE], *ptr = buf; evt_conn_complete *cc; hci_event_hdr *he; /* Packet type */ *ptr++ = HCI_EVENT_PKT; /* Event header */ he = (void *) ptr; ptr += HCI_EVENT_HDR_SIZE; he->evt = EVT_CONN_COMPLETE; he->plen = EVT_CONN_COMPLETE_SIZE; cc =...
false
false
false
false
false
0
getCacheID() const { AutoMutex lock(getImpl()->resultsCacheMutex_); if(getImpl()->cacheID_.empty()) { std::ostringstream cacheid; cacheid << "Search Path " << getImpl()->searchPath_ << " "; cacheid << "Working Dir " << getImpl()->workingDir_ << " ...
false
false
false
false
false
0
mmc_blk_packed_err_check(struct mmc_card *card, struct mmc_async_req *areq) { struct mmc_queue_req *mq_rq = container_of(areq, struct mmc_queue_req, mmc_active); struct request *req = mq_rq->req; struct mmc_packed *packed = mq_rq->packed; int err, check, status; u8 *ext_csd; BUG_ON(!packed); packed-...
false
false
false
false
false
0
iMergeFunc(void* user_data, int index, const char* name, int data_type, int count, const void* data) { (void)index; imAttribTablePrivate* ptable = (imAttribTablePrivate*)user_data; if (!imAttribTableGet(ptable, name, NULL, NULL)) imAttribTableSet(ptable, name, data_type, count, data); retu...
false
false
false
false
false
0
at803x_link_change_notify(struct phy_device *phydev) { struct at803x_priv *priv = phydev->priv; /* * Conduct a hardware reset for AT8030 every time a link loss is * signalled. This is necessary to circumvent a hardware bug that * occurs when the cable is unplugged while TX packets are pending * in the FIFO. ...
false
false
false
false
false
0
format(int32_t number, UErrorCode& status) const { FieldPosition fpos(0); UnicodeString result; return format(Formattable(number), number, result, fpos, status); }
false
false
false
false
false
0
ExtractFileBase (char *path, char *dest) { char *src; src = path + strlen(path) - 1; // // back up until a \ or the start // while (src != path && *(src-1) != PATHSEPERATOR) src--; while (*src && *src != '.') { *dest++ = *src++; } *dest = 0; }
false
false
false
false
false
0
options_detail_do_frame() { options_detail_sliders_update(); // force on/off buttons to draw their correct setting if ( Detail.targetview_model ) { options_force_button_frame(HUD_TARGETVIEW_RENDER_ON, 2); options_force_button_frame(HUD_TARGETVIEW_RENDER_OFF, 0); } else { options_force_button_frame(HUD_TARG...
false
false
false
false
false
0
_gnutls_x509_get_dn_oid (ASN1_TYPE asn1_struct, const char *asn1_rdn_name, int indx, void *_oid, size_t * sizeof_oid) { int k2, k1, result; char tmpbuffer1[ASN1_MAX_NAME_SIZE]; char tmpbuffer2[ASN1_MAX_NAME_SIZE]; char tmpbuffer3[ASN1_MAX_NAME_SIZE]; char valu...
false
false
false
false
false
0
set_frame_comment(unsigned char *frame, FrameDataNode const *node) { size_t const n = sizeOfCommentNode(node); if (n > 10) { frame = set_4_byte_value(frame, ID_COMMENT); frame = set_4_byte_value(frame, (uint32_t) (n - 10)); /* clear 2-byte header flags */ *frame++ = 0; *f...
false
false
false
false
false
0
updateGaugeShadow(int x,int y, int w, int thickness, Direction direction) { int width=abs(gaugeWidth()-w)+thickness; XPoint points[6]; if (w<gaugeWidth()) { // value is smaller points[0].x=points[1].x=direction==Right?x-thickness:x+width; points[2].x=points[3].x=direction==Right?x:x+width-thickn...
false
false
false
false
false
0
testLongDistMovement() { auto_ptr<GameMap> game ( startMap("unittest-moveland.map")); Vehicle* veh; MapCoordinate airport(0,7); MapCoordinate carrier(0,0); veh = game->getField(9,18)->vehicle; moveUnitTest( game.get(), veh, airport, 1 ); veh = game->getField(9,19)->vehicle; moveUnitTest...
false
false
false
false
false
0
const_table_unsigned_longlong_value(const Const_table *c) { switch(c->type) { case TYPE_INT: return (unsigned long long)(c->val.i); case TYPE_CHAR: return (unsigned long long)(c->val.ch); case TYPE_SHORT: return (unsigned long long)(c->val.sh); case TYPE_UNSIGNED_CHAR: return (unsigned long long...
false
false
false
false
false
0
_findRecoPartner(ClusterPtr cl, ClusterVector cv) const { ClusterPtr candidate = cl; Energy minMass = 1*TeV; for (CluVecIt cit=cv.begin(); cit != cv.end(); ++cit) { // don't allow colour octet clusters if ( isColour8( cl->colParticle(), (*cit)-...
false
false
false
false
false
0
replace_variables(char *in, char **datadir, char **database) { *datadir = NULL; *database = NULL; /* parse/replace variables in input string */ char tmp[2000]; char **tokens; int no_tokens, n; if (!strchr(in, '/')) { /* no path */ *datadir = G_store("./"); *database = G_store(in); } ...
false
false
false
false
false
0
parseTexAddressMode(String& params, MaterialScriptContext& context) { StringUtil::toLowerCase(params); StringVector vecparams = StringUtil::split(params, " \t"); size_t numParams = vecparams.size(); if (numParams > 3 || numParams < 1) { logParseError("Invalid nu...
false
false
false
false
false
0
TogMinor(bit) int bit; { if (is_an_arg()) { if (arg_value() == 0) curbuf->b_minor &= ~bit; else curbuf->b_minor |= bit; } else curbuf->b_minor ^= bit; UpdModLine = YES; }
false
false
false
false
false
0
close_func (LexState *ls) { lua_State *L = ls->L; FuncState *fs = ls->fs; Proto *f = fs->f; removevars(ls, 0); luaK_ret(fs, 0, 0); /* final return */ luaM_reallocvector(L, f->code, f->sizecode, fs->pc, Instruction); f->sizecode = fs->pc; luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->pc, int);...
false
false
false
false
false
0
SDIfreevarAID(NC *handle, /* IN: file handle */ int32 index /* IN: variable index */) { NC_array **ap = NULL; NC_var *var = NULL; int32 ret_value = SUCCEED; if(handle == NULL || !handle->vars) { ret_value = FAIL; goto done; } if(index < 0 |...
false
false
false
false
false
0
nodate(struct tm *tm) { return tm->tm_year < 0 && tm->tm_mon < 0 && tm->tm_mday < 0 && !(tm->tm_hour | tm->tm_min | tm->tm_sec); }
false
false
false
false
false
0
IO_reset(IOobject *self, PyObject *unused) { if (!IO__opencheck(self)) return NULL; self->pos = 0; Py_INCREF(Py_None); return Py_None; }
false
false
false
false
false
0
get_variable (const char *varname, LDAP *connection, LDAPMessage *entry) { BerElement *berptr; const char *attr; char *retval; if (strcmp (varname, "USER") == 0) return g_strdup (g_get_user_name ()); if (strcmp (varname, "EVOLUTION_UID") == 0) return get_evolution_uid ();...
false
false
false
false
false
0
append_digit (num, digit, base, precision) cpp_num num; int digit, base; size_t precision; { cpp_num result; unsigned int shift = 3 + (base == 16); bool overflow; cpp_num_part add_high, add_low; /* Multiply by 8 or 16. Catching this overflow here means we don't need to worry about add_hi...
false
false
false
false
false
0
printImpl(raw_ostream &OS, unsigned indent) const { OS.indent(indent) << "CheckType " << getEnumName(Type) << ", ResNo=" << ResNo << '\n'; }
false
false
false
false
false
0
construct_rhs (uint16_t *table, mpz_t rhs, nsieve_t *ns){ // returns nonzero on success, zero on failure. if (table[0] % 2 != 0){ printf("Error: table[%d] is not even (=%d)\n", 0, table[0]); return 0; } if ((table[0]/2) % 2 == 1){ // then we need to negate rhs mpz_neg (rhs, rhs); } mpz_t temp; mpz_init (tem...
false
false
false
false
false
0
readsignature() { int allele_speed_signature; /*used to verify that UNKNOWN also has ALLELE_SPEED on*/ int signature; signature = 0; allele_speed_signature = 0; signature = fscanf(speedfile,"%d", &allele_speed_signature); if ( ((ALLELE_SPEED && (( signature < 1) |...
false
false
false
false
false
0
bfa_cee_get_stats(struct bfa_cee_s *cee, struct bfa_cee_stats_s *stats, bfa_cee_get_stats_cbfn_t cbfn, void *cbarg) { struct bfi_cee_get_req_s *cmd; WARN_ON((cee == NULL) || (cee->ioc == NULL)); if (!bfa_ioc_is_operational(cee->ioc)) { bfa_trc(cee, 0); return BFA_STATUS_IOC_FAILURE; } if (cee->get_stats_...
false
false
false
true
false
1
check_class() { struct Class *cltmp; rb_dlink_node *ptr; rb_dlink_node *next_ptr; RB_DLINK_FOREACH_SAFE(ptr, next_ptr, class_list.head) { cltmp = ptr->data; if(MaxUsers(cltmp) < 0) { rb_dlinkDestroy(ptr, &class_list); if(CurrUsers(cltmp) <= 0) free_class(cltmp); } } }
false
false
false
false
false
0
pcie_cap_has_lnkctl(const struct pci_dev *dev) { int type = pci_pcie_type(dev); return type == PCI_EXP_TYPE_ENDPOINT || type == PCI_EXP_TYPE_LEG_END || type == PCI_EXP_TYPE_ROOT_PORT || type == PCI_EXP_TYPE_UPSTREAM || type == PCI_EXP_TYPE_DOWNSTREAM || type == PCI_EXP_TYPE_PC...
false
false
false
false
false
0
gamgi_mesa_translate_bond_list (double *shift) { gamgi_layer *layer = NULL; gamgi_bond *bond; gamgi_dlist *dlist; double translate[3]; for (dlist = gamgi->bonds; dlist != NULL; dlist = dlist->next) { bond = GAMGI_CAST_BOND dlist->data; static_layer (GAMGI_CAST_OBJECT bond, &layer, shift, translate); gamgi_me...
false
false
false
false
false
0
createTrackGroups() { mGroups.clear(); mParents.clear(); if (mEvents.empty()) { return; } int trackId = mEvents.first().trackId(); mGroups << EventModel::Group(Track::retrieveTrackName(trackId), 0); int nextTrackId = trackId; for (int i=0; i<mEvents.count(); i++) { ...
false
false
false
false
false
0
xhci_print_cap_regs(struct xhci_hcd *xhci) { u32 temp; u32 hci_version; xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs); temp = readl(&xhci->cap_regs->hc_capbase); hci_version = HC_VERSION(temp); xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n", (unsigned int) temp); xhci_dbg(xhci, "CA...
false
false
false
false
false
0
conf_service(config_entry_t *ce) { service_t *sptr; sptr = service_find(ce->ce_varname); if (!sptr) return -1; subblock_handler(ce, sptr->conf_table); return 0; }
true
true
false
false
false
1
subst (const string& model, const string& a0) { vector<string> args(10); args[0] = a0; return substitution (model, args); }
false
false
false
false
false
0
rb_init_netio_poll(void) { int fd; pollfd_list.pollfds = rb_malloc(rb_getmaxconnect() * (sizeof(struct pollfd))); pollfd_list.allocated = rb_getmaxconnect(); for(fd = 0; fd < rb_getmaxconnect(); fd++) { pollfd_list.pollfds[fd].fd = -1; } pollfd_list.maxindex = 0; return 0; }
false
false
false
false
false
0