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
dc1394_external_trigger_get_power(dc1394camera_t *camera, dc1394switch_t *pwr) { dc1394error_t err=dc1394_feature_get_power(camera, DC1394_FEATURE_TRIGGER, pwr); DC1394_ERR_RTN(err, "Could not set external trigger"); return err; }
false
false
false
false
false
0
ddf_gray_dither_line_24( cct_dither_table table, unsigned char *input, unsigned char *output, int output_bits_per_pixel, int pixel_count) { switch(output_bits_per_pixel) { case 1: while(pixel_count & 7) pixel_count++; lf_gray_dither_24_1(table.eight_8_dither, input, output, pixel_count); bre...
false
false
false
false
false
0
open(int flags) { bool requestWrite = ((flags & O_RDWR) || (flags & O_WRONLY)); rDebug("open call for %s file", requestWrite ? "writable" : "read only"); int result = 0; // if we have a descriptor and it is writable, or we don't need writable.. if((fd >= 0) && (canWrite || !requestWrite)) { ...
false
false
false
false
false
0
cos_cache_del_attr_list(cosAttributes **pAttrs) { LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_del_attr_list\n",0,0,0); while(*pAttrs) { cosAttributes *pTmp = (*pAttrs)->list.pNext; cos_cache_del_attrval_list(&((*pAttrs)->pAttrValue)); slapi_ch_free((void**)&((*pAttrs)->pAttrName)); slapi_ch_free((void**)&(...
false
false
false
false
false
0
rb_strerrno(int err) { #define defined_error(name, num) if (err == (num)) return (name); #define undefined_error(name) #include "known_errors.inc" #undef defined_error #undef undefined_error return NULL; }
false
false
false
false
false
0
tda9887_configure(struct dvb_frontend *fe) { struct tda9887_priv *priv = fe->analog_demod_priv; int rc; memset(priv->data,0,sizeof(priv->data)); tda9887_set_tvnorm(fe); /* A note on the port settings: These settings tend to depend on the specifics of the board. By default they are set to inactive (bit va...
false
false
false
false
false
0
FlushDatafilesEvent(TIMEEVENT_PARMS) { if (globalreg->subsys_dumpfile_vec.size() == 0) return 1; int r = 0; for (unsigned int x = 0; x < globalreg->subsys_dumpfile_vec.size(); x++) { if (globalreg->subsys_dumpfile_vec[x]->Flush()) r = 1; } if (r) _MSG("Saved data files", MSGFLAG_INFO); return 1; }
false
false
false
false
false
0
destroy_server_conn_state (server_connection_t *conn) { GF_VALIDATE_OR_GOTO ("server", conn, out); if (conn->ltable) { /* TODO */ //FREE (conn->ltable); ; } if (conn->fdtable) gf_fd_fdtable_destroy (conn->fdtable); ...
false
false
false
false
false
0
__rep_txn_applied(env, ip, commit_info, timeout) ENV *env; DB_THREAD_INFO *ip; DB_COMMIT_INFO *commit_info; db_timeout_t timeout; { REP *rep; db_timespec limit, now, t; db_timeout_t duration; struct rep_waitgoal reason; int locked, ret, t_ret; if (commit_info->gen == 0) { __db_errx(env, DB_STR("3580", ...
false
false
false
false
false
0
on_lePuzzleCode_returnPressed () { // First two characters are difficulty int diffint = ui.lePuzzleCode->text ().left (2).toInt (); float diff = (float) diffint / 10.0f; if (diff > 1.0f) diff = 1.0f; else if (diff < 0.0f) diff = 0.0f; int seed = ui.lePuzzleCode->text ().mid (2).toInt (); Generate...
false
false
false
false
false
0
playlist_rewind(playlist_t *pl) { if (pl == NULL) { printf("%s: playlist_rewind(): Internal error: NULL argument\n", __progname); exit(1); } if (pl->program) return; pl->index = 0; }
false
false
false
false
false
0
__pyx_pf_7sklearn_12linear_model_8sgd_fast_12LossFunction_2dloss(struct __pyx_obj_7sklearn_12linear_model_8sgd_fast_LossFunction *__pyx_v_self, double __pyx_v_p, double __pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filenam...
false
false
false
false
false
0
set_keytitle() { legend_key *key = &keyT; c_token++; if (END_OF_COMMAND) { /* set to default */ key->title[0] = NUL; } else { char *s; if ((s = try_to_get_string())) { strncpy(key->title,s,sizeof(key->title)); free(s); } } }
false
false
false
false
false
0
dump_endnode(int dump, char *prompt, Node * node, Port * port) { char *nodename = NULL; if (!dump) return; if (dump == 1) { fprintf(f, "%s {0x%016" PRIx64 "}[%d]\n", prompt, node->nodeguid, node->type == IB_NODE_SWITCH ? 0 : port->portnum); return; } nodename = remap_node_name(node_name_map, nod...
false
false
false
false
false
0
sftk_AuditDeriveKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hBaseKey, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulAttributeCount, CK_OBJECT_HANDLE_PTR phKey, CK_RV rv) { char msg[512]; char mech[MECHANISM_BUFSIZE]; char shKey[32]; char sTlsKeys[128]; NSSAudit...
false
false
false
false
false
0
BrokeredSubmit(const std::list<std::string>& endpoints, const std::list<JobDescription>& descs, std::list<Job>& jobs, const std::list<std::string>& requestedSubmissionInterfaces) { JobConsumerList jcl(jobs); addConsumer(jcl); SubmissionStatus ok = BrokeredSubmit(endpoints, descs); removeConsumer(jcl); ...
false
false
false
false
false
0
ProbeHash(int depth, int * score, simpleMoveT * bestMove, bool * isOnlyMove) { // Clear the best move: if(bestMove != NULL) { bestMove->from = bestMove->to = NULL_SQUARE; } if(TranTableSize == 0) { return SCORE_NONE; } unsigned int hash = Pos.HashValue(); colorT stm...
false
false
false
false
false
0
json_object_get(const json_t *json, const char *key) { json_object_t *object; if(!json_is_object(json)) return NULL; object = json_to_object(json); return hashtable_get(&object->hashtable, key); }
false
false
false
false
false
0
_ipmi_ssif_multi_part_write (ipmi_ssif_ctx_t ctx, int dev_fd, const uint8_t *buf, size_t buf_len) { union ipmi_i2c_smbus_data data; size_t i, middle_parts, mpart, index; assert (ctx); assert (ctx->magic == IPMI_SSIF_CTX_MAGI...
false
false
false
false
false
0
GetPeriodicEwaldJij(double J_i, double J_j, vector3 dx, bool isSameAtom, matrix3x3 unitcell, matrix3x3 fourier, double cellVolume, int numNeighbors[]) { int u, v, w; double R_ij, a_ij, h_2, orbital = 0.0, alpha = 0.0, beta = 0.0; vector3 uvw, rlv; // Calculate unit-cell-independent data a_ij = sq...
false
false
false
false
false
0
update(CdlTransaction transact, CdlNode source, CdlProperty source_prop, CdlNode dest, CdlUpdate change) { CYG_REPORT_FUNCNAMETYPE("CdlListExpression::update", "result %d"); CYG_REPORT_FUNCARG6XV(this, transact, source, source_prop, dest, change); CYG_PRECONDITION_THISC(); CYG_PRECONDITION_CLASSC(source...
false
false
false
false
false
0
get_server_identity_key(void) { tor_assert(server_identitykey); tor_assert(server_mode(get_options())); assert_identity_keys_ok(); return server_identitykey; }
false
false
false
false
false
0
GPS_D403_Get(GPS_PWay* way, UC* s) { UC* p; int32 i; p=s; (*way)->prot = 403; for (i=0; i<6; ++i) { (*way)->ident[i] = *p++; } (*way)->lat = GPS_Math_Semi_To_Deg(GPS_Util_Get_Int(p)); p+=sizeof(int32); (*way)->lon = GPS_Math_Semi_To_Deg(GPS_Util_Get_Int(p)); p+=sizeof(int32); p+=sizeof(in...
false
false
false
false
false
0
clocksource_start_watchdog(void) { if (watchdog_running || !watchdog || list_empty(&watchdog_list)) return; init_timer(&watchdog_timer); watchdog_timer.function = clocksource_watchdog; watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL; add_timer_on(&watchdog_timer, cpumask_first(cpu_online_mask)); watchdog_r...
false
false
false
false
false
0
mei_me_irq_quick_handler(int irq, void *dev_id) { struct mei_device *dev = (struct mei_device *)dev_id; struct mei_me_hw *hw = to_me_hw(dev); u32 hcsr; hcsr = mei_hcsr_read(dev); if (!(hcsr & H_CSR_IS_MASK)) return IRQ_NONE; hw->intr_source = hcsr & H_CSR_IS_MASK; dev_dbg(dev->dev, "interrupt source 0x%08X.\...
false
false
false
false
false
0
ves_icall_System_Net_Dns_GetHostByName_internal (MonoString *host, MonoString **h_name, MonoArray **h_aliases, MonoArray **h_addr_list) { gboolean add_local_ips = FALSE, add_info_ok = TRUE; gchar this_hostname [256]; MonoAddressInfo *info = NULL; char *hostname = mono_string_to_utf8 (host); int hint = get_addrinfo...
false
false
false
false
false
0
audit_log_user_comm_message(int audit_fd, int type, const char *message, const char *comm, const char *hostname, const char *addr, const char *tty, int result) { char buf[MAX_AUDIT_MESSAGE_LENGTH]; char addrbuf[INET6_ADDRSTRLEN]; static char exename[PATH_MAX*2]=""; char commname[PATH_MAX*2]; char ttyname[TTY_PAT...
false
false
false
false
false
0
__isns_db_insert(isns_db_t *db, isns_object_t *obj, unsigned int state) { uint32_t idx_tag = obj->ie_template->iot_index; switch (obj->ie_state) { case ISNS_OBJECT_STATE_LIMBO: /* The object was in limbo; now it goes * live (again). It should have an index, * and it should be on the global id_objects * l...
false
false
false
false
false
0
rt2x00lib_uninitialize(struct rt2x00_dev *rt2x00dev) { if (!test_and_clear_bit(DEVICE_STATE_INITIALIZED, &rt2x00dev->flags)) return; /* * Stop rfkill polling. */ if (rt2x00_has_cap_flag(rt2x00dev, REQUIRE_DELAYED_RFKILL)) rt2x00rfkill_unregister(rt2x00dev); /* * Allow the HW to uninitialize. */ rt2x0...
false
false
false
false
false
0
Stage3_position_cmp (const void *a, const void *b) { T x = * (T *) a; T y = * (T *) b; int querypos1, querypos2; if (x->genomicstart < y->genomicstart) { return -1; } else if (y->genomicstart < x->genomicstart) { return +1; } else if (x->genomicend < y->genomicend) { return -1; } else if (y->...
false
false
false
false
false
0
resolve_grain_map(gint *m, gint i, gint j) { gint ii, jj, k; /* Find what i and j fully resolve to */ for (ii = i; m[ii] != ii; ii = m[ii]) ; for (jj = j; m[jj] != jj; jj = m[jj]) ; k = MIN(ii, jj); /* Fix partial resultions to full */ for (ii = m[i]; m[ii] != ii; ii = m[ii...
false
false
false
false
false
0
trans_2_pos(int id, struct ilist *pos) { int n, i; struct clause *c; struct proof_object_node *pn; struct ilist *new, *p1; if (pos == NULL) abend("trans_2_pos: NULL pos"); pn = retrieve_from_gen_tab(New_proof_tab, id); if (pn == NULL) abend("trans_2_pos: proof node not found"); c = pn->c...
false
false
false
true
false
1
lookup_nat_in_journal(struct f2fs_sb_info *sbi, u32 nid, struct f2fs_nat_entry *raw_nat) { struct curseg_info *curseg = CURSEG_I(sbi, CURSEG_HOT_DATA); struct f2fs_summary_block *sum = curseg->sum_blk; int i = 0; for (i = 0; i < nats_in_cursum(sum); i++) { if (le32_to_cpu(nid_in_journal(sum, i)) == nid) { mem...
false
true
false
false
false
1
isPredefined(const char *ident) { static const char* reserved[] = { "DigitalMars", "GNU", "LDC", "SDC", "Windows", "Win32", "Win64", "linux", "OSX", "FreeBSD", "OpenBSD", "NetBSD", "DragonFlyBSD", "BS...
false
false
false
false
false
0
make_tt_load_map(view_map_t *xmap, view_map_t *vmap) { piece_info_t *p; (void) memcpy (xmap, vmap, sizeof (view_map_t) * MAP_SIZE); /* mark loading armies */ for (p = comp_obj[ARMY]; p; p = p->piece_link.next) if (p->func == 1) /* loading army? */ xmap[p->loc].contents = '$'; if (print_vm...
false
false
false
false
false
0
icalproperty_set_x_name(icalproperty* prop, char* name) { struct icalproperty_impl *impl = (struct icalproperty_impl*)prop; icalerror_check_arg_rv( (name!=0),"name"); icalerror_check_arg_rv( (prop!=0),"prop"); if (impl->x_name != 0) { free(impl->x_name); } impl->x_name = icalmemory_st...
false
false
false
false
false
0
propagate_block (bb, live, local_set, cond_local_set, flags) basic_block bb; regset live; regset local_set; regset cond_local_set; int flags; { struct propagate_block_info *pbi; rtx insn, prev; int changed; pbi = init_propagate_block_info (bb, live, local_set, cond_local_set, flags); ...
false
false
false
false
true
1
free_list(struct list *list) { int i; if (list->alloc == 0) return; for (i = 0; i < list->nr; i++) { free(list->list[i]); free(list->payload[i]); } free(list->list); free(list->payload); list->nr = list->alloc = 0; }
false
false
false
false
false
0
redraft_prompt(char *type, char *prompt, int failure) { if(background_posting(FALSE)){ q_status_message1(SM_ORDER, 0, 3, _("%s folder unavailable while background posting"), type); return(failure); } return(want_to(prompt, 'y', 'x', NO_HELP, WT_NORM)); }
false
false
false
false
false
0
ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct ixgb_adapter *adapter = netdev_priv(netdev); u32 speed = ethtool_cmd_speed(ecmd); if (ecmd->autoneg == AUTONEG_ENABLE || (speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL)) return -EINVAL; if (netif_running(adapter->netdev)) {...
false
false
false
false
false
0
_parse_cmd(client_req_t *req) { int i = 0, len = 0; len = strlen (MCMD_KEY"="); if (! strncmp(req->buf, MCMD_KEY"=", len)) { req->cmd = MCMD_KEY; /* XXX: mcmd=spawn */ req->sep = '\n'; req->term = '\n'; return SLURM_SUCCESS; } len = strlen (CMD_KEY"="); if (strncmp(req->buf, CMD_KEY"=", len)) { er...
false
false
false
false
false
0
acpi_thermal_get_temperature(struct acpi_thermal *tz) { acpi_status status = AE_OK; unsigned long long tmp; if (!tz) return -EINVAL; tz->last_temperature = tz->temperature; status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); if (ACPI_FAILURE(status)) return -ENODEV; tz->temperature = ...
false
false
false
false
false
0
Init() { static ClassDocumentation<MEGammaP2Jets> documentation ("The MEGammaP2Jets class implements the matrix elements" " for pointlike photon-hadron to jets."); static Parameter<MEGammaP2Jets,int> interfaceMinimumFlavour ("MinimumFlavour", "The minimum flavour of the quarks", &MEGammaP2J...
false
false
false
false
false
0
buttonpressed(int id) { tdialogbox::buttonpressed(id); switch (id) { case 1: case 2: action = id; break; } }
false
false
false
false
false
0
get_buff_value(IFLAG type, void *data, int offset, void *value) { switch (type) { /* float data type */ case (VOL_DTYPE_FLOAT): *((float *)value) = ((float *)data)[offset]; break; /* double data type */ case (VOL_DTYPE_DOUBLE): *((double *)value) = ((double *)data)[offset]; break; /* unsupported da...
false
false
false
false
false
0
findVtblIndex(Dsymbols *vtbl, int dim) { FuncDeclaration *mismatch = NULL; StorageClass mismatchstc = 0; int mismatchvi = -1; int exactvi = -1; int bestvi = -1; for (int vi = 0; vi < dim; vi++) { FuncDeclaration *fdv = (*vtbl)[vi]->isFuncDeclaration(); if (fdv && fdv->ident =...
false
false
false
false
false
0
seriesChanged() { // series changed so tell power hist powerHist->setSeries(static_cast<RideFile::SeriesType>(seriesCombo->itemData(seriesCombo->currentIndex()).toInt())); powerHist->setDelta(getDelta()); powerHist->setDigits(getDigits()); // now update the slider stepper and linedit setBinEdit...
false
false
false
false
false
0
gifti_free_CoordSystem( giiCoordSystem * cs ) { if( !cs ) return 0; if( G.verb > 3 ) fprintf(stderr,"-- freeing giiCoordSystem\n"); if( cs->dataspace ) { free(cs->dataspace); cs->dataspace = NULL; } if( cs->xformspace ) { free(cs->xformspace); cs->xformspace = NULL; } free(cs); return 0; }
false
false
false
false
false
0
gfire_filetransfer_request_accepted(PurpleXfer *p_xfer) { if(!p_xfer) return; purple_debug_info("gfire", "P2P: file transfer request accepted\n"); gfire_filetransfer *ft = p_xfer->data; #ifdef _WIN32 if((ft->file = _sopen(purple_xfer_get_local_filename(p_xfer), _O_CREAT | _O_WRONLY | _O_TRUNC | _O_BINARY, ...
false
false
false
false
true
1
__cpufreq_notify_transition(struct cpufreq_policy *policy, struct cpufreq_freqs *freqs, unsigned int state) { BUG_ON(irqs_disabled()); if (cpufreq_disabled()) return; freqs->flags = cpufreq_driver->flags; pr_debug("notification %u of frequency transition to %u kHz\n", state, freqs->new); switch (state) {...
false
false
false
false
false
0
smsc47m192_update_device(struct device *dev) { struct smsc47m192_data *data = dev_get_drvdata(dev); struct i2c_client *client = data->client; int i, config; mutex_lock(&data->update_lock); if (time_after(jiffies, data->last_updated + HZ + HZ / 2) || !data->valid) { u8 sfr = i2c_smbus_read_byte_data(client, S...
false
false
false
false
false
0
zcond(i_ctx_t *i_ctx_p) { os_ptr op = osp; es_ptr ep = esp; /* Push the array on the e-stack and call the continuation. */ if (!r_is_array(op)) return_op_typecheck(op); check_execute(*op); if ((r_size(op) & 1) != 0) return_error(e_rangecheck); if (r_size(op) == 0) re...
false
false
false
false
false
0
plugin_load(PurplePlugin *plugin) { PidginBuddyList *gtkblist = PIDGIN_BLIST(purple_get_blist()); /* Set the buddy list pref to invisible. If Pidgin is loading, the buddy list will still get hidden. Otherwise, we don't want to do anything anyway. */ if (purple_prefs_get_bool(pref_blist_autohide)) { purp...
false
false
false
false
false
0
nxt_motor_record(nxt_t *nxt,int motor,double t,nxt_motor_record_callback callback,void *data) { struct timeval tv, starttv; int rot; int err; double time = 0; int capacity = 256; int fill_counter = 0; //nxt_set_motor(nxt,motor,0,0,NXT_MOTORON,NXT_REGMODE_MOTOR_SPEED,0); nxt_motor_stop(nxt, motor, 0); ...
false
false
false
false
false
0
addRigidBody(btRigidBody* body) { if (!body->isStaticOrKinematicObject() && !(body->getFlags() &BT_DISABLE_WORLD_GRAVITY)) { body->setGravity(m_gravity); } if (body->getCollisionShape()) { if (!body->isStaticObject()) { m_nonStaticRigidBodies.push_back(body); } else { body->setActivationState(ISLA...
false
false
false
false
false
0
aisc_init_client( aisc_com *link ) { int len,mes_cnt; mes_cnt = 2; link->aisc_mes_buffer[0] = mes_cnt-2; link->aisc_mes_buffer[1] = AISC_INIT+link->magic; len = aisc_c_write(link->socket, (char *)(link->aisc_mes_buffer), mes_cnt * sizeof(long)); if (!len) { link->error = err_connection_p...
false
false
false
false
false
0
readRequest(_mhClientCtx_t *cctx, mhRequest_t **preq) { mhRequest_t *req = *preq; bucket_t *bkt; apr_status_t status = APR_SUCCESS; bkt = cctx->stream; if (req == NULL) { apr_size_t len; STATUSREADERR(bkt->type->peek(bkt, &len)); if (!len) return status; ...
false
false
false
false
false
0
tcsd_threads_init(void) { /* allocate the thread mgmt structure */ tm = calloc(1, sizeof(struct tcsd_thread_mgr)); if (tm == NULL) { LogError("malloc of %zd bytes failed.", sizeof(struct tcsd_thread_mgr)); return TCSERR(TSS_E_OUTOFMEMORY); } /* initialize mutex */ MUTEX_INIT(tm->lock); /* set the max thread...
false
false
false
false
false
0
_k_slotEntries( KIO::Job*, const KIO::UDSEntryList & list ) { KIO::UDSEntryList::ConstIterator it = list.begin(); KIO::UDSEntryList::ConstIterator end = list.end(); for (; it != end; ++it) { const KIO::UDSEntry& entry = *it; const bool isLink = !entry.stringValue( KIO::UDSEntry::UDS_LINK_DES...
false
false
false
false
false
0
cifs_set_ops(struct inode *inode) { struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); switch (inode->i_mode & S_IFMT) { case S_IFREG: inode->i_op = &cifs_file_inode_ops; if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) { if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL) inode->i_fop = &cifs_file_dir...
false
false
false
false
false
0
clutter_scroll_actor_set_final_state (ClutterAnimatable *animatable, const char *property_name, const GValue *value) { if (strcmp (property_name, "scroll-to") == 0) { ClutterScrollActor *self = CLUTTER_SCROLL_ACTOR (anim...
false
false
false
false
false
0
filteringprop_copy(FilteringProp *src) { FilteringProp * new; GSList *tmp; new = g_new0(FilteringProp, 1); new->matchers = g_new0(MatcherList, 1); for (tmp = src->matchers->matchers; tmp != NULL && tmp->data != NULL;) { MatcherProp *matcher = (MatcherProp *)tmp->data; new->matchers->matchers = g_slist_ap...
false
false
false
false
false
0
abraca_medialib_construct (GType object_type, GtkWindow* window, AbracaClient* c) { AbracaMedialib * self = NULL; AbracaClient* _tmp0_; AbracaClient* _tmp1_; GtkWindow* _tmp2_; GtkWindow* _tmp3_; g_return_val_if_fail (window != NULL, NULL); g_return_val_if_fail (c != NULL, NULL); self = (AbracaMedialib*) g_obje...
false
false
false
false
false
0
Internal_Tilde_Expand (register char *s, register char **dirp) { register char *p; #ifdef HAVE_PWD_H struct passwd *pw, *getpwnam(); #endif if (*s++ != '~') return 0; for (p = s; *p && *p != '/'; p++) ; if (*p == '/') *p++ = 0; #ifdef HAVE_PWD_H if (*s == '\0') { if ((*d...
false
false
false
false
false
0
Has(int number) const { map<int, Extension>::const_iterator iter = extensions_.find(number); if (iter == extensions_.end()) return false; GOOGLE_DCHECK(!iter->second.is_repeated); return !iter->second.is_cleared; }
false
false
false
false
false
0
H5Itype_exists(H5I_type_t type) { htri_t ret_value = TRUE; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("t", "It", type); if(type <= H5I_BADID || type >= H5I_next_type) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number") if(NULL == H5I_id_type_list_g[type]) ...
false
false
false
false
false
0
content_cache_insert(int rid, Blob *pBlob){ struct cacheLine *p; if( contentCache.n>500 || contentCache.szTotal>50000000 ){ i64 szBefore; do{ szBefore = contentCache.szTotal; content_cache_expire_oldest(); }while( contentCache.szTotal>50000000 && contentCache.szTotal<szBefore ); } if( co...
false
false
false
false
false
0
write_busy() { guint64 fc; if (! ee_busy && ! m_write_protect) { fc = (guint64)(get_cycles().instruction_cps() * 0.005); get_cycles().set_break(get_cycles().get() + fc, this); ee_busy = true; } }
false
false
false
false
false
0
Dialog_ChooseDate(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder) : Gtk::Dialog(cobject), m_calendar(0) { builder->get_widget("calendar", m_calendar); m_calendar->signal_day_selected_double_click().connect(sigc::mem_fun(*this, &Dialog_ChooseDate::on_day_selected_double_click)); }
false
false
false
false
false
0
load_history(void) { char *fn = history_file(); char buf[512]; FILE *f; loaded = 1; maxhist = curhistpos = 0; if ((f = fopen(fn, "r"))) { while(!feof(f)) { fgets(buf, sizeof(buf), f); if (!feof(f)) { buf[strlen(buf) - 1] = '\0'; if (curhistpos > MAX_HIST - 1) shrink_hist(); history[curhi...
true
true
false
false
true
1
ur_addr_map_put(ur_addr_map* map, ioa_addr* key, ur_addr_map_value_type value) { if(!ur_addr_map_valid(map)) return -1; else { addr_list_header* slh = get_addr_list_header(map, key); addr_elem* elem = addr_list_get(slh, key); if(elem) { elem->value=value; } else { addr_list_add(slh,k...
false
false
false
false
false
0
AddArc(vtkIdType nodeId0, vtkIdType nodeId1) { if (!vtkReebGraphIsSmaller(this, nodeId0, nodeId1, this->GetNode(nodeId0), this->GetNode(nodeId1))) vtkReebGraphSwapVars(vtkIdType, nodeId0, nodeId1); vt...
false
false
false
false
false
0
release_b_st(struct Channel *chanp) { struct PStack *st = chanp->b_st; if (test_and_clear_bit(FLG_START_B, &chanp->Flags)) { chanp->bcs->BC_Close(chanp->bcs); switch (chanp->l2_active_protocol) { case (ISDN_PROTO_L2_X75I): releasestack_isdnl2(st); break; case (ISDN_PROTO_L2_HDLC): case (ISDN_PROTO_L2...
false
false
false
false
false
0
do_cmd_uninscribe(cmd_code code, cmd_arg args[]) { object_type *o_ptr = object_from_item_idx(args[0].item); if (obj_has_inscrip(o_ptr)) msg("Inscription removed."); o_ptr->note = 0; p_ptr->notice |= (PN_COMBINE | PN_SQUELCH | PN_SORT_QUIVER); p_ptr->redraw |= (PR_INVEN | PR_EQUIP); }
false
false
false
false
false
0
features() { std::list<std::string> res; if (ne_has_support(NE_FEATURE_SSL)) { res.push_back("SSL"); } if (ne_has_support(NE_FEATURE_ZLIB)) { res.push_back("ZLIB"); } if (ne_has_support(NE_FEATURE_IPV6)) { res.push_back("IPV6"); } if (ne_has_support(NE_FEATURE_LFS)) { res.push_back("LFS"); } if...
false
false
false
false
false
0
H5G_node_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key) { H5G_node_key_t *key = (H5G_node_key_t *) _key; FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(shared); HDassert(raw); HDassert(key); H5F_DECODE_LENGTH_LEN(raw, key->offset, shared->sizeof_len); FUNC_LEAVE_NOAPI(...
false
false
false
false
false
0
attrset(a) int a; { do_aend(); if (a == A_BOLD) { do_MD(); aend = ME; } else if (a == A_UNDERLINE) { do_US(); aend = UE; } else if (a == A_ALTCHARSET) { do_AS(); aend = AE; } else { aend = ""; } }
false
false
false
false
false
0
IoUser_protoName(IoUser *self, IoObject *locals, IoMessage *m) { /*doc User name Returns the current user's name. */ char *userName = (char *)getlogin(); if (userName == NULL) { userName = getenv("LOGNAME"); } if (userName == NULL) { return IONIL(self); } return IOSYMBOL(userName); }
false
false
false
false
false
0
gc_config(const char *var, const char *value, void *cb) { if (!strcmp(var, "gc.packrefs")) { if (value && !strcmp(value, "notbare")) pack_refs = -1; else pack_refs = git_config_bool(var, value); return 0; } if (!strcmp(var, "gc.aggressivewindow")) { aggressive_window = git_config_int(var, value); ret...
false
false
false
false
false
0
matmult(float **mat1,float **mat2) { float **mat=newmat(0); int i,j,k; for(i=0;i<MSIZE;i++) for(j=0;j<MSIZE;j++) for(k=0;k<MSIZE;k++) mat[i][j]+=mat1[i][k]*mat2[k][j]; matfree(mat1); matfree(mat2); return mat; }
false
false
false
false
false
0
xlator_foreach (xlator_t *this, void (*fn)(xlator_t *each, void *data), void *data) { xlator_t *first = NULL; xlator_t *old_THIS = NULL; GF_VALIDATE_OR_GOTO ("xlator", this, out); GF_VALIDATE_OR_GOTO ("xlator", fn, out); ...
false
false
false
false
false
0
wl12xx_cmd_croc(struct wl1271 *wl, u8 role_id) { struct wl12xx_cmd_croc *cmd; int ret = 0; wl1271_debug(DEBUG_CMD, "cmd croc (%d)", role_id); cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); if (!cmd) { ret = -ENOMEM; goto out; } cmd->role_id = role_id; ret = wl1271_cmd_send(wl, CMD_CANCEL_REMAIN_ON_CHANNEL, cmd...
false
false
false
false
false
0
hash_iter_next(struct hash_iter_context_t *iter_arg) { struct _hash_iter_context_t *iter = (struct _hash_iter_context_t *) iter_arg; hash_entry_t *entry; if (iter->table == NULL) return NULL; goto state_3a; state_1: iter->i++; if(iter->i >= iter->table->segment_count) return NULL; /* test...
false
false
false
false
false
0
OnAddSeparator(cb_unused wxCommandEvent& event) { cbTool tool; tool.SetName(CB_TOOLS_SEPARATOR); tool.SetCommand(CB_TOOLS_SEPARATOR); Manager::Get()->GetToolsManager()->AddTool(&tool); DoFillList(); }
false
false
false
false
false
0
patientUuid(const QString &usualname, const QString &othernames, const QString &firstname, const QString &gender, const QDate &dob) const { QSqlDatabase DB = QSqlDatabase::database(Con...
false
false
false
false
false
0
ladish_studio_dbus_delete_room(struct cdbus_method_call * call_ptr) { const char * name; dbus_error_init(&cdbus_g_dbus_error); if (!dbus_message_get_args(call_ptr->message, &cdbus_g_dbus_error, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID)) { cdbus_error(call_ptr, DBUS_ERROR_INVALID_ARGS, "Invalid arguments...
false
false
false
false
false
0
cloog_equal_vector_simplify(CloogEqualities *equal, cloog_int_t *vector, int length, int level, int nb_par) { int i, j ; cloog_int_t gcd, factor_vector, factor_equal, temp_vector, temp_equal; struct cloog_vec *simplified; simplified = cloog_vec_alloc(length); cloog_seq_cpy(simplified->p, vector, length)...
false
false
false
false
false
0
xtables_strtoui(const char *s, char **end, unsigned int *value, unsigned int min, unsigned int max) { uintmax_t v; bool ret; ret = xtables_strtoul(s, end, &v, min, max); if (value != NULL) *value = v; return ret; }
false
false
false
false
true
1
rsxx_eeh_frozen(struct pci_dev *dev) { struct rsxx_cardinfo *card = pci_get_drvdata(dev); int i; int st; dev_warn(&dev->dev, "IBM Flash Adapter PCI: preparing for slot reset.\n"); card->eeh_state = 1; rsxx_mask_interrupts(card); /* * We need to guarantee that the write for eeh_state and masking * interrup...
false
false
false
false
false
0
module_input_callback(struct module *m) { unsigned char buffer[8192], *p=buffer; int r; if(!(m->pid)) { sieve_modules(); return; } r=read(m->in_fd, buffer, sizeof(buffer)); if(r<0 && errno!=EINTR) { perror("module"); close(m->in_fd); close(m->out_fd); m->in_fd=m->out_fd=-1; #ifdef HA...
true
true
false
false
true
1
uidset () { char buff[INT_STRLEN_BOUND(uid_t) + 1], *b; register SHELL_VAR *v; b = inttostr (current_user.uid, buff, sizeof (buff)); v = find_variable ("UID"); if (v == 0) { v = bind_variable ("UID", b, 0); VSETATTR (v, (att_readonly | att_integer)); } if (current_user.euid != current_...
false
false
false
false
false
0
hasContext(const Context &context) const { for (int i = 0; i < m_context.size(); ++i) { if (context.contains(m_context.at(i))) return true; } return false; }
false
false
false
false
false
0
wnck_pager_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { WnckPager *pager; int workspace_size; int focus_width; int width; int height; pager = WNCK_PAGER (widget); gtk_widget_style_get (GTK_WIDGET (pager), "focus-line-width", &focus_width, NULL); ...
false
false
false
false
false
0
ffplsw( fitsfile *fptr, /* I - FITS file pointer */ int *status) /* IO - error status */ /* Write the LONGSTRN keyword and a series of related COMMENT keywords which document that this FITS header may contain long string keyword values which are continued over multiple keywords using...
false
false
false
false
false
0
ges_timeline_pipeline_get_thumbnail_buffer (GESTimelinePipeline * self, GstCaps * caps) { GstElement *sink; GstBuffer *buf; sink = self->priv->playsink; if (!sink) { GST_WARNING ("thumbnailing can only be done if we have a playsink"); return NULL; } buf = ges_play_sink_convert_frame (sink, cap...
false
false
false
false
false
0
DefaultFatalErrorHandler(const char* location, const char* message) { #ifdef ENABLE_VMSTATE_TRACKING i::VMState __state__(i::OTHER); #endif API_Fatal(location, message); }
false
false
false
false
false
0
sync() { Q_D(KConfig); if (isImmutable() || name().isEmpty()) { // can't write to an immutable or anonymous file. return; } if (d->bDirty && d->mBackend) { const QByteArray utf8Locale(locale().toUtf8()); // Create the containing dir, maybe it wasn't there d->mB...
false
false
false
false
false
0
bbar_event_init_dispatcher(void) { buttonbar_t *bbar; /* FIXME: The event subsystem needs to be able to pass a pointer to the event data structure. */ EVENT_DATA_ADD_HANDLER(buttonbar->event_data, EnterNotify, bbar_handle_enter_notify); EVENT_DATA_ADD_HANDLER(buttonbar->event_data, LeaveNotify, bbar_h...
false
false
false
false
false
0
HtmlStyleCounters(pTree, zName, aValue, nValue) HtmlTree *pTree; const char *zName; int *aValue; int nValue; { int ii; StyleApply *p = (StyleApply *)(pTree->pStyleApply); int n = 0; for (ii = 0; ii < p->nCounter && n < nValue; ii++) { if (0 == strcmp(zName, p->apCounter[ii]->zN...
false
false
false
false
false
0
_swipe_cancel(void *data) { Elm_Gen_Item *it = data; if (!it) return ECORE_CALLBACK_CANCEL; GL_IT(it)->wsd->swipe = EINA_FALSE; GL_IT(it)->wsd->movements = 0; return ECORE_CALLBACK_RENEW; }
false
false
false
false
false
0