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
OnBtnSearchClick(wxCommandEvent &event) // ---------------------------------------------------------------------------- { if ( !IsAttached() ) return; // Behaviour differs if a search is running. if ( m_pThreadSearchView->IsSearchRunning() ) { // In this case, user wants to stops search...
false
false
false
false
false
0
mdb_attr_slot( struct mdb_info *mdb, AttributeDescription *ad, int *ins ) { unsigned base = 0, cursor = 0; unsigned n = mdb->mi_nattrs; int val = 0; while ( 0 < n ) { unsigned pivot = n >> 1; cursor = base + pivot; val = SLAP_PTRCMP( ad, mdb->mi_attrs[cursor]->ai_desc ); if ( val < 0 ) { n = pivot; ...
false
false
false
false
false
0
ilk_display_irq_handler(struct drm_device *dev, u32 de_iir) { struct drm_i915_private *dev_priv = dev->dev_private; enum pipe pipe; u32 hotplug_trigger = de_iir & DE_DP_A_HOTPLUG; if (hotplug_trigger) ilk_hpd_irq_handler(dev, hotplug_trigger, hpd_ilk); if (de_iir & DE_AUX_CHANNEL_A) dp_aux_irq_handler(dev); ...
false
false
false
false
false
0
smatch(const int mline, const char *mstr) { const struct spq *jp = &Job_seg.jj_ptrs[mline]->j; return smatchit(jp->spq_file, mstr) || smatchit(jp->spq_form, mstr) || smatchit(jp->spq_ptr, mstr) || smatchit(jp->spq_uname, mstr); }
false
false
false
false
false
0
openl2tp_send_accm_ind(int tunnel_id, int session_id, uint32_t send_accm, uint32_t recv_accm) { int result; uint8_t buf[OPENL2TP_MSG_MAX_LEN]; struct openl2tp_event_msg *msg = (void *) &buf[0]; struct openl2tp_event_tlv *tlv; uint16_t tid = tunnel_id; uint16_t sid = session_id; struct openl2tp_tlv_ppp_acc...
false
true
false
false
false
1
replace_pr (const DatabaseInfo database, FILE *fp, const char *editUserEmailAddr, ErrorDesc *err) { int res; const char *prnum = NULL; PR *curr_pr; PR *new_pr = allocPR (database); /* Read the message header in. */ if (read_header (new_pr, fp) < 0) { setError (err, CODE_EOF_PR, "Couldn't re...
false
false
false
false
false
0
Perl_ck_length(pTHX_ OP *o) { PERL_ARGS_ASSERT_CK_LENGTH; o = ck_fun(o); if (ckWARN(WARN_SYNTAX)) { const OP *kid = o->op_flags & OPf_KIDS ? cLISTOPo->op_first : NULL; if (kid) { SV *name = NULL; const bool hash = kid->op_type == OP_PADHV ...
false
false
false
false
false
0
blkdev_put(struct block_device *bdev, fmode_t mode) { mutex_lock(&bdev->bd_mutex); if (mode & FMODE_EXCL) { bool bdev_free; /* * Release a claim on the device. The holder fields * are protected with bdev_lock. bd_mutex is to * synchronize disk_holder unlinking. */ spin_lock(&bdev_lock); WARN_...
false
false
false
false
false
0
wacom_send_and_wait(struct wacom *wacom, struct serio *serio, const u8 *cmd, const char *desc) { int err; unsigned long u; wacom->expect = cmd[1]; init_completion(&wacom->cmd_done); err = wacom_send(serio, cmd); if (err) return err; u = wait_for_completion_timeout(&wacom->cmd_done, HZ); if (u == ...
false
false
false
false
false
0
archive_match_include_gname_w(struct archive *_a, const wchar_t *gname) { struct archive_match *a; archive_check_magic(_a, ARCHIVE_MATCH_MAGIC, ARCHIVE_STATE_NEW, "archive_match_include_gname_w"); a = (struct archive_match *)_a; return (add_owner_name(a, &(a->inclusion_gnames), 0, gname)); }
false
false
false
false
false
0
GetSupportedState (Atom atom) { if (atom == XA_NET_WM_STATE_FULLSCREEN) return wm_FULLSCREEN; if (atom == XA_NET_WM_STATE_ABOVE) return wm_ABOVE; if (atom == XA_NET_WM_STATE_STAYS_ON_TOP) return wm_STAYS_ON_TOP; if (atom==XA_NET_WM_STATE_BELOW) return wm_BELOW; return 0; }
false
false
false
false
false
0
FuncUNBB_LIST ( Obj self, Obj list, Obj pos ) { UNBB_LIST( list, pos ); return 0; }
false
false
false
false
false
0
cpl_column_add_to_double(cpl_column *column, double value) { cpl_size nullcount = cpl_column_count_invalid(column); cpl_size length = cpl_column_get_size(column); double *dp = cpl_column_get_data_double(column); int *np = cpl_column_get_data_invalid(column); cpl_size i; ...
false
false
false
true
false
1
tracing_dentry_percpu(struct trace_array *tr, int cpu) { struct dentry *d_tracer; if (tr->percpu_dir) return tr->percpu_dir; d_tracer = tracing_get_dentry(tr); if (IS_ERR(d_tracer)) return NULL; tr->percpu_dir = tracefs_create_dir("per_cpu", d_tracer); WARN_ONCE(!tr->percpu_dir, "Could not create trac...
false
false
false
false
false
0
kmo_calc_fitted_slitlet_edge(cpl_table *edge_table, int row, int y) { int nr_cols = 0; char *name = NULL; double x = 0.; KMO_TRY { // check inputs KMO_TRY_ASSURE(edge_table != NULL, CPL_ERROR_NULL_INPUT, "Any ...
false
false
false
false
false
0
alps_map_rgb_color(gx_device *pdev, const gx_color_value cv[]) { gx_color_value r, g, b; r = cv[0]; g = cv[1]; b = cv[2]; if (gx_color_value_to_byte(r & g & b) == 0xff) { return (gx_color_index) 0; /* White */ } else { gx_color_value c = gx_max_color_value - r; gx_color_val...
false
false
false
false
false
0
netsnmp_data_list_add_data(netsnmp_data_list **head, const char *name, void *data, Netsnmp_Free_List_Data * beer) { netsnmp_data_list *node; if (!name) { snmp_log(LOG_ERR,"no name provided."); return NULL; } node = netsnmp_create_data_list(name, data, beer); ...
false
false
false
false
false
0
characterStyle(ProcessContext &context, StyleObj *&style, FOTBuilder::CharacterNIC &nic) { ELObj *obj = resolve(context); if (obj) { ELObjDynamicRoot protect(*context.vm().interp, obj); return ((SosofoObj *)obj)->characterStyle(context, style, nic); } return 0; }
false
false
false
false
false
0
cx18_dvb_register(struct cx18_stream *stream) { struct cx18 *cx = stream->cx; struct cx18_dvb *dvb = stream->dvb; struct dvb_adapter *dvb_adapter; struct dvb_demux *dvbdemux; struct dmx_demux *dmx; int ret; if (!dvb) return -EINVAL; dvb->enabled = 0; dvb->stream = stream; ret = dvb_register_adapter(&dvb-...
false
false
false
false
false
0
setMeanAndSTD( CVectorDouble &in_means, CVectorDouble &in_std) { //Assure dimmensions match const size_t N = BASE::m_map.size(); ASSERT_( N == size_t(in_means.size()) ); ASSERT_( N == size_t(in_std.size()) ); m_hasToRecoverMeanAndCov = true; for (size_t i=0; i<N; ++i) { m_map[i].kf_mean = in_means[i]; //updat...
false
false
false
false
false
0
_elm_win_smart_focus_direction(const Evas_Object *obj, const Evas_Object *base, double degree, Evas_Object **direction, double *weight) { const Eina_List *items; void *(*list_data_get)(const...
false
false
false
false
false
0
setup_nongit(const char *cwd, int *nongit_ok) { if (!nongit_ok) die("Not a git repository (or any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT); if (chdir(cwd)) die_errno("Cannot come back to cwd"); *nongit_ok = 1; return NULL; }
false
false
false
false
false
0
L34() {register object *base=vs_base; register object *sup=base+VM34; VC34 vs_check; {object V343; object V344; V343=(base[0]); V344=(base[1]); vs_top=sup; goto TTL; TTL:; {object V345; V345= ((V344))->v.v_self[(long)21]; base[2]= CMPcar((V345)); base[3]= (V343); base[4]= CMPcdr((V345)); vs_top=(vs_base=b...
false
false
false
false
false
0
verify_peer(struct openconnect_info *vpninfo, SSL *https_ssl) { X509 *peer_cert; int ret; peer_cert = SSL_get_peer_certificate(https_ssl); if (vpninfo->servercert) { /* If given a cert fingerprint on the command line, that's all we look for */ ret = check_server_cert(vpninfo, peer_cert); } else { int ...
false
false
false
false
false
0
Generate( Map &map, unsigned char water, unsigned char roughness ) const { water *= 20; HeightMap terrain( map.Width(), map.Height(), roughness ); HeightMap forest( map.Width(), map.Height(), 15 ); // interval for a single terrain type unsigned short interval_land = (2...
false
false
false
false
false
0
addritem_copy_item_group( ItemGroup *item ) { ItemGroup *itemNew; itemNew = NULL; if( item ) { itemNew = addritem_create_item_group(); ADDRITEM_NAME(itemNew) = g_strdup( ADDRITEM_NAME(item) ); itemNew->remarks = g_strdup( item->remarks ); } return itemNew; }
false
false
false
false
false
0
pstore_extent_new(struct pstore_column *parent, uint8_t comp) { struct pstore_extent *self = calloc(sizeof *self, 1); if (!self) return NULL; self->parent = parent; self->comp = comp; self->ops = extent_ops_table[self->comp]; return self; }
false
false
false
false
false
0
goa_oauth_provider_get_identity_sync (GoaOAuthProvider *provider, const gchar *access_token, const gchar *access_token_secret, gchar **out_presentation_identity, ...
false
false
false
true
false
1
build_constrained_array_type (pIIR_TypeList pre, pIIR_Type elt) { pIIR_TypeList itypes = NULL, *itail = &itypes; for (pIIR_TypeList p = pre; p; p = p->rest) { pIIR_Type it, pt = p->first; if (pt->is(VAUL_PRE_INDEX_SUBTYPE_CONSTRAINT)) it = pVAUL_PreIndexSubtypeConstraint(pt)->type;...
false
false
false
false
false
0
alloc_tabpage() { tabpage_T *tp; tp = (tabpage_T *)alloc_clear((unsigned)sizeof(tabpage_T)); if (tp != NULL) { # ifdef FEAT_GUI int i; for (i = 0; i < 3; i++) tp->tp_prev_which_scrollbars[i] = -1; # endif # ifdef FEAT_DIFF tp->tp_diff_invalid = TRUE; # endif #ifdef FEAT_EVAL /* init t: variab...
false
false
false
false
false
0
init_hmac (HMAC_CTX *ctx, const EVP_MD *digest, struct key *key, const struct key_type *kt, const char *prefix) { struct gc_arena gc = gc_new (); HMAC_CTX_init (ctx); HMAC_Init_ex (ctx, key->hmac, kt->hmac_length, digest, NULL); msg (D_HANDSHAKE, "%s: Using %d bit message hash '%s' for HMAC authenti...
false
false
false
false
false
0
gs_point_transform2fixed_rounding(const gs_matrix_fixed * pmat, floatp x, floatp y, gs_fixed_point * ppt) { gs_point fpt; gs_point_transform(x, y, (const gs_matrix *)pmat, &fpt); if (!(f_fits_in_fixed(fpt.x) && f_fits_in_fixed(fpt.y))) return_error(gs_error_limitcheck); ...
false
false
false
false
false
0
IsGline(char *username, char *hostname) { struct Gline *temp; if (!username || !hostname) return (NULL); for (temp = GlineList; temp; temp = temp->next) { if (match(temp->username, username) && match(temp->hostname, hostname)) return (temp); } return (NULL); }
false
false
false
false
false
0
checksum(struct jm *jm) { int count = 64; uint16_t *p = (uint16_t *) jm, sum = 0; while (count--) sum += *p++; /* FIXME: shouldn't this be one value only ? */ return !sum || sum == 1; }
false
false
false
false
false
0
client3_1_rchecksum (call_frame_t *frame, xlator_t *this, void *data) { clnt_args_t *args = NULL; int64_t remote_fd = -1; clnt_conf_t *conf = NULL; gfs3_rchecksum_req req = {0,}; int op_errno = ESTALE; ...
false
false
false
true
false
1
gather_symbols_in_formula_term(Term t, I2list *rsyms, I2list *fsyms) { if (logic_term(t)) { int i; for (i = 0; i < ARITY(t); i++) { if (is_term(t, quant_sym(), 3) && i != 3) ; /* skip quantifier and quantified variable */ else gather_symbols_in_formula_term(ARG(t,i), rsyms, fsyms); } } ...
false
false
false
false
false
0
_fprintShortPwd(FILE *f, direntry_t *entry, int recurs) { if(entry->entry == -3) { putc(getDrive(entry->Dir), f); putc(':', f); if(!recurs) putc('/', f); } else { int i,j; _fprintShortPwd(f, getDirentry(entry->Dir), 1); putc('/',f); for(i=7; i>=0 && entry->dir.name[i] == ' ';i--); for(j=0; j<=i; j+...
false
false
false
false
false
0
alternativesRowChanged(int index) { // Check that index is a valid history item index // If the current entry is a history item or there is no text entered if (index >= 0 && index < searchResults.count()) { CatItem item = searchResults[index]; if ((inputData.count() > 0 && inputData.first().hasLabel(LABEL_HISTO...
false
false
false
false
false
0
qs_set_format(char *s) { regex_t r_apache_err; regex_t r_apache_acc; regex_t r_nj; regex_t r_lx; regex_t r_ngx; if(regcomp(&r_apache_err, "^\\[[a-zA-Z]{3} [a-zA-Z]{3} [0-9]+ [0-9]+:[0-9]+:[0-9]+ [0-9]+\\] \\[[a-zA-Z]+\\] ", REG_EXTENDED) != 0) { fprintf(stderr, "failed to compile regex (err...
false
false
false
false
false
0
finish_typeof (tree expr) { tree type; if (type_dependent_expression_p (expr)) { type = cxx_make_type (TYPEOF_TYPE); TYPEOF_TYPE_EXPR (type) = expr; SET_TYPE_STRUCTURAL_EQUALITY (type); return type; } expr = mark_type_use (expr); type = unlowered_expr_type (expr); if (!typ...
false
false
false
false
false
0
handlePressed(const QModelIndex &index) { if (index.column() == FormTreeModel::Label) { // d->_currentEpisodeModel->activateEpisode(index); } else if (index.column() == FormTreeModel::EmptyColumn1) { d->_delegate->pressedIndex = index; } }
false
false
false
false
false
0
gsr_discard_confirmation_dialog (GSRWindow *window, gboolean closing) { GtkWidget *confirmation_dialog; AtkObject *atk_obj; gint response_id; gboolean ret = TRUE; confirmation_dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (window), GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK...
false
false
false
false
false
0
gen7_get_stolen_reserved(struct drm_i915_private *dev_priv, unsigned long *base, unsigned long *size) { uint32_t reg_val = I915_READ(GEN6_STOLEN_RESERVED); *base = reg_val & GEN7_STOLEN_RESERVED_ADDR_MASK; switch (reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK) { case GEN7_STOLEN_RESERVED_1M: *size = 1024 * ...
false
false
false
false
false
0
e100_tx_timeout_task(struct work_struct *work) { struct nic *nic = container_of(work, struct nic, tx_timeout_task); struct net_device *netdev = nic->netdev; netif_printk(nic, tx_err, KERN_DEBUG, nic->netdev, "scb.status=0x%02X\n", ioread8(&nic->csr->scb.status)); rtnl_lock(); if (netif_running(netdev)) { ...
false
false
false
false
false
0
xmlSecOpenSSLAppKeyCertLoadBIO(xmlSecKeyPtr key, BIO* bio, xmlSecKeyDataFormat format) { xmlSecKeyDataFormat certFormat; xmlSecKeyDataPtr data; X509 *cert; int ret; xmlSecAssert2(key != NULL, -1); xmlSecAssert2(bio != NULL, -1); xmlSecAssert2(format != xmlSecKeyDataFormatUnknown, -1); ...
false
false
false
false
false
0
write_data(void) { if (gdb_opt_ver) { gdb_ver = atoi(gdb_opt_ver); } write_header(); reset_short_handle("WPT"); route_flag = 0; waypt_disp_all(write_waypoint_cb); route_flag = 1; route_disp_all(NULL, NULL, write_waypoint_cb); reset_short_handle("Route"); route_disp_all(write_route_cb, NULL, NU...
false
false
false
false
true
1
audit_update_mark(struct audit_fsnotify_mark *audit_mark, struct inode *inode) { audit_mark->dev = inode ? inode->i_sb->s_dev : AUDIT_DEV_UNSET; audit_mark->ino = inode ? inode->i_ino : AUDIT_INO_UNSET; }
false
false
false
false
false
0
removeAttribute( const DOMString &name, int& exceptioncode ) { LocalName localname; PrefixName prefixname; splitPrefixLocalName(name, prefixname, localname, m_htmlCompat); // FIXME what if attributes(false) == 0? attributes(false)->removeNamedItem(makeId(emptyNamespace, localname.id()), prefixname,...
false
false
false
false
false
0
dex_open(const char *filename) { struct dex_file *dex; struct stat st; dex = vm_zalloc(sizeof *dex); if (!dex) return NULL; dex->dx_fd = open(filename, O_RDONLY); if (dex->dx_fd < 0) { warn("open"); goto error_free_dex; } if (fstat(dex->dx_fd, &st) < 0) { warn("fstat"), NULL; goto error_close_file;...
false
false
false
false
false
0
target_alua_state_check(struct se_cmd *cmd) { struct se_device *dev = cmd->se_dev; unsigned char *cdb = cmd->t_task_cdb; struct se_lun *lun = cmd->se_lun; struct t10_alua_tg_pt_gp *tg_pt_gp; int out_alua_state, nonop_delay_msecs; if (dev->se_hba->hba_flags & HBA_FLAGS_INTERNAL_USE) return 0; if (dev->transpor...
false
false
false
false
false
0
translate_button(const gchar *str, guint *state, guint *button) { gchar **parsed; gchar *l; gint i; gboolean ret = FALSE; parsed = g_strsplit(str, "-", -1); /* first, find the button (last token) */ l = NULL; for (i = 0; parsed[i] != NULL; ++i) l = parsed[i]; if (l == NULL)...
false
false
false
false
true
1
GetDoublesFromList(const char *list, Type listtype, double **data, int *tuple) { int count = DXValue::GetListItemCount(list, listtype); double *values = NULL; int vtuple = 0, nitems = 0; if (count) { int i, index = -1, offset = 0; DXTensor t; // // Get the floating p...
false
false
false
true
false
1
formForIndex(const QModelIndex &item) const { if (!item.isValid()) return 0; TreeItem *it = d->getItem(item); if (it) { if (it->isForm()) { return it->form(); } } return 0; }
false
false
false
false
false
0
e100_load_ucode_wait(struct nic *nic) { const struct firmware *fw; int err = 0, counter = 50; struct cb *cb = nic->cb_to_clean; fw = e100_request_firmware(nic); /* If it's NULL, then no ucode is required */ if (!fw || IS_ERR(fw)) return PTR_ERR(fw); if ((err = e100_exec_cb(nic, (void *)fw, e100_setup_ucode))...
false
false
false
false
false
0
index_fd(unsigned char *sha1, int fd, struct stat *st, enum object_type type, const char *path, unsigned flags) { int ret; size_t size = xsize_t(st->st_size); if (!S_ISREG(st->st_mode)) ret = index_pipe(sha1, fd, type, path, flags); else if (size <= big_file_threshold || type != OBJ_BLOB) ret = index_cor...
false
false
false
false
false
0
emitChanges() { if (!hasPendingChanges) return; // reset 'hasPendingChanges' now, in case of recursion // (testcase: enabling recursive scan in ktorrent, #174920) hasPendingChanges = false; const Private::FilterSettings newSettings = settings; settings = oldSettings; // temporarily ...
false
false
false
false
false
0
analyseContent(HttpConn *conn, HttpPacket *packet) { HttpRx *rx; HttpTx *tx; HttpQueue *q; MprBuf *content; ssize nbytes; rx = conn->rx; tx = conn->tx; content = packet->content; q = tx->queue[HTTP_QUEUE_RX]; mprAssert(httpVerifyQueue(q)); LOG(7, "pro...
false
false
false
false
false
0
nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_delegreturn *dr) { struct nfs4_delegation *dp; stateid_t *stateid = &dr->dr_stateid; struct nfs4_stid *s; __be32 status; struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); if ((status = fh_verify(rqstp, &...
false
false
false
false
false
0
client_msg (XClientMessageEvent *ev) { PRINT_DEBUG (("Received client message.\n")); if (ev->message_type == wm_change_state) { rp_window *win; PRINT_DEBUG (("WM_CHANGE_STATE\n")); win = find_window (ev->window); if (win == NULL) return; if (ev->format == 32 && ev->data.l[0] == ...
false
false
false
false
false
0
CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const { const std::string& extension = GetExtension(pFile); if (extension == "ifc" || extension == "ifczip") { return true; } else if ((!extension.length() || checkSig) && pIOHandler) { // note: this is the common identification for STEP-e...
false
false
false
false
false
0
cms_set1_SignerIdentifier(CMS_SignerIdentifier *sid, X509 *cert, int type) { switch(type) { case CMS_SIGNERINFO_ISSUER_SERIAL: sid->d.issuerAndSerialNumber = M_ASN1_new_of(CMS_IssuerAndSerialNumber); if (!sid->d.issuerAndSerialNumber) goto merr; if (!X509_NAME_set(&sid->d.issuerAndSerialNumber->issuer...
false
false
false
false
false
0
monitor_memory(long *freemem_pages, long *freeswap_pages, long *mem_usage, long *swap_usage) { FILE *mp; char buf[BUFSIZE]; char *arglist[MAXARGS]; int argc ATTRIBUTE_UNUSED; int params; ulong freemem, memtotal, freeswap, swaptotal; if (!file_exists("/proc/meminfo"...
true
true
false
false
true
1
action(struct action *act, int tnum, int nth, int pi, struct file_info *fi, struct gfrep_arg *arg) { int di, max_niter; int ndst = arg->ndst; char **dst = arg->dst; int *dst_port = arg->dst_port; gfarm_error_t e; di = (tnum + pi * nth) % ndst; /* * check whether the destination node already * has the file ...
false
false
false
false
false
0
sxgbe_change_mtu(struct net_device *dev, int new_mtu) { /* RFC 791, page 25, "Every internet module must be able to forward * a datagram of 68 octets without further fragmentation." */ if (new_mtu < MIN_MTU || (new_mtu > MAX_MTU)) { netdev_err(dev, "invalid MTU, MTU should be in between %d and %d\n", MIN_...
false
false
false
false
false
0
image_type_from_data(struct image * image) { unsigned char buf[512]; memset(buf, 0, sizeof(buf)); image_seek(image, 0); image_read(image, buf, sizeof(buf)); if ( memcmp(buf+52, "2NDAPE", 6) == 0 ) return IMAGE_2ND; else if ( memcmp(buf+20, "2ND", 3) == 0 ) return IMAGE_2ND; else if ( memcmp(buf+4, "NOLOSc...
false
false
false
false
false
0
alFilterf(ALuint filter, ALenum param, ALfloat flValue) { ALCcontext *Context; ALCdevice *Device; ALfilter *ALFilter; Context = GetContextRef(); if(!Context) return; Device = Context->Device; if((ALFilter=LookupFilter(Device, filter)) != NULL) { /* Call the appropriate handl...
false
false
false
false
false
0
get_starling_bam_region_string(const starling_options& opt, const starling_deriv_options& dopt) { const int zsize(opt.max_indel_size); const pos_t begin_pos(std::max(0,dopt.report_range.begin_pos-zsize)); const pos_t end_pos(dopt.report_range.end_pos+zsize); std::ostring...
false
false
false
false
false
0
mousedrag(int x,int y) { Cx = x, Cy = y; switch(clicks) { case 1: fake_key(KEY_MDRAG); break; case 2: fake_key(KEY_M2DRAG); break; case 3: fake_key(KEY_M3DRAG); break; } }
false
false
false
false
false
0
write_client_connection(turn_turnserver *server, ts_ur_super_session* ss, ioa_network_buffer_handle nbh, int ttl, int tos) { FUNCSTART; if (!(ss->client_socket)) { ioa_network_buffer_delete(server->e, nbh); FUNCEND; return -1; } else { ++(ss->sent_packets); ss->sent_bytes += (u32bits)ioa_network_buffer_...
false
false
false
false
false
0
IsRunning( void ) { return IsRecording() || IsPlayingBack(); }
false
false
false
false
false
0
io_delay_param(char *s) { if (!s) return -EINVAL; if (!strcmp(s, "0x80")) io_delay_type = CONFIG_IO_DELAY_TYPE_0X80; else if (!strcmp(s, "0xed")) io_delay_type = CONFIG_IO_DELAY_TYPE_0XED; else if (!strcmp(s, "udelay")) io_delay_type = CONFIG_IO_DELAY_TYPE_UDELAY; else if (!strcmp(s, "none")) io_delay_t...
false
false
false
false
false
0
model_set(const char *abbr, const char *rating) { if (!strcmp(abbr, "FOR")) { dstate_setinfo("ups.mfr", "%s", "Best Power"); dstate_setinfo("ups.model", "Fortress %s", rating); return; } if (!strcmp(abbr, "FTC")) { dstate_setinfo("ups.mfr", "%s", "Best Power"); dstate_setinfo("ups.model", "Fortress Teleco...
false
false
false
false
false
0
_e_fm2_dir_load_props_from_parent(const char *path) { E_Fm2_Custom_File *cf; char *parent; if ((!path) || (path[0] == '\0') || (strcmp(path, "/") == 0)) return NULL; parent = ecore_file_dir_get(path); cf = e_fm2_custom_file_get(parent); if (((cf) && (cf->dir) && (cf->dir->prop.in_use)) || (!str...
false
false
false
false
false
0
fib_impl1(uint64_t n) { if (n <= 2) return new BigInt(1); BigInt *a = new BigInt(1); BigInt *b = new BigInt(1); for (uint64_t i = 2; i != n; ++i) { a->add(*b); std::swap(a, b); } delete a; return b; }
false
false
false
false
false
0
strtoul ( const char *p, char **endp, int base ) { unsigned long ret = 0; unsigned int charval; while ( isspace ( *p ) ) p++; if ( base == 0 ) { base = 10; if ( *p == '0' ) { p++; base = 8; if ( ( *p | 0x20 ) == 'x' ) { p++; base = 16; } } } while ( 1 ) { charval = *p; if ( char...
false
false
false
false
false
0
PrintBits(uint8_t byte, int digits) { ASSERT(digits >= 0 && digits <= kBitsPerByte); for (int i = 0; i < digits; i++) { PrintF("%c", ((byte & (1 << i)) == 0) ? '0' : '1'); } }
false
false
false
false
false
0
getItemPointerByUid(const QString &uid) const { // TODO: optimize it foreach (CalendarItem *item, m_sortedByBeginList) if (item->uid() == uid) return item; return 0; }
false
false
false
false
false
0
ProcessFile(FILE *in, bool stripFirstComment) { char s[256]; bool striping = false; while (fgets(s, sizeof(s), in)) { if (stripFirstComment) { char *x = strstr(s, "/*"); if (x) { striping = true; stripFirstComment = false; continue; } } if (striping) { char *x = strstr(s, "*/"); if (...
false
false
false
false
false
0
updateLocalPodcasts( const QList<QPair<QUrl,QUrl> > updatedUrls ) { QList< QPair<QUrl,QUrl> >::const_iterator tempUpdatedUrl = updatedUrls.begin(); for(; tempUpdatedUrl != updatedUrls.end(); ++tempUpdatedUrl ) { foreach( PodcastChannelPtr tempChannel, The::playlistManager()->defaultPodcasts()->chan...
false
false
false
false
false
0
fdd_unload( fdd_t *d ) { d->ready = d->loaded = 0; d->index = d->wrprot = 1; d->disk = NULL; fdd_motoron( d, 0 ); if( d->type == FDD_SHUGART && d->selected ) fdd_head_load( d, 0 ); }
false
false
false
false
false
0
Stage1_free (T *old, int querylength) { List_T p; Spanningelt_T spanningelt; int mod, i; /* Stage1hr_check(*old); */ if (*old) { FREE((*old)->plus_segments); FREE((*old)->minus_segments); for (mod = 0; mod < index1interval; mod++) { for (p = (*old)->plus_spanningset[mod]; p; p = p->rest) ...
false
false
false
false
true
1
sphCreateUnixSocket ( const char * sPath ) { static struct sockaddr_un uaddr; size_t len = strlen ( sPath ); if ( len + 1 > sizeof( uaddr.sun_path ) ) sphFatal ( "UNIX socket path is too long (len=%d)", len ); sphInfo ( "listening on UNIX socket %s", sPath ); memset ( &uaddr, 0, sizeof(uaddr) ); uaddr.sun_fa...
false
false
false
false
true
1
__is_lower_locked (call_frame_t *frame, xlator_t *this) { afr_internal_lock_t *int_lock = NULL; afr_private_t *priv = NULL; afr_local_t *local = NULL; int count = 0; int i = 0; local = frame->local; int_lock = &local->internal_lock; ...
false
false
false
false
false
0
set_multicast (struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); void __iomem *ioaddr = np->ioaddr; u32 hash_table[2]; u16 rx_mode = 0; hash_table[0] = hash_table[1] = 0; /* RxFlowcontrol DA: 01-80-C2-00-00-01. Hash index=0x39 */ hash_table[1] |= 0x02000000; if (dev->flags & IFF_PROMISC) ...
false
false
false
false
false
0
c2600_init(c2600_t *router) { vm_instance_t *vm = router->vm; /* Create the PCI bus */ if (!(vm->pci_bus[0] = pci_bus_create("PCI0",0))) { vm_error(vm,"unable to create PCI data.\n"); return(-1); } /* Create the PCI controller */ if (dev_c2600_pci_init(vm,"c2600_pci",C2600_PCICTRL_...
false
false
false
false
false
0
thex_upload_prepare_tree(char **data_ptr, const struct tth *tth, const struct tth *nodes, size_t n_nodes) { struct dime_record *dime; size_t size; dime = dime_record_alloc(); STATIC_ASSERT(TTH_RAW_SIZE == sizeof nodes[0]); dime_record_set_data(dime, nodes, n_nodes * TTH_RAW_SIZE); dime_record_set_type_uri(dime,...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); DayViewTabContainer *_t = static_cast<DayViewTabContainer *>(_o); switch (_id) { case 0: _t->expandTimeGroup((*reinterpret_cast<...
false
false
false
false
false
0
prefix(const char *name) { const char *s; char *t; if (*name == '"') { s = strchr(name + 1, '"'); t = (char*)emalloc(s - name); strncpy(t, name + 1, s - name - 1); t[s - name - 1] = '\0'; return nsprefix(NULL, t); } s = strchr(name, ':'); if (s) { t = (char*)emalloc(s - name + 1); strn...
false
false
false
false
false
0
RequestData( vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) { vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); vtkInformation* outInfo = outputVector->GetInformationObject(0); vtkImageData *inData = vtkImageData::SafeDownCast( inInfo->Get...
false
false
false
false
false
0
is_irq_mbox_required(struct xgene_enet_pdata *pdata, struct xgene_enet_desc_ring *ring) { if ((pdata->enet_id == XGENE_ENET2) && (xgene_enet_ring_owner(ring->id) == RING_OWNER_CPU)) { return true; } return false; }
false
false
false
false
false
0
driver(int d0,L9BYTE* a6) { switch (d0) { case 0: init(a6); break; case 0x0c: randomnumber(a6); break; case 0x10: driverclg(a6); break; case 0x11: _line(a6); break; case 0x12: fill(a6); break; case 0x13: driverchgcol(a6); break; case 0x01: drivercalcchecksum(a6); break; case 0x02: driverosw...
false
false
false
false
false
0
gf100_gr_ctor(const struct gf100_gr_func *func, struct nvkm_device *device, int index, struct gf100_gr *gr) { int ret; gr->func = func; gr->firmware = nvkm_boolopt(device->cfgopt, "NvGrUseFW", func->fecs.ucode == NULL); ret = nvkm_gr_ctor(&gf100_gr_, device, index, 0x08001000, gr->firmware ||...
false
false
false
false
false
0
Perl_hv_fill(pTHX_ HV const *const hv) { STRLEN count = 0; HE **ents = HvARRAY(hv); PERL_ARGS_ASSERT_HV_FILL; if (ents) { HE *const *const last = ents + HvMAX(hv); count = last + 1 - ents; do { if (!*ents) --count; } while (++ents <= last); } return count; }
false
false
false
false
false
0
pr_mtg_trans(Trans_table *trans_head,FILE *mqfp) { Trans_table *t_pt; Sub_list *sub_pt; for (t_pt = trans_head; t_pt != NULL; t_pt = t_pt->next){ fprintf(mqfp," %d { %d ", t_pt->trans_id, t_pt->pair_id); if(t_pt->s_kind == KIND_ARRAY){ fprintf(mqfp,"A%d[",t_pt->a_info->entry); fo...
false
false
false
false
false
0
r9701_set_datetime(struct device *dev, struct rtc_time *dt) { int ret, year; year = dt->tm_year + 1900; if (year >= 2100 || year < 2000) return -EINVAL; ret = write_reg(dev, RHRCNT, bin2bcd(dt->tm_hour)); ret = ret ? ret : write_reg(dev, RMINCNT, bin2bcd(dt->tm_min)); ret = ret ? ret : write_reg(dev, RSECCNT,...
false
false
false
false
false
0
read_only_collection_tests_real_tear_down (GeeTestCase* base) { ReadOnlyCollectionTests * self; self = (ReadOnlyCollectionTests*) base; _g_object_unref0 (self->test_collection); self->test_collection = NULL; _g_object_unref0 (self->ro_collection); self->ro_collection = NULL; }
false
false
false
false
false
0
output_terminator_chunk(property) Response_Property *property; { if (property->response_error_flag) return; /* * Send a terminator. Entity header is empty. */ if (write_string_all(accepted_out_file, idle_timeout, "0\r\n\r\n") < 0) syslog(LOG_DEBUG, "send failed: (entity terminator)"); ...
false
false
false
false
false
0
sun4ican_set_mode(struct net_device *dev, enum can_mode mode) { int err; switch (mode) { case CAN_MODE_START: err = sun4i_can_start(dev); if (err) { netdev_err(dev, "starting CAN controller failed!\n"); return err; } if (netif_queue_stopped(dev)) netif_wake_queue(dev); break; default: return ...
false
false
false
false
false
0
allowSizeConstraints(bool tf) { if (tf) { sizeConstrained = true; resize(); } else { sizeConstrained = false; // might be dangerous... parentWindow->size_range(MINWIDTH,MINHEIGHT,0,0); } return; }
false
false
false
false
false
0
duplicate(const FWObject *x, bool preserve_id) throw(FWException) { Rule::duplicate(x,preserve_id); const RoutingRule *rx = RoutingRule::constcast(x); if (rx!=NULL) { rule_type = rx->rule_type; sorted_dst_ids = rx->sorted_dst_ids; } return *this; ...
false
false
false
false
false
0