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
isiout_write( fields *info, FILE *fp, param *p, unsigned long refnum ) { int type = get_type( info ); if ( p->format_opts & BIBL_FORMAT_VERBOSE ) output_verbose( info, refnum ); output_type( fp, type ); output_people( fp, info, "AUTHOR", "AU", 0 ); output_easyall( fp, info, "AUTHOR:CORP", "AU", 0...
false
false
false
false
false
0
lis3lv02d_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { int ret = 0; struct lis3lv02d_platform_data *pdata = client->dev.platform_data; #ifdef CONFIG_OF if (of_match_device(lis3lv02d_i2c_dt_ids, &client->dev)) { lis3_dev.of_node = client->dev.of_node; ret = lis3lv02d_init_dt(&lis3_...
false
false
false
false
false
0
gdk_mesh_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data, MeshT *mesh, /* the mesh point affected */ int *mi, int *mj, int *mlabel, enum tools *action, /* what was done: */ gboolean readonly) { //int mi; i...
false
false
false
false
false
0
__repmgr_member_metadata_unmarshal(env, argp, bp, max, nextp) ENV *env; __repmgr_member_metadata_args *argp; u_int8_t *bp; size_t max; u_int8_t **nextp; { if (max < __REPMGR_MEMBER_METADATA_SIZE) goto too_few; DB_NTOHL_COPYIN(env, argp->format, bp); DB_NTOHL_COPYIN(env, argp->version, bp); if (nextp != NULL...
false
false
false
false
false
0
if_convertible_gimple_assign_stmt_p (gimple stmt, vec<data_reference_p> refs) { tree lhs = gimple_assign_lhs (stmt); basic_block bb; if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, "-------------------------\n"); print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM); } ...
false
false
false
false
false
0
store_info_load (CamelStoreSummary *s, FILE *in) { CamelNNTPStoreInfo *ni; ni = (CamelNNTPStoreInfo *) CAMEL_STORE_SUMMARY_CLASS (camel_nntp_store_summary_parent_class)->store_info_load (s, in); if (ni) { if (camel_file_util_decode_string (in, &ni->full_name) == -1) { camel_store_summary_info_...
false
false
false
false
false
0
fp_getline( FILE *fp, ConfigArgs *c ) { char *p; lcur = 0; CATLINE(buf); c->lineno++; /* avoid stack of bufs */ if ( strncasecmp( line, "include", STRLENOF( "include" ) ) == 0 ) { buf[0] = '\0'; c->line = line; return(1); } while ( fgets( buf, sizeof( buf ), fp ) ) { p = strchr( buf, '\n' ); if ( p...
false
false
false
false
true
1
getDataPending(size_t peerId) const { if(peerId >= maxClients || sockets[peerId].state != Working) { Network::callError(Network::InvalidSlot); return -1; } return sockets[peerId].bytesRecieved; }
false
false
false
false
false
0
apply_alpha (GdkPixbuf *pixbuf, MetaAlphaGradientSpec *spec, gboolean force_copy) { GdkPixbuf *new_pixbuf; gboolean needs_alpha; g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL); needs_alpha = spec && (spec->n_alphas > 1 || sp...
false
false
false
false
false
0
tty_get(void) { char c; int r; tty_flush(); if (Pushed) { Pushed = 0; return PushBack; } if (*Input) return *Input++; do { r= read(0, &c, (SIZE_T)1); } while (r == -1 && errno == EINTR); return r == 1 ? c : EOF; }
false
false
false
false
false
0
ChecksumDump(unsigned char digest[EVP_MAX_MD_SIZE+1]) { unsigned int i; static char buffer[EVP_MAX_MD_SIZE*4]; int len = 1; for (i = 0; buffer[i] != 0; i++) { len++; } if (len == 16 || len == 20) { } else { len = 16; } switch(len) { case 20: sprintf(buffer,"SHA= "); break; ...
false
false
false
false
false
0
gtk_mult_on_menu_game_solve (GtkMult* self) { guint _tmp0_; guint context_id; const gchar* _tmp1_ = NULL; g_return_if_fail (self != NULL); gtk_mult_set_cheated (self, TRUE); mult_puzzle_solve (self->priv->_puzzle); _tmp0_ = gtk_statusbar_get_context_id (self->priv->_status, "guess-feedback"); context_id = _tmp0...
false
false
false
false
false
0
getNumberOfPStates() { if (createPStateCache()) { DVInstanceCache::ItemStruct *instance = getInstanceStruct(); if ((instance != NULL) && ((instance->Type == DVPSI_image) || (instance->Type == DVPSI_hardcopyGrayscale))) return instance->List.size(); } return 0; }
false
false
false
false
false
0
authenticateOnCloseConnection(ConnStateData * conn) { auth_user_request_t *auth_user_request; assert(conn != NULL); if (conn->auth_user_request != NULL) { auth_user_request = conn->auth_user_request; /* if the auth type gets reset, the connection shouldn't * remain linked to it - the next type might no...
false
false
false
true
false
1
_gc_shutdown(E_Gadcon_Client *gcc) { Instance *inst; if (!(inst = gcc->data)) return; instances = eina_list_remove(instances, inst); if (inst->o_toggle) evas_object_del(inst->o_toggle); if (inst->hdl) ecore_event_handler_del(inst->hdl); inst->hdl = NULL; E_FREE(inst); }
false
false
false
false
false
0
_repeat_manual(TERM_REC *term, char chr, int count) { while (count > 0) { putc(chr, term->out); count--; } }
false
false
false
false
false
0
DeleteArgv ( const char** argv ) { unsigned int i; for ( i = 0; i < fArgv.size(); i++ ) free((void*)argv[i]); free((void*)argv); }
false
false
false
false
false
0
GetRegisterValue(char *reg) { int value; if( reg == NULL ) return -1; // This supports using "r#" or just "#" for the value of a register // capital R is supported so codding can be done with CAPS-lock on if( reg[0] == 'r' || reg[0] == 'R') reg++; else return -1; int chk = sscanf( reg, "%d"...
false
false
false
false
false
0
deleteVObject(VObject *p) { if (!p) return; if (p->id) unUseStr(p->id); free(p); p = NULL; }
false
false
false
false
false
0
png_read_filter_row_up(png_row_infop row_info, png_bytep row, png_const_bytep prev_row) { png_size_t i; png_size_t istop = row_info->rowbytes; png_bytep rp = row; png_const_bytep pp = prev_row; for (i = 0; i < istop; i++) { *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); rp++; ...
false
false
false
false
false
0
mono_jinfo_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len) { if (ji->from_aot) return mono_aot_get_unwind_info (ji, unwind_info_len); else return mono_get_cached_unwind_info (ji->used_regs, unwind_info_len); }
false
false
false
false
false
0
getInChIChar( INCHI_IOSTREAM *pInp ) { if (pInp->type==INCHI_IOSTREAM_STRING) { /* input from string */ if ( pInp->s.nPtr < pInp->s.nUsedLength ) return (int) pInp->s.pStr[pInp->s.nPtr++]; return RI_ERR_EOF; } else { /* input from plain file */ i...
false
false
false
false
false
0
tclock_destructor( plugin_instance *p ) { tclock_priv *dc = (tclock_priv *) p; ENTER; if (dc->timer) g_source_remove(dc->timer); gtk_widget_destroy(dc->main); RET(); }
false
false
false
false
false
0
getRootMeanSquare (void) const { if (myNum == 0) return 0; else return sqrt((double) myTotal / (double)myNum); }
false
false
false
false
false
0
mkd_cleanup(Document *doc) { if ( doc ) { if ( doc->ctx ) { ___mkd_freemmiot(doc->ctx, 0); free(doc->ctx); } if ( doc->code) ___mkd_freeParagraph(doc->code); if ( doc->headers ) ___mkd_freeLines(doc->headers); if ( T(doc->content) ) ___mkd_freeLines(T(doc->content)); memset(doc, 0, sizeof doc[0]); ...
false
false
false
false
false
0
terminal_keypress_cb (GtkWidget *widget, GdkEventKey *event, TerminalPlugin *terminal_plugin) { if (event->type != GDK_KEY_PRESS) return FALSE; /* ctrl-d */ if ((event->keyval == GDK_KEY_d || event->keyval == GDK_KEY_D) && (event->state & GDK_CONTROL_MASK)) { if (terminal_plugin->child_pid) { ...
false
false
false
false
false
0
modify_term(modify_context *mc,struct backend *be) { ldbm_instance *inst = (ldbm_instance *) be->be_instance_info; slapi_mods_free(&mc->smods); /* Unlock and return entries */ if (NULL != mc->old_entry) { cache_unlock_entry(&inst->inst_cache, mc->old_entry); CACHE_RETURN( &(inst->inst_...
false
false
false
false
false
0
prepareImpl(PageData* dataToPopulate) { // Procedural preparation if (mParent->_prepareProceduralPage(this)) return true; else { // Background loading String filename = generateFilename(); DataStreamPtr stream = Root::getSingleton().op...
false
false
false
false
false
0
gst_uri_decode_bin_finalize (GObject * obj) { GstURIDecodeBin *dec = GST_URI_DECODE_BIN (obj); remove_decoders (dec, TRUE); g_mutex_clear (&dec->lock); g_mutex_clear (&dec->factories_lock); g_free (dec->uri); g_free (dec->encoding); if (dec->factories) gst_plugin_feature_list_free (dec->factories); ...
false
false
false
false
false
0
point_combat_touch (edict_t * self, edict_t * other, cplane_t * plane, csurface_t * surf) { edict_t *activator; if (other->movetarget != self) return; if (self->target) { other->target = self->target; other->goalentity = other->movetarget = G_PickTarget (other->target); if (!othe...
false
false
false
false
false
0
vector_mul_double(double* v1, double* v2, size_t n) { size_t i; for (i = 0; i < n; i++) v1[i] *= v2[i]; }
false
false
false
false
false
0
ring_buffer_reset(struct ring_buffer *buf) { if (buf == NULL) return; buf->in = 0; buf->out = 0; }
false
false
false
false
false
0
init_fire() { Location *locPtr = get_loc(0,0); for( int c = max_x_loc*max_y_loc; c >0; --c, ++locPtr) { if( locPtr->has_hill()) { locPtr->set_fire_src(-100); } else if( locPtr->is_wall() ) { locPtr->set_fire_src(-50); } else if( locPtr->is_firm() || locPtr->is_plant() || locPtr->is_town() ) { ...
false
false
false
false
false
0
evt_ctx_tag_hook_add(EVTCONTEXT *ctx, int (*func)(EVTREC *e, void *user_ptr), void *user_ptr) { EVTTAGHOOK *cb = malloc(sizeof(EVTTAGHOOK)); if (!cb) return 0; cb->et_callback = func; cb->et_userptr = user_ptr; cb->et_next = ctx->ec_tag_hooks; ctx->ec_tag_hooks = cb; return 1; }
false
false
false
false
false
0
ecore_time_get(void) { #if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME) struct timespec t; if (EINA_UNLIKELY(_ecore_time_clock_id < 0)) return ecore_time_unix_get(); if (EINA_UNLIKELY(clock_gettime(_ecore_time_clock_id, &t))) { CRIT("Cannot get current time."); ...
false
false
false
false
false
0
hpsa_kdump_hard_reset_controller(struct pci_dev *pdev, u32 board_id) { u64 cfg_offset; u32 cfg_base_addr; u64 cfg_base_addr_index; void __iomem *vaddr; unsigned long paddr; u32 misc_fw_support; int rc; struct CfgTable __iomem *cfgtable; u32 use_doorbell; u16 command_register; /* For controllers as old as th...
false
false
false
false
false
0
setBaseURL(const KUrl& _baseURL) { m_baseURL = _baseURL; if (m_elemSheet) m_elemSheet->setHref( baseURL().url() ); }
false
false
false
false
false
0
LookAtVTS(JarchSession *session,ImageDVDCombo *idc,unsigned long title_ofs) { unsigned char buffer[2048]; unsigned long titlelast; unsigned long titlevob; unsigned long ifolast; unsigned long menuvob; if (!idc->dvdread(title_ofs,buffer,1)) return; if (memcmp(buffer,"DVDVIDEO-VTS",12)) { bitch(BITCHWARNING,...
false
false
false
false
false
0
cp_connection_removed (NMConnectionProvider *cp, NMConnection *connection, gpointer user_data) { if (_del_available_connection (NM_DEVICE (user_data), connection)) _signal_available_connections_changed (NM_DEVICE (user_data)); }
false
false
false
false
false
0
onSelectionRequest(FXObject* sender,FXSelector sel,void* ptr){ FXEvent *event=(FXEvent*)ptr; // Perhaps the target wants to supply its own data for the selection if(FXScrollArea::onSelectionRequest(sender,sel,ptr)) return 1; // Recognize the request? if(event->target==stringType || event->target==textType |...
false
false
false
false
false
0
do_log_message(enum log_level_t level, const char *format, va_list arglist) { int ioret = fprintf(log_file, "%s: ", LEVEL_MESSAGES[level]); if (ioret < 0) { return -1; } ioret = vfprintf(log_file, format, arglist); if (ioret < 0) { return -1; } ioret = fflush(log_file); if (ioret == EOF) { ...
false
false
false
false
false
0
empty_stmt_p (gimple stmt) { if (gimple_code (stmt) == GIMPLE_NOP) return true; if (gimple_code (stmt) == GIMPLE_BIND) return empty_body_p (gimple_bind_body (stmt)); return false; }
false
false
false
false
false
0
__result(gfloat op1, gfloat op2, gchar operation) { switch (operation) { case '^': return powf(op1, op2); case '+': return op1 + op2; case '-': return op1 - op2; case '/': return op1 / op2; case '*': return op1 * op2; } return 0; }
false
false
false
false
false
0
direct_find_best_memcpy( void ) { /* Save library size and startup time on platforms without a special memcpy() implementation. */ #if RUN_BENCHMARK unsigned long long t; char *buf1, *buf2; int i, j, best = 0; u32 config_flags = 0; if (direct_config->memcpy) { for (i=1; ...
false
true
false
false
true
1
segmentEndVertexIndex(const LinearLocation& loc) { if (loc.getSegmentFraction() > 0.0) return loc.getSegmentIndex() + 1; return loc.getSegmentIndex(); }
false
false
false
false
false
0
timer_queue (ACE_Timer_Queue *tq) { if (this->delete_timer_queue_) delete this->timer_queue_; this->timer_queue_ = tq; this->delete_timer_queue_ = false; return 0; }
false
false
false
false
false
0
cm_tdbusm_set_sn(DBusMessage *msg, const char *s, long n) { int64_t i = n; if (s == NULL) { s = empty_string; } if (dbus_message_append_args(msg, DBUS_TYPE_STRING, &s, DBUS_TYPE_INT64, &i, DBUS_TYPE_INVALID)) { return 0; } else { return -1; } }
false
false
false
false
false
0
ysmp_solve(S,b,x) struct linsys *S; REAL *b; /* rhs */ REAL *x; /* solution, may be B */ { int PATH,FLAG=0,ESP; REAL *RSP,EMAX; PROF_START(hessian_factor); if ( S->N == 0 ) return; RSP = (REAL *) S->ISP; PATH = 3; /* solution only */ sdrvmd_(&S->N,S->P,S->IP,S->IA,S->JA,S->A,b,x,&S->NSP,S->ISP,RSP,&ESP, ...
false
false
false
false
false
0
mount_enclosing_volume_proxy_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { MountData *data = user_data; GVfsDBusMountTracker *proxy; GError *error = NULL; GSimpleAsyncResult *ares; GDaemonFile *daemon_file; GMountSpec *...
false
false
false
false
false
0
knot_rrset_add_rr_from_rrset(knot_rrset_t *dest, const knot_rrset_t *source, size_t rdata_pos) { if (dest == NULL || source == NULL || rdata_pos >= source->rdata_count) { return KNOT_EINVAL; } /* Get size of RDATA to be copied. */ uint16_t item_size = rrset_rdata_item_size(s...
false
true
false
false
false
1
create_kernel (const char *hostcpu, const char *kernel, const char *dtb_wildcard, const char *dtb) { int is_x86; /* x86 but not x86-64 */ int is_arm; /* arm */ is_x86 = hostcpu[0] == 'i' && hostcpu[2] == '8' && hostcpu[3] == '6' && hostcpu[4] == '\0'; is_arm = hostcpu[0] == 'a' && ho...
false
false
false
false
false
0
nntp_read_response(struct nntp *nntp, enum nntp_code *code, char **rest) { char *line; enum nntp_status status; status = nntp_read_line(nntp, &line); if (status != NNTP_READ_OK) return status; *code = strtol(line, rest, 10); if (*rest != line + 3) *code = 0; else if (isspace...
false
false
false
false
false
0
dev_ioctl_mount_device(unsigned int logopt, const char *path, unsigned int type, dev_t *devid) { struct autofs_dev_ioctl *param; int err; if (!path) { errno = EINVAL; return -1; } *devid = -1; param = alloc_dev_ioctl_path(-1, path); if (!param) return -1; param->ismountpoint.in.type = type; err = ioc...
false
false
false
false
false
0
efi_runtime_set_variable(unsigned long arg) { struct efi_setvariable __user *setvariable_user; struct efi_setvariable setvariable; efi_guid_t vendor_guid; efi_status_t status; efi_char16_t *name = NULL; void *data; int rv = 0; setvariable_user = (struct efi_setvariable __user *)arg; if (copy_from_user(&setva...
false
false
false
false
false
0
ath_tx_status_update(struct ath_softc_tgt *sc, struct ath_tx_buf *bf) { struct ath_tx_desc *ds = bf->bf_lastds; WMI_TXSTATUS_EVENT *txs; if (sc->sc_tx_draining) return; txs = ath_tx_status_get(sc); if (txs == NULL) return; txs->txstatus[txs->cnt].ts_flags = 0; txs->txstatus[txs->cnt].cookie = bf->bf_cook...
false
false
false
false
false
0
create_barbarian_player(enum barbarian_type type) { struct player *barbarians; struct nation_type *nation; players_iterate(barbarians) { if ((type == LAND_BARBARIAN && is_land_barbarian(barbarians)) || (type == SEA_BARBARIAN && is_sea_barbarian(barbarians))) { if (!barbarians->is_alive) { ...
false
false
false
false
false
0
pdf_lex_cmap(fz_stream *file, pdf_lexbuf *buf) { int tok = pdf_lex(file, buf); if (tok == PDF_TOK_KEYWORD) tok = pdf_cmap_token_from_keyword(buf->scratch); return tok; }
false
false
false
false
false
0
DXNewSharedArray(int id, Pointer d, int k, Type t, Category c, int r, ...) { int shape[100]; int i; va_list arg; ASSERT(r<100); /* collect args */ va_start(arg,r); for (i=0; i<r; i++) shape[i] = va_arg(arg, int); va_end(arg); /* call V version */ return DXNewSharedArrayV(id, ...
false
false
false
false
false
0
process_removexattr(struct fake_msg *buf) { #if defined(HAVE_REMOVEXATTR) || defined(HAVE_LREMOVEXATTR) || defined(HAVE_FREMOVEXATTR) data_node_t *i; xattr_node_t *x = NULL; buf->xattr.flags_rc = ENODATA; i = data_find(&buf->st, buf->remote); if(debug){ fprintf(stderr,"FAKEROOT: process removexattr key =...
false
false
false
false
false
0
chiSquareTestUnfoldingNNSDWithPoisson4(float* eigens, int size, double bin, int pace, RMTParameters *params){ int newSize; // the new size of the eigenvalue array after duplicates removed float * newE; // the new eigenvalue array after duplicates removed double * edif; double obj; double expect; double c...
false
false
false
false
false
0
set_expiration_fields(request_rec *r, const char *code, apr_table_t *t) { apr_time_t base; apr_time_t additional; apr_time_t expires; int additional_sec; char *timestr; switch (code[0]) { case 'M': if (r->finfo.filetype == APR_NOFILE) { /...
false
false
false
false
false
0
niu_rx_pkt_ignore(struct niu *np, struct rx_ring_info *rp) { unsigned int index = rp->rcr_index; int num_rcr = 0; rp->rx_dropped++; while (1) { struct page *page, **link; u64 addr, val; u32 rcr_size; num_rcr++; val = le64_to_cpup(&rp->rcr[index]); addr = (val & RCR_ENTRY_PKT_BUF_ADDR) << RCR_ENTRY...
false
false
false
false
false
0
read_chars (FcFormatContext *c, FcChar8 term) { FcChar8 *p; p = c->word; while (*c->format && *c->format != '}' && *c->format != term) { if (*c->format == '\\') { c->format++; if (*c->format) *p++ = escaped_char (*c->format++); continue; } *p++ = *c->format++; ...
false
false
false
false
false
0
iforce_erase_effect(struct input_dev *dev, int effect_id) { struct iforce *iforce = input_get_drvdata(dev); struct iforce_core_effect *core_effect = &iforce->core_effects[effect_id]; int err = 0; if (test_bit(FF_MOD1_IS_USED, core_effect->flags)) err = release_resource(&core_effect->mod1_chunk); if (!err && te...
false
false
false
false
false
0
TimerStart() { if(period < 5) { fprintf(stderr, "WordMonitor::TimerStart: wordlist_monitor_period must be > 5 (currently %d) otherwise monitoring is not accurate\n", period); return; } #ifndef _MSC_VER /* _WIN32 */ struct sigaction action; struct sigaction old_action; memset((char*)&action, '\0', siz...
false
false
false
false
false
0
tree_ssa_unswitch_loops (void) { loop_iterator li; struct loop *loop; bool changed = false; /* Go through inner loops (only original ones). */ FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, ";; Considering loop %d\n", loop->nu...
false
false
false
false
false
0
new_symbol (struct locale_collate_t *collate, const char *name, size_t len) { struct symbol_t *newp; newp = (struct symbol_t *) obstack_alloc (&collate->mempool, sizeof (*newp)); newp->name = obstack_copy0 (&collate->mempool, name, len); newp->order = NULL; newp->file = NULL; newp->line = 0; return ne...
false
false
false
false
false
0
goc_graph_draw (GocItem const *item, cairo_t *cr) { GocGraph *graph = GOC_GRAPH (item); GocCanvas *canvas = item->canvas; cairo_surface_t *surf; double x0, y0 = item->y0; if (graph->renderer == NULL) return; if (goc_canvas_get_direction (item->canvas) == GOC_DIRECTION_RTL) { x0 = item->x1; goc_group_adjust_...
false
false
false
false
false
0
print(raw_ostream &OS, const Module* ) const { OS << "********** INTERVALS **********\n"; for (const_iterator I = begin(), E = end(); I != E; ++I) { I->second->print(OS, tri_); OS << "\n"; } printInstrs(OS); }
false
false
false
false
false
0
analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags, PyObject *bound, PyObject *local, PyObject *free, PyObject *global) { if (flags & DEF_GLOBAL) { if (flags & DEF_PARAM) { PyErr_Format(PyExc_SyntaxError, "name '%U' i...
false
false
false
false
false
0
parse(XML_PARSER& xp) { strcpy(name, ""); have_plan_class = false; app_version = -1; while (!xp.get_tag()) { if (xp.match_tag("/other_result")) { if (!strcmp(name, "")) return ERR_XML_PARSE; return 0; } if (xp.parse_str("name", name, sizeof(name))) continu...
false
false
false
false
false
0
display_raster(gx_device_display *dev) { int align = 0; int bytewidth = ((dev->width * dev->color_info.depth) + 7) /8; switch (dev->nFormat & DISPLAY_ROW_ALIGN_MASK) { case DISPLAY_ROW_ALIGN_4: align = 4; break; case DISPLAY_ROW_ALIGN_8: align = 8; ...
false
false
false
false
false
0
wordmatch (const char *s, const char *test) { int n = strlen(test); return (!strncmp(s, test, n) && (s[n] == '\0' || isspace(s[n]))); }
false
false
false
false
false
0
vtkAxisActor2DComputeTicks(double sRange[2], double &interval, double &root) { // first we try assuming the first value is reasonable int numTicks; double range = fabs(sRange[1]-sRange[0]); int rootPower = static_cast<int>(floor(log10(range)-1)); root = pow(10.0,rootPow...
false
false
false
false
false
0
getModRefInfo(ImmutableCallSite CS, const Value *P, unsigned Size) { // Don't assert AA because BasicAA calls us in order to make use of the // logic here. ModRefBehavior MRB = getModRefBehavior(CS); if (MRB == DoesNotAccessMemory) return NoModRef; ModRefResult Mask = ModRef...
false
false
false
false
false
0
ni_convert_power_state_to_smc(struct radeon_device *rdev, struct radeon_ps *radeon_state, NISLANDS_SMC_SWSTATE *smc_state) { struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev); struct ni_power_info *ni_pi = ni_get_pi(rdev); struct ni_ps *state = ni_get_ps(radeon_state); int i, ret; u32 ...
false
false
false
false
false
0
Check_Eigen( int N, double **C, double *diag, double **Q) /* exhaustive test of the output of the eigendecomposition needs O(n^3) operations writes to error file returns number of detected inaccuracies */ { /* compute Q diag Q^T and Q Q^T to check */ int i, j, k, res = 0; double cc, dd; st...
false
false
false
false
false
0
write_stream (GSList * i, FILE * fp) { guint n = g_slist_length (i); fprintf (fp, "VECT 1 %u 0 %u 0\n", n, n); while (i) { GtsPoint * p = i->data; fprintf (fp, "%g %g 0\n", p->x, p->y); i = i->next; } }
false
false
false
false
false
0
flat_multiset_vars(Flatterm f) { I2list vars = NULL; Flatterm fi; for (fi = f; fi != f->end->next; fi = fi->next) if (VARIABLE(fi)) vars = multiset_add(vars, VARNUM(fi)); return vars; }
false
false
false
false
false
0
clone_impl() const { return new (getNumOperands()) GetElementPtrInst(*this); }
false
false
false
false
false
0
dev_pm_domain_detach(struct device *dev, bool power_off) { if (dev->pm_domain && dev->pm_domain->detach) dev->pm_domain->detach(dev, power_off); }
false
false
false
false
false
0
patestCallback(const void* inputBuffer, void* outputBuffer, unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo* timeInfo, PaStreamCallbackFla...
false
false
false
false
false
0
free_window_info(cw, free_data) struct WinDesc *cw; boolean free_data; { int i; if (cw->data) { if (cw == wins[WIN_MESSAGE] && cw->rows > cw->maxrow) cw->maxrow = cw->rows; /* topl data */ for(i=0; i<cw->maxrow; i++) if(cw->data[i]) { free((genericptr_t)cw->data[i]); cw->data[i] = (cha...
false
false
false
false
false
0
spi_object_return_reference (DBusMessage * msg, AtkObject * obj) { DBusMessage *reply; reply = dbus_message_new_method_return (msg); if (reply) { DBusMessageIter iter; dbus_message_iter_init_append (reply, &iter); spi_object_append_reference (&iter, obj); } return reply; }
false
false
false
false
false
0
trace_keep_overwrite(struct tracer *tracer, u32 mask, int set) { if (tracer->enabled && (mask & TRACE_ITER_OVERWRITE) && !set) return -1; return 0; }
false
false
false
false
false
0
anychar_typmodin(ArrayType *ta, const char *typename) { int32 typmod; int32 *tl; int n; tl = ArrayGetIntegerTypmods(ta, &n); /* * we're not too tense about good error message here because grammar * shouldn't allow wrong number of modifiers for CHAR */ if (n != 1) ereport(ERROR, (errcode(ERRCOD...
false
false
false
false
false
0
fm10k_mbx_write_copy(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx) { struct fm10k_mbx_fifo *fifo = &mbx->tx; u32 mbmem = mbx->mbmem_reg; u32 *head = fifo->buffer; u16 end, len, tail, mask; if (!mbx->tail_len) return; /* determine data length and mbmem tail index */ mask = mbx->mbmem_len - 1; len = m...
false
false
false
false
false
0
volgen_graph_set_iam_shd (volgen_graph_t *graph) { xlator_t *trav; int ret = 0; for (trav = first_of (graph); trav; trav = trav->next) { if (strcmp (trav->type, "cluster/replicate") != 0) continue; ret = xlator_set_opti...
false
false
false
false
false
0
ok_clicked_cb (GtkWidget *widget, DialogData *data) { ResizeData *resize_data; GtkTreeIter iter; char *mime_type; GthTask *resize_task; GthTask *list_task; resize_data = g_new0 (ResizeData, 1); resize_data->width = gtk_spin_button_get_value (GTK_SPIN_BUTTON (GET_WIDGET ("width_spinbutt...
false
false
false
false
false
0
get_frame( hnd_t handle, cli_pic_t *output, int frame ) { crop_hnd_t *h = handle; if( h->prev_filter.get_frame( h->prev_hnd, output, frame ) ) return -1; output->img.width = h->dims[2]; output->img.height = h->dims[3]; /* shift the plane pointers down 'top' rows and right 'left' columns. */...
false
false
false
false
false
0
try_split() { const String & word = original.word; if (word.size() < 4 || parms->split_chars.empty()) return; size_t i = 0; String new_word_str; String buf; new_word_str.resize(word.size() + 1); char * new_word = new_word_str.data(); memcpy(new_word, word.data(), word.siz...
false
false
false
false
false
0
tomoyo_print_bprm(struct linux_binprm *bprm, struct tomoyo_page_dump *dump) { static const int tomoyo_buffer_len = 4096 * 2; char *buffer = kzalloc(tomoyo_buffer_len, GFP_NOFS); char *cp; char *last_start; int len; unsigned long pos = bprm->p; int offset = pos % PAGE_SIZE; int argv_count = bprm->argc;...
false
false
false
false
false
0
via_cmdbuf_wait(drm_via_private_t *dev_priv, unsigned int size) { uint32_t agp_base = dev_priv->dma_offset + (uint32_t) dev_priv->agpAddr; uint32_t cur_addr, hw_addr, next_addr; volatile uint32_t *hw_addr_ptr; uint32_t count; hw_addr_ptr = dev_priv->hw_addr_ptr; cur_addr = dev_priv->dma_low; next_addr = cur_addr...
false
false
false
false
false
0
getdigraph(char1, char2, meta) int char1; int char2; int meta; { int i; int retval; retval = 0; for (i = 0; ; ++i) /* search added digraphs first */ { if (i == digraphcount) /* end of added table, search defaults */ { for (i = 0; digraphdefault[i][0] != 0; ++i) if (digraphdefault[i][0] == char1 ...
false
false
false
false
false
0
web_view_gtkhtml_update_actions (EWebViewGtkHTML *web_view) { GtkActionGroup *action_group; gboolean have_selection; gboolean scheme_is_http = FALSE; gboolean scheme_is_mailto = FALSE; gboolean uri_is_valid = FALSE; gboolean has_cursor_image; gboolean visible; const gchar *group_name; const gchar *uri; uri =...
false
false
false
false
false
0
metricDetails(QString symbol) { for(int i = 0; i < metrics.count(); i++) if (metrics[i].symbol == symbol) return &metrics[i]; return NULL; }
false
false
false
false
false
0
_glh_lookup_history(GlHistory *glh, GlhLineID id, const char **line, unsigned *group, time_t *timestamp) { GlhLineNode *node; /* The located line location node */ /* * Check the arguments. */ if(!glh) return 0; /* * Search for the line that has the specified ID. */ node = _glh_find_id(glh, id); /* * N...
false
false
false
false
false
0
gap_lib_rename_frame_digits(GapAnimInfo *ainfo_ptr, long from_nr, long to_nr, long from_digits, long to_digits) { char *l_from_fname; char *l_to_fname; int l_rc; l_from_fname = gap_lib_alloc_fname_fixed_digits(ainfo_ptr->basename, from_nr, ainfo_ptr->extension, from_digits); ...
false
false
false
false
false
0
H5P__dxfr_xform_del(hid_t UNUSED prop_id, const char UNUSED *name, size_t UNUSED size, void *value) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC HDassert(value); if(H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL,...
false
false
false
false
false
0
book_move(board_t * board) { int best_move; int best_score; int pos; entry_t entry[1]; int move; int score; list_t list[1]; int i; ASSERT(board!=NULL); if (BookFile != NULL && BookSize != 0) { // draw a move according to a fixed probability distribution best_move = MoveNon...
false
false
false
false
false
0