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
ht_get_a(hashtable *ht, const void *key, const void *hash_arg, const void *cmp_arg) { hash_t k; if (!ht || !key) return NULL; k = ht->hash(key, hash_arg) % ht->n_buckets; return htbucket_get(ht->buckets + k, key, ht->cmp, cmp_arg); }
false
false
false
false
false
0
mfread() /* The only non-static function in this file. */ { int track; if ( Mf_getc == NULLFUNC ) mferror("mfread() called without setting Mf_getc"); readheader(); track =1; while (readtrack()) {track++; if(track>ntrks) break; } }
false
false
false
false
false
0
cpuid_get_ext_feature_flags(cpuid_ext_feature_flags_t *f) // OUT: Flags for this CPU { uint32_t eax, ebx, ecx; if (cpuid_data80.eax < 0x80000001) { // Extended feature flags not supported on this CPU return FALSE; } eax = CPUID_EXTENDED_FEATURE; GET_CPUID(eax, ebx, ecx, f->flat); return T...
false
false
false
false
false
0
IPrcParse(const pfPrcTag* tag, plResManager* mgr) { if (tag->getName() == "State") { if (tag->hasChildren()) fState.prcParse(tag->getFirstChild()); } else if (tag->getName() == "View") { fHither = tag->getParam("Hither", "0").toFloat(); fYon = tag->getParam("Yon", "0").toFloa...
false
false
false
false
false
0
add_op_to_runlist(lrmd_rsc_t* rsc, lrmd_op_t* op) { op->t_addtolist = time_longclock(); rsc->op_list = g_list_append(rsc->op_list, op); if (g_list_length(rsc->op_list) >= 4) { lrmd_log(LOG_WARNING , "operations list for %s is suspiciously" " long [%d]" , rsc->id , g_list_length(rsc->op_list)); lrmd_rsc_d...
false
false
false
false
false
0
_IO_str_count (fp) _IO_FILE *fp; { return ((fp->_IO_write_ptr > fp->_IO_read_end ? fp->_IO_write_ptr : fp->_IO_read_end) - fp->_IO_read_base); }
false
false
false
false
false
0
pci_restore_standard_config(struct pci_dev *pci_dev) { pci_update_current_state(pci_dev, PCI_UNKNOWN); if (pci_dev->current_state != PCI_D0) { int error = pci_set_power_state(pci_dev, PCI_D0); if (error) return error; } pci_restore_state(pci_dev); return 0; }
false
false
false
false
false
0
DrawAcross (int x, int y, int tx, int ty, int active,int color) /* draws a single bond on a white background */ { gint npoints = 4; GdkPoint mypoints[4]; struct xy_co *coord; GdkGC *thegc; thegc = background_gc; coord = center_double_bond (x, y, tx, ty, 6); mypoints[0].x = (coord->x + (coord->tx - coor...
false
false
false
false
false
0
mt2032_optimize_vco(struct dvb_frontend *fe,int sel,int lock) { struct microtune_priv *priv = fe->tuner_priv; unsigned char buf[2]; int tad1; buf[0]=0x0f; tuner_i2c_xfer_send(&priv->i2c_props,buf,1); tuner_i2c_xfer_recv(&priv->i2c_props,buf,1); tuner_dbg("mt2032 Reg.F=0x%02x\n",buf[0]); tad1=buf[0]&0x07; if(...
false
false
false
false
false
0
msgInvalidFormat(const char *content) { return QCoreApplication::translate("PluginSpec", "'%1' has invalid format").arg(content); }
false
false
false
false
false
0
sas_ex_phy_discover_helper(struct domain_device *dev, u8 *disc_req, u8 *disc_resp, int single) { struct discover_resp *dr; int res; disc_req[9] = single; res = smp_execute_task(dev, disc_req, DISCOVER_REQ_SIZE, disc_resp, DISCOVER_RESP_SIZE); if (res) return res; dr = &((struct smp_resp *)...
false
false
false
false
false
0
get_title (gchar *file) { gchar **tmp; gchar *title = NULL; gchar *file2; if (gnomad_debug != 0) { g_print("get_title()\n"); } file2 = kill_tracknumber(file); if (file2 == NULL) { return NULL; } tmp = g_strsplit(file, " - ", 0); g_free(file2); if (vectorlength(tmp) > 1) { gchar **tm...
false
false
false
false
false
0
pselect(int n, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, const struct timespec *timeout, const sigset_t *sigmask) { struct timeval t; sigset_t old; int r; if (timeout) { t.tv_sec=timeout->tv_sec; t.tv_usec=timeout->tv_nsec/1000; if (!t.tv_sec && !t.tv_usec && timeout->tv_nsec...
false
false
false
false
false
0
build_dispatch_table_initializer (tree type, tree entries) { vec<constructor_elt, va_gc> *inits = NULL; do { vec<constructor_elt, va_gc> *elems = NULL; tree expr; CONSTRUCTOR_APPEND_ELT (elems, NULL_TREE, build_selector (METHOD_SEL_NAME (entries))); /* Generate the method enc...
false
false
false
false
false
0
AddBalloon(vtkProp *prop, vtkStdString *str, vtkImageData *img) { vtkPropMapIterator iter = this->PropMap->find(prop); if ( iter == this->PropMap->end() || (*this->PropMap)[prop] != vtkBalloon(str,img) ) { (*this->PropMap)[prop] = vtkBalloon(str,img); if ( prop != NULL ...
false
false
false
false
false
0
math3d_lib_quatf_conjugateX(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_) { ScmObj q_scm; ScmQuatf* q; ScmObj p_scm; ScmQuatf* p; ScmObj SCM_SUBRARGS[2]; int SCM_i; SCM_ENTER_SUBR("quatf-conjugate!"); for (SCM_i=0; SCM_i<2; SCM_i++) { SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i); } q_scm = SCM_SUBRARG...
false
false
false
false
false
0
cp_parser_declaration (cp_parser* parser) { cp_token token1; cp_token token2; int saved_pedantic; /* Check for the `__extension__' keyword. */ if (cp_parser_extension_opt (parser, &saved_pedantic)) { /* Parse the qualified declaration. */ cp_parser_declaration (parser); /* Restore the...
false
false
false
false
false
0
gen_split_2325 (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands ATTRIBUTE_UNUSED) { rtx _val = 0; start_sequence (); #line 5212 "../../src/gcc/config/i386/i386.md" { rtx op1 = operands[1]; operands[3] = simplify_gen_subreg (V4SFmode, operands[0], SFmode, 0); if (GET_CODE (op1) == SUBREG) op1 = SUB...
false
false
false
false
false
0
ompi_debugger_setup_dlls(void) { int i; char **dirs, **tmp1 = NULL, **tmp2 = NULL; ompi_debugger_dll_path = opal_install_dirs.pkglibdir; (void) mca_base_var_register("ompi", "ompi", "debugger", "dll_path", "List of directories where MPI_INIT should search for debugger p...
false
false
false
false
false
0
mailimap_acl_acl_data_parse(mailstream * fd, MMAPString *buffer, size_t * indx, struct mailimap_acl_acl_data ** result, size_t progr_rate, progress_function * progr_fun) { size_t cur_token; char * mailbox; clist * ir_list; struct mailimap_acl_acl_data * acl_data; int r; int res; cur_token...
false
false
false
false
false
0
maSetHttpUser(MaAppweb *appweb, cchar *newUser) { #if BLD_UNIX_LIKE struct passwd *pp; if (snumber(newUser)) { appweb->uid = atoi(newUser); if ((pp = getpwuid(appweb->uid)) == 0) { mprError("Bad user id: %d", appweb->uid); return MPR_ERR_CANT_ACCESS; } ...
false
false
false
false
false
0
mxf_timestamp_compare (const MXFTimestamp * a, const MXFTimestamp * b) { gint diff; if ((diff = a->year - b->year) != 0) return diff; else if ((diff = a->month - b->month) != 0) return diff; else if ((diff = a->day - b->day) != 0) return diff; else if ((diff = a->hour - b->hour) != 0) return ...
false
false
false
false
false
0
gnc_ui_new_account_window_internal (QofBook *book, Account *base_account, gchar **subaccount_names, GList *valid_types, const gnc_commodity * default_commodity, ...
false
false
false
false
false
0
check_master_self_include(struct master *master, struct lookup_context *ctxt) { char *m_path, *m_base, *i_path, *i_base; /* * If we are including a file map then check the * full path of the map. */ if (*master->name == '/') { if (!strcmp(master->name, ctxt->mapname)) return 1; else return 0; } /...
false
false
false
false
false
0
set_constant_ot(assembly_operand *AO) { if (!glulx_mode) { if (AO->value >= 0 && AO->value <= 255) AO->type = SHORT_CONSTANT_OT; else AO->type = LONG_CONSTANT_OT; } else { if (AO->value == 0) AO->type = ZEROCONSTANT_OT; else if (AO->value >= -0x80 && AO->value < 0x80) AO->t...
false
false
false
false
false
0
platform_pci_choose_state(struct pci_dev *dev) { return pci_platform_pm ? pci_platform_pm->choose_state(dev) : PCI_POWER_ERROR; }
false
false
false
false
false
0
Pairpool_free_memory (T this) { List_T p; struct Pair_T *pairptr; struct List_T *listcellptr; for (p = this->pairchunks; p != NULL; p = List_next(p)) { pairptr = (struct Pair_T *) List_head(p); FREE_KEEP(pairptr); } List_free_keep(&this->pairchunks); for (p = this->listcellchunks; p != NULL; p = ...
false
false
false
false
false
0
intel_fbc_choose_crtc(struct drm_i915_private *dev_priv, struct drm_atomic_state *state) { struct intel_fbc *fbc = &dev_priv->fbc; struct drm_crtc *crtc; struct drm_crtc_state *crtc_state; struct drm_plane *plane; struct drm_plane_state *plane_state; bool fbc_crtc_present = false; int i, j; mutex_lock(&f...
false
false
false
false
false
0
array_length_getter(JSContext *cx, JSObject *obj, jsval id, jsval *vp) { do { if (OBJ_IS_ARRAY(cx, obj)) return IndexToValue(cx, obj->fslots[JSSLOT_ARRAY_LENGTH], vp); } while ((obj = OBJ_GET_PROTO(cx, obj)) != NULL); return JS_TRUE; }
false
false
false
false
false
0
check_packet_type(struct dhcp_packet *packet) { uint8_t *type; if (packet->hlen != ETH_ALEN) return 0; if (packet->op != BOOTREQUEST) return 0; type = dhcp_get_option(packet, DHCP_MESSAGE_TYPE); if (type == NULL) return 0; if (*type < DHCP_MINTYPE) return 0; if (*type > DHCP_MAXTYPE) return 0; ...
false
false
false
false
false
0
GenerateFsm(GrcManager * pcman) { if (m_nGlobalID == -1) { m_nMaxRuleContext = 0; return; } GenerateFsmMachineClasses(pcman); GenerateFsmTable(pcman); //WalkFsmMachineClasses(); ////////pcman->ClearFsmWorkSpace(); }
false
false
false
false
false
0
GMT_chi2crit (double alpha, double nu) { /* Critical values for Chi^2-distribution */ GMT_LONG done; double chi2_low, chi2_high, chi2_mid, p_high, p_mid, p; p = 1.0 - alpha; chi2_low = 0.0; chi2_high = 5.0; GMT_chi2 (chi2_high, nu, &p_high); while (p_high > p) { /* Must pick higher starting point */ chi2_hi...
false
false
false
false
false
0
copyFromCPSR(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, unsigned DestReg, bool KillSrc, const ARMSubtarget &Subtarget) const { unsigned Opc = Subtarget.isThumb() ? (Subtarget.is...
false
false
false
false
false
0
stk_surface_blit( SDL_Surface *src, int sx, int sy, int sw, int sh, SDL_Surface *dest, int dx, int dy ) { /* build rectangles */ stk_drect.x = dx; stk_drect.y = dy; stk_drect.w = (sw==-1)?src->w:sw; stk_drect.h = (sh==-1)?src->h:sh; stk_srect.x = sx; stk_srect.y = sy; stk_srect.w...
false
false
false
false
false
0
bgav_stream_skipto(bgav_stream_t * s, gavl_time_t * time, int scale) { if(s->action != BGAV_STREAM_DECODE) return 1; switch(s->type) { case BGAV_STREAM_AUDIO: return bgav_audio_skipto(s, time, scale); break; case BGAV_STREAM_VIDEO: return bgav_video_skipto(s, time, scale, 1); ...
false
false
false
false
false
0
gdict_window_cmd_go_next_def (GSimpleAction *action, GVariant *parameter, gpointer user_data) { GdictWindow *window = user_data; g_assert (GDICT_IS_WINDOW (window)); if (window->max_definition == -1) window->max_definition = gdict_defb...
false
false
false
false
false
0
test_and_own (guint32 numobjects, gpointer *handles, gboolean waitall, guint32 *count, guint32 *lowest) { struct handle_cleanup_data cleanup_data; gboolean done; int i; DEBUG ("%s: locking handles", __func__); cleanup_data.numobjects = numobjects; cleanup_data.handles = handles; pthread_cle...
false
false
false
false
false
0
scsih_scan_finished(struct Scsi_Host *shost, unsigned long time) { struct MPT3SAS_ADAPTER *ioc = shost_priv(shost); if (disable_discovery > 0) { ioc->is_driver_loading = 0; ioc->wait_for_discovery_to_complete = 0; return 1; } if (time >= (300 * HZ)) { ioc->base_cmds.status = MPT3_CMD_NOT_USED; pr_info(M...
false
false
false
false
false
0
ttx_param_validate( const char *start, const char *end) { int rc = 0; const char *p = NULL; int found_colon = 0; for (p = start; p <= end; p++) { if (IS_COLON(*p)) { found_colon = 1; /* Validate the ttx-key before the COLON. */ switch (p - start) { case 4: /* "misc" / "page" */ if ((str...
false
false
false
false
false
0
popCharStream (pANTLR3_LEXER lexer) { pANTLR3_INPUT_STREAM input; // If we do not have a stream stack or we are already at the // stack bottom, then do nothing. // if (lexer->rec->state->streams != NULL && lexer->rec->state->streams->size(lexer->rec->state->streams) > 0) { // We just leave t...
false
false
false
false
false
0
cdb_hash(buf,len) unsigned char *buf; unsigned int len; { uint32 h; h = 5381; while (len) { --len; h += (h << 5); h ^= (uint32) *buf++; } return h; }
false
false
false
false
false
0
do_in(MBState& s, const char* fromBegin, const char* fromEnd, const char*& fromNext, char* toBegin, char* toEnd, ...
false
false
false
false
false
0
toss_rsb(struct kref *kref) { struct dlm_rsb *r = container_of(kref, struct dlm_rsb, res_ref); struct dlm_ls *ls = r->res_ls; DLM_ASSERT(list_empty(&r->res_root_list), dlm_print_rsb(r);); kref_init(&r->res_ref); rb_erase(&r->res_hashnode, &ls->ls_rsbtbl[r->res_bucket].keep); rsb_insert(r, &ls->ls_rsbtbl[r->res_b...
false
false
false
false
false
0
gtr_open_tran_plugin_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GtrOpenTranPluginPrivate *priv = GTR_OPEN_TRAN_PLUGIN (object)->priv; switch (prop_id)...
false
false
false
false
false
0
Read( int8 * buf, int len, nAddress & addr ) const { tASSERT( IsOpen() ); // return value: real number of bytes read int ret = 0; static tReproducibleRandomizer randomizer; #ifdef DEBUG // pretend nothing was received if ( sn_simulateReceivePacketLoss > randomizer.Get() ) return -1; #e...
false
false
false
false
false
0
findPartFromWidget( QWidget * widget ) { for ( QList<Part *>::iterator it = d->m_parts.begin(), end = d->m_parts.end() ; it != end ; ++it ) { if ( widget == (*it)->widget() ) return (*it); } return 0; }
false
false
false
false
false
0
rc_match_endloop(struct rc_instruction * endloop) { unsigned int endloop_count = 0; struct rc_instruction * inst; for (inst = endloop->Prev; inst != endloop; inst = inst->Prev) { rc_opcode op = rc_get_flow_control_inst(inst); if (op == RC_OPCODE_ENDLOOP) { endloop_count++; } else if (op == RC_OPCODE_BGNLOOP...
false
false
false
false
false
0
process_zinfo_add ( struct input_file *input, struct output_file *output, struct zinfo_add *add, size_t datasize ) { size_t offset = add->offset; void *target; signed long addend; unsigned long size; signed long val; unsigned long mask; if ( ( offset + datasize ) > output->len ) { ...
false
false
false
false
false
0
wl3501_close(struct net_device *dev) { struct wl3501_card *this = netdev_priv(dev); int rc = -ENODEV; unsigned long flags; struct pcmcia_device *link; link = this->p_dev; spin_lock_irqsave(&this->lock, flags); link->open--; /* Stop wl3501_hard_start_xmit() from now on */ netif_stop_queue(dev); wl3501_ack_in...
false
false
false
false
false
0
jack_register_server (const char *server_name, int new_registry) { int i, res = 0; jack_set_server_prefix (server_name); if (jack_server_initialize_shm (new_registry)) return ENOMEM; if (jack_shm_lock_registry () < 0) { jack_error ("jack_shm_lock_registry fails..."); return -1; } /* See i...
false
true
false
false
false
1
cafebabe_stream_close(struct cafebabe_stream *s) { if (munmap(s->virtual, s->stat.st_size) == -1) { /* This is the best we can do. It shouldn't happen. */ fprintf(stderr, "error: %s\n", strerror(errno)); } /* We try not to leak file descriptors. */ do { if (close(s->fd) == -1) { if (errno == EINTR) co...
false
false
false
false
false
0
__ecereNameSpace__ecere__gfx__drivers__hb_stringToGlyphs(HB_Font font, unsigned short * string, unsigned int length, HB_Glyph * glyphs, unsigned int * numGlyphs, HB_Bool rightToLeft) { FT_Face face = ((struct __ecereNameSpace__ecere__gfx__drivers__FontEntry *)(*font).userData)->face; int glyph_pos = 0; int c, nw; if(l...
false
false
false
false
false
0
setControlFromLV2(int port_idx, float value) { if (port_idx < 0 || port_idx > 25) { std::cerr << "LV2 port index " << port_idx << " out of range" << std::endl; return; } Wdgt::Draggable *d = draggablePerLV2Port[port_idx]; if (d == NULL) { std::cerr << "No control for LV2 port " << port_idx << std::endl; ret...
false
false
false
false
false
0
kvmdump_init(char *filename, FILE *fptr) { int i, page_size; struct command_table_entry *cp; char *cachebuf; FILE *tmpfp; if (!machine_type("X86") && !machine_type("X86_64")) { error(FATAL, "invalid or unsupported host architecture for KVM: %s\n", MACHINE_TYPE); return FALSE; } kvm->ofp = ...
false
false
false
false
true
1
copy(int fd, uint32_t dst, int dst_tiling, uint32_t src, int src_tiling) { retry: switch (random() % 3) { case 0: render_copy(fd, dst, dst_tiling, src, src_tiling, 0); break; case 1: render_copy(fd, dst, dst_tiling, src, src_tiling, 1); break; case 2: if (dst_tiling == I915_TILING_Y || src_tiling == I915_...
false
false
false
false
true
1
getint (Tobj to, int *ip) { if (to && T_ISNUMBER (to)) { *ip = Tgetnumber (to); return 0; } return -1; }
false
false
false
false
false
0
mono_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method) { gboolean is_virtual_generic, is_interface, load_imt_reg; int offset, idx; static guint8 **cache = NULL; static int cache_size = 0; if (!method) return NULL; if (MONO_TYPE_ISSTRUCT (sig->ret)) return NULL; is_virtual_ge...
false
false
false
true
false
1
git_config_read_cb (GiggleGit *git, GiggleJob *job, GError *error, gpointer user_data) { GiggleGitConfigTask *task; GiggleGitConfigPriv *priv; GHashTable *config; gboolean success; GList *l; task = (GiggleGitConfigTask *) user_data; priv = GET_PRIV (task...
false
false
false
false
false
0
ext2fs_new_dir_block(ext2_filsys fs, ext2_ino_t dir_ino, ext2_ino_t parent_ino, char **block) { struct ext2_dir_entry *dir = NULL; errcode_t retval; char *buf; int rec_len; int filetype = 0; EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); retval = ext2fs_get_mem(fs->blocksize, &buf); if (...
false
false
false
false
false
0
vprbrd_iio_read_raw(struct iio_dev *iio_dev, struct iio_chan_spec const *chan, int *val, int *val2, long info) { int ret, error = 0; struct vprbrd_adc *adc = iio_priv(iio_dev); struct vprbrd *vb = adc->vb; struct vprbrd_adc_msg *admsg = (struct vprbrd_adc_msg *)vb->buf; switch (info) { case IIO_C...
false
false
false
false
false
0
button_toggled_callback (GtkWidget *w, gpointer data) { StpuiGammaCurve *c = data; StpuiCurveType type; int active, i; if (!GTK_TOGGLE_BUTTON (w)->active) return; active = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (w), "_StpuiGammaCurveIndex")); for (i = 0; i < 3; ++i) if ((i != active) && GTK...
false
false
false
false
false
0
grant_blocked_inode_locks (xlator_t *this, pl_inode_t *pl_inode, pl_dom_list_t *dom) { struct list_head granted; pl_inode_lock_t *lock; pl_inode_lock_t *tmp; INIT_LIST_HEAD (&granted); pthread_mutex_lock (&pl_inode->mutex); { __grant_blocked_inode_locks ...
false
false
false
false
false
0
Argument_add_cleanup(Argument *arg, Argument_Cleanup_Func cleanup_func, gpointer user_data){ register Argument_Cleanup *cleanup = g_new(Argument_Cleanup, 1); cleanup->cleanup_func = cleanup_func; cleanup->user_data = user_data; g_ptr_array_add(arg->cle...
false
false
false
false
false
0
pendulum_update (a_pendulum *p, int *angle256) { int i; int n = read_htimer (p->pendulum_timer); p->elapsed_time += NBR_STEPS * n; /* Make many smalls step rather than one big step for more accuracy. */ for (i = NBR_STEPS * n; i; --i) pendulum_one_step (p); /* ANGLE must be an integer between -256 an...
false
false
false
false
false
0
main() { FileParser P(Stdin); PolynomialSet a=P.parsePolynomialSetWithRing(); AsciiPrinter(Stdout).printPolynomialSetList(minimalAssociatedPrimes(a)); return 0; } }
false
false
false
false
false
0
redc_basecase_n (mp_ptr rp, mp_ptr cp, mp_srcptr np, const mp_size_t nn, const mp_ptr invm) { #ifdef HAVE___GMPN_REDC_2 REDC2(rp, cp, np, nn, invm); #else /* HAVE___GMPN_REDC_2 is not defined */ #ifdef HAVE___GMPN_REDC_1 REDC1(rp, cp, np, nn, invm[0]); #else /* neither HAVE___GMPN_REDC_2 nor HAVE_...
false
false
false
false
false
0
gf_smil_timing_insert_clock(GF_Node *elt, Bool is_end, Double clock) { u32 i, count, found; SVGTimedAnimBaseElement *timed = (SVGTimedAnimBaseElement*)elt; SMIL_Time *begin; GF_List *l; GF_SAFEALLOC(begin, SMIL_Time); begin->type = GF_SMIL_TIME_EVENT_RESOLVED; begin->clock = clock; l = is_end ? *timed->timing...
false
false
false
true
false
1
tokenize( const QString& line ) const { // kDebug(kfile_area); KUrl::List urls; KUrl u( ops->url() ); u.adjustPath(KUrl::AddTrailingSlash); QString name; const int count = line.count( QLatin1Char( '"' ) ); if ( count == 0 ) { // no " " -> assume one single file if (!QDir::isAbsolut...
false
false
false
false
false
0
sgetsave(char *s) { char *new = malloc((unsigned) strlen(s) + 1); if (new == NULL) { perror_reply(421, "Local resource failure: malloc"); dologout(1); /* NOTREACHED */ } (void) strcpy(new, s); return (new); }
false
false
false
false
false
0
edsf_memory_icon_construct (GType object_type, const gchar* image_type, guint8* image_data, int image_data_length1) { EdsfMemoryIcon * self = NULL; guint8* _tmp0_ = NULL; gint _tmp0__length1 = 0; guint8* _tmp1_ = NULL; gint _tmp1__length1 = 0; const gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; self = (EdsfMemory...
false
false
false
false
false
0
block_capacity ( struct interface *intf, struct block_device_capacity *capacity ) { struct interface *dest; block_capacity_TYPE ( void * ) *op = intf_get_dest_op ( intf, block_capacity, &dest ); void *object = intf_object ( dest ); if ( op ) { op ( object, capacity ); } else { /* Default is to do no...
false
false
false
false
false
0
connection_or_init_conn_from_address(or_connection_t *conn, const tor_addr_t *addr, uint16_t port, const char *id_digest, int started_here) { const node_t *r = node_get_by_id(id_digest); connection_or_set_...
false
false
false
false
false
0
egg_list_box_real_leave_notify_event (GtkWidget *widget, GdkEventCrossing *event) { EggListBox *list_box = EGG_LIST_BOX (widget); EggListBoxChildInfo *child = NULL; if (event->window != gtk_widget_get_window (GTK_WIDGET (list_box))) return FALSE; if (event->detail != GDK_NOTIFY_INFERIOR) chi...
false
false
false
false
false
0
GammaBuilder_free(CTX ctx, kRawPtr *o) { knh_GammaBuilderEX_t *b = DP((kGammaBuilder*)o); if(b->gcapacity) { KNH_FREE(ctx, b->gf, b->gcapacity * sizeof(knh_gamma2_t)); } knh_bodyfree(ctx, b, GammaBuilder); }
false
false
false
false
false
0
get_ppp_stats(u, stats) int u; struct pppd_stats *stats; { struct ifpppstatsreq req; memset (&req, 0, sizeof (req)); req.stats_ptr = (caddr_t) &req.stats; strlcpy(req.ifr__name, ifname, sizeof(req.ifr__name)); if (ioctl(sock_fd, SIOCGPPPSTATS, &req) < 0) { error("Couldn't get PPP statisti...
false
false
false
false
false
0
pk_transaction_finish_invalidate_caches (PkTransaction *transaction) { PkTransactionPrivate *priv = transaction->priv; g_return_val_if_fail (PK_IS_TRANSACTION (transaction), FALSE); /* copy this into the cache */ pk_cache_set_results (priv->cache, priv->role, priv->results); /* could the update list have change...
false
false
false
false
false
0
SelectBelow_ (MolComplexS *mol_complexSP, int mol_complexesN, int selection_modeI) { long selected_atomsN = 0; int mol_complexI; MolComplexS *curr_mol_complexSP; size_t atomsN, atomI; VectorS normal_vectorS; double plane_center_x, plane_center_y, plane_center_z; AtomS *curr_atomSP; double x, y, z; VectorS ...
false
false
false
false
false
0
bpq_device_event(struct notifier_block *this, unsigned long event, void *ptr) { struct net_device *dev = netdev_notifier_info_to_dev(ptr); if (!net_eq(dev_net(dev), &init_net)) return NOTIFY_DONE; if (!dev_is_ethdev(dev)) return NOTIFY_DONE; switch (event) { case NETDEV_UP: /* new ethernet device ->...
false
false
false
false
false
0
nv50_bus_hwsq_exec(struct nvkm_bus *bus, u32 *data, u32 size) { struct nvkm_device *device = bus->subdev.device; int i; nvkm_mask(device, 0x001098, 0x00000008, 0x00000000); nvkm_wr32(device, 0x001304, 0x00000000); for (i = 0; i < size; i++) nvkm_wr32(device, 0x001400 + (i * 4), data[i]); nvkm_mask(device, 0x00...
false
false
false
false
false
0
op_format(oap, keep_cursor) oparg_T *oap; int keep_cursor; /* keep cursor on same text char */ { long old_line_count = curbuf->b_ml.ml_line_count; /* Place the cursor where the "gq" or "gw" command was given, so that "u" * can put it back there. */ curwin->w_cursor = oap->cursor_start; ...
false
false
false
false
false
0
spilled_pseudo_p (rtx op) { return (REG_P (op) && REGNO (op) >= FIRST_PSEUDO_REGISTER && in_mem_p (REGNO (op))); }
false
false
false
false
false
0
pci_iov_virtfn_devfn(struct pci_dev *dev, int vf_id) { if (!dev->is_physfn) return -EINVAL; return (dev->devfn + dev->sriov->offset + dev->sriov->stride * vf_id) & 0xff; }
false
false
false
false
false
0
ring_buffer_attach(struct perf_event *event, struct ring_buffer *rb) { struct ring_buffer *old_rb = NULL; unsigned long flags; if (event->rb) { /* * Should be impossible, we set this when removing * event->rb_entry and wait/clear when adding event->rb_entry. */ WARN_ON_ONCE(event->rcu_pending...
false
false
false
false
false
0
clutter_point_equals (const ClutterPoint *a, const ClutterPoint *b) { if (a == b) return TRUE; if (a == NULL || b == NULL) return FALSE; return fabsf (a->x - b->x) < FLOAT_EPSILON && fabsf (a->y - b->y) < FLOAT_EPSILON; }
false
false
false
false
false
0
set_preedit_style (const char *style) { if (style == NULL) { im_hangul_preedit_attr = im_hangul_preedit_foreground; } else if (g_ascii_strcasecmp(style, "underline") == 0) { im_hangul_preedit_attr = im_hangul_preedit_underline; } else if (g_ascii_strcasecmp(style, "reverse") == 0) { im_hangul_preedit_att...
false
false
false
false
false
0
nlm4svc_test (rpcsvc_request_t *req) { xlator_t *vol = NULL; nlm4_stats stat = nlm4_failed; struct nfs_state *nfs = NULL; nfs3_state_t *nfs3 = NULL; nfs3_call_state_t *cs = NULL; int...
false
false
false
false
false
0
tun_free_netdev(struct net_device *dev) { struct tun_struct *tun = netdev_priv(dev); BUG_ON(!(list_empty(&tun->disabled))); tun_flow_uninit(tun); security_tun_dev_free_security(tun->security); free_netdev(dev); }
false
false
false
false
false
0
input_thread(void *_t) { atransport *t = _t; apacket *p; int active = 0; D("%s: starting transport input thread, reading from fd %d\n", t->serial, t->fd); for(;;){ if(read_packet(t->fd, t->serial, &p)) { D("%s: failed to read apacket from transport on fd %d\n", ...
false
false
false
false
false
0
bc_set_method_descriptor(JVM_METHOD *meth, char *desc) { int c; if(!meth) { BAD_ARG(); return -1; } if(desc) { c = cp_find_or_insert(meth->class, CONSTANT_Utf8, desc); if(c < 0) return -1; meth->descriptor_index = c; } return 0; }
false
false
false
false
false
0
fill_sorted_blocks(int64_t *dst, const int size, const int block_size) { int i, filled, this_block_size; filled = 0; for (i = 0; i < size; i += block_size) { this_block_size = (filled + block_size) < size ? block_size : (size - filled); fill_random(dst + filled, this_block_size); qsort(dst + filled, ...
false
false
false
false
false
0
foreach_operand_pes(Pe_statement *pe_head, void (*func)(Operand *op, void *func_param), void *param) { Pe_statement *pe; Statement *stm; for (pe= pe_head; pe != NULL; pe = pe->next) { for (stm = pe->stm_head; stm != NULL; stm = stm->next) { foreach_...
false
false
false
false
false
0
e_attachment_open_async (EAttachment *attachment, GAppInfo *app_info, GAsyncReadyCallback callback, gpointer user_data) { OpenContext *open_context; CamelMimePart *mime_part; GFile *file; g_return_if_fail (E_IS_ATTACHMENT (attachment)); f...
false
false
false
false
false
0
button1Release(const XEvent *) { arrow()->select(MSFalse); if (arrowTimer()!=0) arrowTimer()->stop(); }
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)); Editor *_t = static_cast<Editor *>(_o); switch (_id) { case 0: _t->closed((*reinterpret_cast< const QString(*)>(_a[1]))); break;...
false
false
false
false
false
0
panel_section_changed_nt (G_GNUC_UNUSED gpointer id, GmConfEntry *entry, gpointer data) { gint section = 0; g_return_if_fail (EKIGA_IS_MAIN_WINDOW (data)); if (gm_conf_entry_get_type (entry) == GM_CONF_INT) { EkigaMainWindow* mw = EKIGA_MAIN_WINDOW (data)...
false
false
false
false
false
0
sigar_proc_modules_get(sigar_t *sigar, sigar_pid_t pid, sigar_proc_modules_t *procmods) { FILE *fp; char buffer[BUFSIZ], *ptr; unsigned long inode, last_inode = 0; (void)SIGAR_PROC_FILENAME(buffer, pid, "/maps"); if (!(fp = fopen(buffer, "r"))) { return errno; ...
false
false
false
false
false
0
setRowNames (GGobiData * d, gchar ** rownames) { int i; gchar *lbl; for (i = 0; i < d->nrows; i++) { lbl = (rownames != (gchar **) & DefaultRowNames && rownames != (gchar **) NULL && rownames[i] != (gchar *) NULL) ? g_strdup (rownames[i]) : g_strdup_printf ("%d", ...
false
false
false
false
false
0
borg_eat_unknown(void) { int i, n = -1; /* Scan the pack */ for (i = 0; i < INVEN_MAX_PACK; i++) { borg_item *item = &borg_items[i]; /* Skip empty items */ if (!item->iqty) continue; /* Require correct tval */ if (item->tval != TV_FOOD) continue; /* Sk...
false
false
false
false
false
0
source_config_is_usable (source_config *source) { const char *source_uri; source_uri = g_hash_table_lookup (source->config, "uri"); if (!source_config_is_enabled (source) || !source_uri || strlen (source_uri) == 0 || !source->supported_locally) { return FALSE; } ret...
false
false
false
false
false
0
getFileName() { #ifndef WIN32 return std::wstring(fromMbcs(getenv("HOME"))) + L"/.einstein/einsteinrc"; #else return L"einstein.cfg"; #endif }
false
false
false
false
false
0