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
bindtextdomain(const char* domainname,const char* dirname) { if (dir) free(dir); if (!(dir=strdup(dirname))) return 0; return dir; }
false
false
false
false
false
0
createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* /*ignoreMe*/) { //void* ignoreMe -> we could think of recursive multi-sap, if someone is interested void* mem = btAlignedAlloc(si...
false
false
false
false
false
0
marshal_struct (DBusMessageIter *iter, const GValue *value) { GType gtype; DBusMessageIter subiter; guint size, i; GValue val = {0,}; gtype = G_VALUE_TYPE (value); size = dbus_g_type_get_struct_size (gtype); if (!dbus_message_iter_open_container (iter, ...
false
false
false
false
false
0
menu_get_current_item(Menu *menu) { return (MenuItem*) ((menu != NULL) ? menu_get_subitem(menu, menu->data.menu.selector_pos) : NULL); }
false
false
false
false
false
0
list_proxies_foreach (gpointer key, gpointer value, gpointer user_data) { DBusGProxyList *list; GSList **ret; GSList *tmp; list = value; ret = user_data; tmp = list->proxies; while (tmp != NULL) { DBusGProxy *proxy = DBUS_G_PROXY (tmp->data); ...
false
false
false
false
false
0
id_verb(void) /* Identify verb at ip=i ; return verb id if found, 0 otherwise */ { word w; int j, canon_word, tmp; w=comb_verb(); /* Combine 2-word verbs */ if (w==0) return 0; /* Pre-Canonization of w: see if w has any built-in synonyms */ canon_word=verb_builtin(w); if (canon_word!=0) { if (aver...
false
false
false
false
false
0
uconf_log_file_preference_write_xml(const output::pointer &fp, const char *name, uconf_log_file_preference_ty this_thing, bool show) { if (this_thing == 0) { if (!show || type_enum_option_query()) return; } assert(name); assert(this_thing < uconf_log_file_preference_max); fp->fputc('<'); ...
false
false
false
false
false
0
amp_group_node_update_node (AmpGroupNode *group, AmpGroupNode *new_group) { gint i; GHashTable *hash; if (group->monitor != NULL) { g_object_unref (group->monitor); group->monitor = NULL; } if (group->makefile != NULL) { g_object_unref (group->makefile); group->monitor = NULL; } if (group->preset_toke...
false
true
false
false
false
1
builtin_scale(GwyNLFitPreset *preset, gdouble *param, gdouble xscale, gdouble yscale, gint dir) { guint i; g_return_if_fail(preset->builtin); if (preset->builtin->scale_params) { preset->builtin->scale_params(preset, param, xscale, yscale, di...
false
false
false
false
false
0
gpiod_direction_input(struct gpio_desc *desc) { struct gpio_chip *chip; int status = -EINVAL; if (!desc || !desc->chip) { pr_warn("%s: invalid GPIO\n", __func__); return -EINVAL; } chip = desc->chip; if (!chip->get || !chip->direction_input) { gpiod_warn(desc, "%s: missing get() or direction_input() ...
false
false
false
false
false
0
aclnewowner(const Acl *old_acl, Oid oldOwnerId, Oid newOwnerId) { Acl *new_acl; AclItem *new_aip; AclItem *old_aip; AclItem *dst_aip; AclItem *src_aip; AclItem *targ_aip; bool newpresent = false; int dst, src, targ, num; check_acl(old_acl); /* * Make a copy of the given A...
false
false
false
false
false
0
H5F_accum_reset(const H5F_t *f, hid_t dxpl_id, hbool_t flush) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) HDassert(f); HDassert(f->shared); /* Flush any dirty data in accumulator, if requested */ if(flush) if(H5F_accum_flush(f, dxpl_id) < 0) ...
false
false
false
false
false
0
IsDuplicateDescription(pkgCache::DescIterator Desc, MD5SumValue const &CurMd5, std::string const &CurLang) { // Descriptions in the same link-list have all the same md5 if (Desc.end() == true || MD5SumValue(Desc.md5()) != CurMd5) return false; for (; Desc.end() == false; ++Desc) if (Desc.Lan...
false
false
false
false
false
0
tiadc_step_config(struct iio_dev *indio_dev) { struct tiadc_device *adc_dev = iio_priv(indio_dev); struct device *dev = adc_dev->mfd_tscadc->dev; unsigned int stepconfig; int i, steps = 0; /* * There are 16 configurable steps and 8 analog input * lines available which are shared between Touchscreen and ADC. ...
false
false
false
false
false
0
put_ebml_size_unknown(ByteIOContext *pb, int bytes) { assert(bytes <= 8); put_byte(pb, 0x1ff >> bytes); while (--bytes) put_byte(pb, 0xff); }
false
false
false
false
false
0
newScene() { //Save if necessary //saveOrCancelDialog == false <=> cancel if ( !saveOrCancelDialog() ) return; //Clear the scene reinitScene( START_SCENE_RECT ); mGraphicsView->centerOn( 0 , 0 ); mGraphicsView->setTransform( QTransform() ); //Update states setWindowFilePath(""); updateWindowState(); ...
false
false
false
false
false
0
showAllFields(void){ int i; cgi_printf("<font color=\"blue\">\n" "<p>Database fields:</p><ul>\n"); for(i=0; i<nField; i++){ cgi_printf("<li>aField[%d].zName = \"%h\";\n" "originally = \"%h\";\n" "currently = \"%h\"\";\n",(i),(aField[i].zName),(aField[i].zValue),(PD(aField[i].zNa...
false
false
false
false
false
0
handle_client(socket_struct *ns, player *pl) { int len, i; unsigned char *data; /* Loop through this - maybe we have several complete packets here. */ while (1) { /* If it is a player, and they don't have any speed left, we * return, and will read in the data when they do have time. ...
false
false
false
false
false
0
ap_proxyerror(request_rec *r, int statuscode, const char *message) { const char *uri = ap_escape_html(r->pool, r->uri); apr_table_setn(r->notes, "error-notes", apr_pstrcat(r->pool, "The proxy server could not handle the request <em><a href=\"", uri, "\">", ap_escape_html(r->pool,...
false
false
false
false
false
0
nls_list_add(nls_node *ent, nls_node *item) { nls_list *list; nls_node *tail, *new; tail = nls_list_tail_entry(ent); list = &(tail->nn_list); new = nls_list_new(item); if (!new) { return 1; } list->nl_rest = nls_grab(new); return 0; }
false
false
false
false
false
0
ep_alloc_request(struct usb_ep *ep, gfp_t gfp_flags) { struct ci_hw_req *hwreq = NULL; if (ep == NULL) return NULL; hwreq = kzalloc(sizeof(struct ci_hw_req), gfp_flags); if (hwreq != NULL) { INIT_LIST_HEAD(&hwreq->queue); INIT_LIST_HEAD(&hwreq->tds); } return (hwreq == NULL) ? NULL : &hwreq->req; }
false
false
false
false
false
0
ssh_auth_reply_default(ssh_session session,int partial) { char methods_c[128] = {0}; ssh_string methods = NULL; int rc = SSH_ERROR; if (buffer_add_u8(session->out_buffer, SSH2_MSG_USERAUTH_FAILURE) < 0) { return rc; } if (session->auth_methods == 0) { session->auth_methods = SSH_AUTH_METHOD_PUBLIC...
false
false
false
false
false
0
readilist(ivec,z,n0,n1,pad) char *z; int *ivec, n0, n1, pad; { int i, n, nd; n = 1; for (i=0; i<strlen(z); i++) if (z[i]==',') { z[i]=' '; n++; } if (n>n1) { WARN(("too many items in ilist")); n = n1; } for (i=0; i<n; i++) { nd = sscanf(z,"%d",&ivec[i]); if (nd!=1) WARN(("problem scaning ilist...
false
false
false
false
false
0
storeLastIndex() { // if first run, or invalid previous index if (lastIndex[1] < 0 || lastIndex[1] >= q->count()) { lastIndex[0] = q->currentIndex(); } else { lastIndex[0] = lastIndex[1]; } lastIndex[1] = q->currentIndex(); }
false
false
false
false
false
0
sinfo_balance_companion_matrix (double *m, size_t nc) { int not_converged = 1; double row_norm = 0; double col_norm = 0; while (not_converged) { size_t i, j; double g, f, s; not_converged = 0; for (i = 0; i < nc; i++) { /* column norm, excluding the diagonal */ i...
false
false
false
false
false
0
hb_string_isdigit(gchar *str) { gboolean valid = TRUE; while(*str && valid) valid = g_ascii_isdigit(*str++); return valid; }
false
false
false
false
false
0
hashcash_valid_for( time_t token_time, long validity_period, long grace_period, time_t now_time ) { long expiry_time = 0 ; /* for ever -- return infinity */ if ( validity_period == 0 ) { return HASHCASH_VALID_FOREVER; } /* future date in token */ if ( token_time > now_time + grace_period ) { ...
false
false
false
false
false
0
tray_added (NaTrayManager *manager, GtkWidget *icon, TraysScreen *trays_screen) { NaTray *tray; NaTrayPrivate *priv; int position; tray = get_tray (trays_screen); if (tray == NULL) return; priv = tray->priv; g_assert (priv->trays_screen == trays_screen); g_hash_tabl...
false
false
false
false
false
0
flipToLittleEndian(void* pData, size_t size, size_t count) { if(mFlipEndian) { Bitwise::bswapChunks(pData, size, count); } }
false
false
false
false
false
0
local_connect( git_transport *transport, const char *url, git_cred_acquire_cb cred_acquire_cb, void *cred_acquire_payload, int direction, int flags) { git_repository *repo; int error; transport_local *t = (transport_local *) transport; const char *path; git_buf buf = GIT_BUF_INIT; GIT_UNUSED(cred_acquire_cb...
false
false
false
false
false
0
ax25_aton_entry(const char *name, char *buf) { int ct = 0; int ssid = 0; const char *p = name; char c; while (ct < 6) { c = toupper(*p); if (c == '-' || c == '\0') break; if (!isalnum(c)) { printf("axutils: invalid symbol in callsign '%s'\n", name); return -1; } buf[ct] = c << 1; p++; ...
false
false
false
false
false
0
S_incpush_if_exists(pTHX_ AV *const av, SV *dir, SV *const stem) { dVAR; Stat_t tmpstatbuf; PERL_ARGS_ASSERT_INCPUSH_IF_EXISTS; if (PerlLIO_stat(SvPVX_const(dir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) { av_push(av, dir); dir = newSVsv(stem); } else { /* Truncate dir back to stem. ...
false
false
false
false
false
0
dentry_lru_add(struct dentry *dentry) { if (unlikely(!(dentry->d_flags & DCACHE_LRU_LIST))) d_lru_add(dentry); }
false
false
false
false
false
0
input_string_internal (struct data_in *data_in, struct lto_input_block *ib, unsigned int *rlen) { struct lto_input_block str_tab; unsigned int len; unsigned int loc; const char *result; loc = lto_input_uleb128 (ib); LTO_INIT_INPUT_BLOCK (str_tab, data_in->strings, loc, data_in->strings_len); len...
false
false
false
false
false
0
assignchaingapcostfunction( GtChain2Dimkind chainkind, bool gapsL1) { if (chainkind == GLOBALCHAININGWITHOVERLAPS) { return gt_chain2dim_overlapcost; } if (chainkind != GLOBALCHAININGALLCHAINS && chai...
false
false
false
false
false
0
ChangeXHeight(FontViewBase *fv,CharViewBase *cv, struct xheightinfo *xi) { int cnt, enc, gid; SplineChar *sc; SplineFont *sf = fv!=NULL ? fv->sf : cv->sc->parent; int layer = fv!=NULL ? fv->active_layer : CVLayer(cv); extern int detect_diagonal_stems; int dds = detect_diagonal_stems; detect...
false
false
false
false
false
0
cgraph_node_can_be_local_p (struct cgraph_node *node) { return (!node->symbol.address_taken && !cgraph_for_node_and_aliases (node, cgraph_node_cannot_be_local_p_1, NULL, true)); }
false
false
false
false
false
0
hrequest_new(void) { hrequest_t *req; if (!(req = (hrequest_t *) malloc(sizeof(hrequest_t)))) { log_error1("malloc failed"); return NULL; } req->method = HTTP_REQUEST_GET; req->version = HTTP_1_1; req->query = NULL; req->header = NULL; req->in = NULL; req->attachments = NULL; req->content_...
false
false
false
false
false
0
b64_encode(struct archive_string *as, const unsigned char *p, size_t len) { int c; for (; len >= 3; p += 3, len -= 3) { c = p[0] >> 2; archive_strappend_char(as, base64[c]); c = ((p[0] & 0x03) << 4) | ((p[1] & 0xf0) >> 4); archive_strappend_char(as, base64[c]); c = ((p[1] & 0x0f) << 2) | ((p[2] & 0xc0) >> ...
false
false
false
false
false
0
pm860x_bulk_read(struct i2c_client *i2c, int reg, int count, unsigned char *buf) { struct pm860x_chip *chip = i2c_get_clientdata(i2c); struct regmap *map = (i2c == chip->client) ? chip->regmap : chip->regmap_companion; int ret; ret = regmap_raw_read(map, reg, buf, count); return ret; }
false
false
false
false
false
0
features_show(struct device *_d, struct device_attribute *attr, char *buf) { struct virtio_device *dev = dev_to_virtio(_d); unsigned int i; ssize_t len = 0; /* We actually represent this as a bitstring, as it could be * arbitrary length in future. */ for (i = 0; i < sizeof(dev->features)*8; i++) len +...
false
true
false
false
false
1
p_do_2nd_filter_dialogs(char *filter_procname, GapFiltPdbApplyMode l_apply_mode, char *last_frame_filename, gint32 sel_mode, gint32 sel_case, gint32 sel_invert, char *sel_pattern, gboolean operate_on...
true
true
false
false
false
1
do_crypt(FILE* in, FILE* out, int action, char* key_str){ /* Local Vars */ /* Buffers */ unsigned char inbuf[BLOCKSIZE]; int inlen; /* Allow enough space in output buffer for additional cipher block */ unsigned char outbuf[BLOCKSIZE + EVP_MAX_BLOCK_LENGTH]; int outlen; int writelen; ...
false
false
false
false
true
1
e_filter_part_eq (EFilterPart *part_a, EFilterPart *part_b) { GList *link_a, *link_b; g_return_val_if_fail (E_IS_FILTER_PART (part_a), FALSE); g_return_val_if_fail (E_IS_FILTER_PART (part_b), FALSE); if (g_strcmp0 (part_a->name, part_b->name) != 0) return FALSE; if (g_strcmp0 (part_a->title,...
false
false
false
false
false
0
ADLStateToInternal(const std::string& s, bool optional, Logger& logger) { if(s == "ACCEPTED") { return "ACCEPTED"; } else if(s == "PREPROCESSING") { return "PREPARING"; } else if(s == "PROCESSING") { return "INLRMS"; } else if(s == "PROCESSING-ACCEPTING") { } else if(s == "PROCESSIN...
false
false
false
false
false
0
acpi_pad_notify(acpi_handle handle, u32 event, void *data) { struct acpi_device *device = data; switch (event) { case ACPI_PROCESSOR_AGGREGATOR_NOTIFY: acpi_pad_handle_notify(handle); acpi_bus_generate_netlink_event(device->pnp.device_class, dev_name(&device->dev), event, 0); break; default: pr_warn("U...
false
false
false
false
false
0
byteoffset (lua_State *L) { size_t len; const char *s = luaL_checklstring(L, 1, &len); lua_Integer n = luaL_checkinteger(L, 2); lua_Integer posi = (n >= 0) ? 1 : len + 1; posi = u_posrelat(luaL_optinteger(L, 3, posi), len); luaL_argcheck(L, 1 <= posi && --posi <= (lua_Integer)len, 3, "po...
false
false
false
false
false
0
mprCreateHash(int hashSize, int flags) { MprHash *hash; if ((hash = mprAllocObj(MprHash, manageHashTable)) == 0) { return 0; } if (hashSize < MPR_DEFAULT_HASH_SIZE) { hashSize = MPR_DEFAULT_HASH_SIZE; } if ((hash->buckets = mprAllocZeroed(sizeof(MprKey*) * hashSize)) == 0) {...
false
false
false
false
false
0
solveIntegerProgramIneq(IntegerMatrix const &M, IntegerVector const &rightHandSide, IntegerVector &solution) { int d=M.getHeight(); int n=M.getWidth(); IntegerMatrix M2(d,n+d); for(int i=0;i<d;i++) { for(int j=0;j<n;j++) M2[i][j]=M[i][j]; M2[i][n+i]=-1; } AsciiPrinter P(Stderr); P....
false
false
false
false
false
0
H5IMmake_image_8bit( hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, const unsigned char *buf ) { hsize_t dims[IMAGE8_RANK]; /* Initialize the image dimensions */ dims[0] = heigh...
false
false
false
false
false
0
get_base_socket_path (apr_pool_t *pool, xsp_data *conf) { if (conf->filename && conf->filename [0]) return conf->filename; else return get_default_socket_name (pool, conf->alias, SOCKET_FILE); }
false
false
false
false
false
0
set_request_path_attr(struct inode *rinode, struct dentry *rdentry, const char *rpath, u64 rino, const char **ppath, int *pathlen, u64 *ino, int *freepath) { int r = 0; if (rinode) { r = build_inode_path(rinode, ppath, pathlen, ino, freepath); dout(" inode %p %llx.%llx\n", rinode, ceph_ino(rino...
false
false
false
false
false
0
xfs_qm_init_quotainfo( xfs_mount_t *mp) { xfs_quotainfo_t *qinf; int error; xfs_dquot_t *dqp; ASSERT(XFS_IS_QUOTA_RUNNING(mp)); qinf = mp->m_quotainfo = kmem_zalloc(sizeof(xfs_quotainfo_t), KM_SLEEP); error = list_lru_init(&qinf->qi_lru); if (error) goto out_free_qinf; /* * See if quotainodes are setu...
false
false
false
false
false
0
wtp_pdu_type(Octstr *data) { long bitpos; long lastpos = -1; long lastnumbits = -1; long lastval = -1; int thistype; /* This code looks slow, but an optimizing compiler will * reduce it considerably. gcc -O2 will produce a single * call to octstr_get_bits, folllowed by a sequence of * tests on lastval. */...
false
false
false
false
false
0
SyncChr(void) { int i; for (i = 0; i < 8; i++) setchr1(i << 10, chr[i]); setmirror(mirr ^ 1); }
false
false
false
false
false
0
iscsi_tcp_event_handler(int fd, int events, void *data) { struct iscsi_connection *conn = (struct iscsi_connection *) data; if (events & EPOLLIN) iscsi_rx_handler(conn); if (conn->state == STATE_CLOSE) dprintf("connection closed\n"); if (conn->state != STATE_CLOSE && events & EPOLLOUT) iscsi_tx_handler(con...
false
false
false
false
false
0
ch_wrap(Var *var) { if (screen_mode < 0) /* e.g., called by init_variables() */ return 1; redraw_window(display_screen, 0); transmit_window_size(); return 1; }
false
false
false
false
false
0
globus_l_gfs_data_active_kickout( void * user_arg) { globus_l_gfs_data_active_bounce_t * bounce_info; globus_gfs_finished_info_t reply; GlobusGFSName(globus_l_gfs_data_active_kickout); GlobusGFSDebugEnter(); bounce_info = (globus_l_gfs_data_active_bounc...
false
false
false
false
false
0
set_rotation_rate (UDisksDrive *iface, UDisksLinuxDevice *device) { gint rate; if (!g_udev_device_get_sysfs_attr_as_boolean (device->udev_device, "queue/rotational")) { rate = 0; } else { rate = -1; if (device->ata_identify_device_data != NULL) { ...
false
false
false
false
false
0
krb5int_fast_process_error(krb5_context context, struct krb5int_fast_request_state *state, krb5_error **err_replyptr, krb5_pa_data ***out_padata, krb5_boolean *retry) { krb5_error_code retval = 0; krb5_er...
false
false
false
true
false
1
cgit_print_refs() { html("<table class='list nowrap'>"); if (ctx.qry.path && !strncmp(ctx.qry.path, "heads", 5)) cgit_print_branches(0); else if (ctx.qry.path && !strncmp(ctx.qry.path, "tags", 4)) cgit_print_tags(0); else { cgit_print_branches(0); html("<tr class='nohover'><td colspan='4'>&nbsp;</td></tr>...
false
false
false
false
false
0
minimal_update(int p) { if (damage() & FL_DAMAGE_ALL) return; // don't waste time if it won't be done if (damage() & FL_DAMAGE_EXPOSE) { if (p < mu_p) mu_p = p; } else { mu_p = p; } damage(FL_DAMAGE_EXPOSE); erase_cursor_only = 0; }
false
false
false
false
false
0
RemapValue(SDValue &N) { DenseMap<SDValue, SDValue>::iterator I = ReplacedValues.find(N); if (I != ReplacedValues.end()) { // Use path compression to speed up future lookups if values get multiply // replaced with other values. RemapValue(I->second); N = I->second; // Note that it is possible t...
false
false
false
false
false
0
vector_print(char *s, int n, real *x){ int i; printf("%s{",s); for (i = 0; i < n; i++) { if (i > 0) printf(","); printf("%f",x[i]); } printf("}\n"); }
false
false
false
false
false
0
last_argument(void) { char **av = NULL; char *p; el_status_t s; int ac; if (H.Size == 1 || (p = (char *)H.Lines[H.Size - 2]) == NULL) return el_ring_bell(); p = strdup(p); if (!p) return CSstay; ac = argify(p, &av); if (Repeat != NO_ARG) ...
false
false
false
false
false
0
httpGetParam(HttpConn *conn, cchar *var, cchar *defaultValue) { MprHash *vars; cchar *value; vars = httpGetParams(conn); value = mprLookupKey(vars, var); return (value) ? value : defaultValue; }
false
false
false
false
false
0
Terminate(gn_data *data, struct gn_statemachine *state) { if (AT_DRVINST(state)) { if (AT_DRVINST(state)->cached_capabilities) { map_free(&(AT_DRVINST(state)->cached_capabilities)); AT_DRVINST(state)->cached_capabilities = NULL; } if (AT_DRVINST(state)->timezone) { free(AT_DRVINST(state)->timezone); ...
false
false
false
false
false
0
check_box_dirichlet (GfsBox * box, CompatPar * p) { FttDirection d; for (d = 0; d < FTT_NEIGHBORS; d++) if (GFS_IS_BOUNDARY (box->neighbor[d])) { GfsBoundary * b = GFS_BOUNDARY (box->neighbor[d]); GfsBc * bc = gfs_boundary_lookup_bc (b, p->lhs); if (GFS_IS_BC_DIRICHLET (bc)) { p->dirichlet = ...
false
false
false
false
false
0
filewrjobfull(File *f, job j) { int nl; fileaddjob(f, j); nl = strlen(j->tube->name); return filewrite(f, j, &nl, sizeof nl) && filewrite(f, j, j->tube->name, nl) && filewrite(f, j, &j->r, sizeof j->r) && filewrite(f, j, j->body, j->r.body_size); }
false
false
false
false
false
0
tcp_idle_timeout(gpointer user_data) { struct server_data *server = user_data; DBG(""); if (server == NULL) return FALSE; destroy_server(server); return FALSE; }
false
false
false
false
false
0
ProcessBody( char* szBuffer, int nBufLength, bool bEOF ) { bool MoreBodyNeeded = false; for ( list<SignatureInfo>::iterator i = Signatures.begin(); i != Signatures.end(); ++i ) { if ( i->Status == DKIM_SUCCESS ) { if ( i->BodyCanonicalization == DKIM_CANON_SIMPLE ) { if (nBufLength > 0) ...
false
false
false
false
false
0
il3945_hw_nic_init(struct il_priv *il) { int rc; unsigned long flags; struct il_rx_queue *rxq = &il->rxq; spin_lock_irqsave(&il->lock, flags); il3945_apm_init(il); spin_unlock_irqrestore(&il->lock, flags); il3945_set_pwr_vmain(il); il3945_nic_config(il); /* Allocate the RX queue, or reset if it is already a...
false
false
false
false
false
0
MousePoint(mproto) int mproto; { last_mouse_act = LMA_NONE; if (MouseParams(mproto)) SetCursor(); }
false
false
false
false
false
0
udf_put_super(struct super_block *sb) { struct udf_sb_info *sbi; sbi = UDF_SB(sb); iput(sbi->s_vat_inode); #ifdef CONFIG_UDF_NLS if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) unload_nls(sbi->s_nls_map); #endif if (!(sb->s_flags & MS_RDONLY)) udf_close_lvid(sb); brelse(sbi->s_lvid_bh); udf_sb_free_partitions(sb...
false
false
false
false
false
0
gm_dup(greymap_t *gm) { greymap_t *gm1 = gm_new(gm->w, gm->h); if (!gm1) { return NULL; } memcpy(gm1->map, gm->map, gm->w*gm->h*2); return gm1; }
false
false
false
false
false
0
e_init_status_set(const char *str) { if (!init_exe) return; // printf("---STAT %p %s\n", client, str); if (!client) { stats = eina_list_append(stats, eina_stringshare_add(str)); return; } // printf("---SEND\n"); ecore_ipc_client_send(client, E_IPC_DOMAIN_INIT, 1, 0, 0, 0, (void *)...
false
false
false
false
false
0
conn_ov_running(struct drbd_connection *connection) { struct drbd_peer_device *peer_device; bool rv = false; int vnr; rcu_read_lock(); idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { struct drbd_device *device = peer_device->device; if (device->state.conn == C_VERIFY_S || device->state...
false
false
false
false
false
0
create_happiness_dialog(struct city *pcity) { int i; struct happiness_dialog *pdialog; GtkWidget *ebox, *label, *table; static const char *happiness_label_str[NUM_HAPPINESS_MODIFIERS] = { N_("Cities:"), N_("Luxuries:"), N_("Buildings:"), N_("Units:"), N_("Wonders:"), }; static bool happ...
false
false
false
false
false
0
newScope(const char* name) { if (name[0] == '_') ++name; int len = strlen(current()) + strlen(name) + 2; char* str = new char[len]; strcpy(str, current()); if (str[0] != '\0') strcat(str, "/"); strcat(str, name); new Prefix(str, 0); }
false
false
false
false
false
0
ldbm_back_monitor_search(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *entryAfter, int *returncode, char *returntext, void *arg) { struct ldbminfo *li = (struct ldbminfo *)arg; struct berval val; struct berval *vals[2]; char buf[BUFSIZ]; DB_MPOOL_STAT *mpstat = NULL; DB_MPOOL_FSTAT **mpfsta...
false
false
false
false
false
0
Ndf1dimN(int Nvec, double x, double *p, double *xi, unsigned long n, double *stimuli, int *locator, unsigned long Nspikes, unsigned long Ntrials) { unsigned long j; double df1 = 0.0; for(j = 1; j <= n; j++) xt[j] = p[j + (Nvec-1)*n] + x * xi[j]; (*nrdfundN)(Nvec, x, p, xt, df, stimuli, n, locator, Nspikes, Nt...
false
false
false
false
false
0
pi_create( const opj_image_t *image, const opj_cp_t *cp, OPJ_UINT32 tileno ) { // loop OPJ_UINT32 pino, compno; // number of poc in the p_pi OPJ_UINT32 l_poc_bound; // pointers to tile coding parameters and components. opj_pi_iterator_t *l_pi = ...
false
true
false
false
true
1
cmd_log_walk(struct rev_info *rev) { struct commit *commit; int saved_nrl = 0; int saved_dcctc = 0; if (rev->early_output) setup_early_output(rev); if (prepare_revision_walk(rev)) die(_("revision walk setup failed")); if (rev->early_output) finish_early_output(rev); /* * For --check and --exit-code, ...
false
false
false
false
false
0
evutil_check_ifaddrs(void) { #if defined(EVENT__HAVE_GETIFADDRS) /* Most free Unixy systems provide getifaddrs, which gives us a linked list * of struct ifaddrs. */ struct ifaddrs *ifa = NULL; const struct ifaddrs *i; if (getifaddrs(&ifa) < 0) { event_warn("Unable to call getifaddrs()"); return -1; } for (...
false
false
false
false
false
0
wgrow(W *w) { W *nextw; /* If we're the last window on the screen, shrink the previous window */ if ((w->link.next == w->t->topwin || w->link.next->y == -1) && w != w->t->topwin) return wshrink(w->link.prev->main); /* Get to next variable size window */ for (nextw = w->link.next; nextw->fixed && nextw != w->t-...
false
false
false
false
false
0
xlog_state_done_syncing( xlog_in_core_t *iclog, int aborted) { struct xlog *log = iclog->ic_log; spin_lock(&log->l_icloglock); ASSERT(iclog->ic_state == XLOG_STATE_SYNCING || iclog->ic_state == XLOG_STATE_IOERROR); ASSERT(atomic_read(&iclog->ic_refcnt) == 0); ASSERT(iclog->ic_bwritecnt == 1 || iclo...
false
false
false
false
false
0
hid_debug_rdesc_show(struct seq_file *f, void *p) { struct hid_device *hdev = f->private; const __u8 *rdesc = hdev->rdesc; unsigned rsize = hdev->rsize; int i; if (!rdesc) { rdesc = hdev->dev_rdesc; rsize = hdev->dev_rsize; } /* dump HID report descriptor */ for (i = 0; i < rsize; i++) seq_printf(f, "%0...
false
false
false
false
false
0
RaParseComplete (int sig) { long long total_count, total_dst_count, total_src_count; long long total_bytes, total_dst_bytes, total_src_bytes; if ((sig >= 0) && aflag) { putchar ('\n'); total_src_count = tcp_src_count + udp_src_count + icmp_src_count + ip_src_count + arp_src_count + nonip...
false
false
false
false
false
0
adjust_rcv_timeout(struct qib_ctxtdata *rcd, int npkts) { struct qib_devdata *dd = rcd->dd; u32 timeout = dd->cspec->rcvavail_timeout[rcd->ctxt]; /* * Dynamically adjust idle timeout on chip * based on number of packets processed. */ if (npkts < rcv_int_count && timeout > 2) timeout >>= 1; else if (npkts ...
false
false
false
false
false
0
getusershell (void) { char *ret; if (curshell == NULL) curshell = initshells(); ret = *curshell; if (ret != NULL) curshell++; return (ret); }
false
false
false
false
false
0
xmlSecGCryptDigestFinalize(xmlSecTransformPtr transform) { xmlSecGCryptDigestCtxPtr ctx; xmlSecAssert(xmlSecGCryptDigestCheckId(transform)); xmlSecAssert(xmlSecTransformCheckSize(transform, xmlSecGCryptDigestSize)); ctx = xmlSecGCryptDigestGetCtx(transform); xmlSecAssert(ctx != NULL); if(ctx-...
false
false
false
false
false
0
cache_fetch_done(long art_no) { int i; i = cache_find(trail_cache, trail_size, art_no); if (i >= 0) trail_cache[i].status = StatusOk; else fprintf(stderr, "done but no node %ld\n", art_no); if (cache_notice) show_cache_stats(); }
false
false
false
false
false
0
P_ArtiTele(player_t * player) { int i; int selections; fixed_t destX; fixed_t destY; angle_t destAngle; if (deathmatch) { selections = deathmatch_p - deathmatchstarts; i = P_Random() % selections; destX = deathmatchstarts[i].x << FRACBITS; destY = deathmatchs...
false
false
false
false
false
0
g_vfs_ftp_dir_cache_purge_file (GVfsFtpDirCache * cache, const GVfsFtpFile *file) { GVfsFtpFile *dir; g_return_if_fail (cache != NULL); g_return_if_fail (file != NULL); if (g_vfs_ftp_file_is_root (file)) return; dir = g_vfs_ftp_file_new_parent (file); g_vfs_ftp_dir_cache_purge_dir (cache...
false
false
false
false
false
0
fixup_var_refs_insns (insn, var, promoted_mode, unsignedp, toplevel, may_share) rtx insn; rtx var; enum machine_mode promoted_mode; int unsignedp; int toplevel; rtx may_share; { while (insn) { /* fixup_var_refs_insn might modify insn, so save its next pointer now. */ ...
false
false
false
false
false
0
resetAllContactItemNames() { Q3PtrListIterator<Entry> it(d->roster); for(Entry *e; (e = it.current()); ++it) { Q3PtrListIterator<ContactViewItem> cvi_it(e->cvi); for(ContactViewItem *i; (i = cvi_it.current()); ++cvi_it) { i->resetName(); contactView()->filterContact(i); } } }
false
false
false
false
false
0
getTagObject() { if (getTagging()) { string tagobj_id = getOptionsObject()->getStr("tagobject_id"); if (!tagobj_id.empty()) { return getRoot()->findInIndex( FWObjectDatabase::getIntId(tagobj_id)); } } return NULL; }
false
false
false
false
false
0
get_user_cmd_nargs(xp, idx) expand_T *xp UNUSED; int idx; { static char *user_cmd_nargs[] = {"0", "1", "*", "?", "+"}; if (idx >= (int)(sizeof(user_cmd_nargs) / sizeof(user_cmd_nargs[0]))) return NULL; return (char_u *)user_cmd_nargs[idx]; }
false
false
false
false
false
0
tiger_compress(hash_state *md, unsigned char *buf) #endif { ulong64 a, b, c, x[8]; unsigned long i; /* load words */ for (i = 0; i < 8; i++) { LOAD64L(x[i],&buf[8*i]); } a = md->tiger.state[0]; b = md->tiger.state[1]; c = md->tiger.state[2]; pass(&a,&b,&c,x,5); key_sche...
false
false
false
false
false
0
BackupNumber(const char *Pos, const char *FirstChar) { // If we didn't stop in the middle of a number, don't backup. if (!isNumberChar(*Pos)) return Pos; // Otherwise, return to the start of the number. bool HasPeriod = false; while (Pos > FirstChar && isNumberChar(Pos[-1])) { // Backup over at most one ...
false
false
false
false
true
1