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
evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) { const Evas_Smart_Cb_Description *d; Evas_Object_Smart *o; unsigned int i, count = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); o = (Evas_Object_Smar...
false
false
false
false
false
0
init_usb_rx(struct zd_usb *usb) { struct zd_usb_rx *rx = &usb->rx; spin_lock_init(&rx->lock); mutex_init(&rx->setup_mutex); if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH) { rx->usb_packet_size = 512; } else { rx->usb_packet_size = 64; } ZD_ASSERT(rx->fragment_length == 0); INIT_DELAYED_WORK(&...
false
false
false
false
false
0
tpm2_flush_context_cmd(struct tpm_chip *chip, u32 handle, unsigned int flags) { struct tpm_buf buf; int rc; rc = tpm_buf_init(&buf, TPM2_ST_NO_SESSIONS, TPM2_CC_FLUSH_CONTEXT); if (rc) { dev_warn(&chip->dev, "0x%08x was not flushed, out of memory\n", handle); return; } tpm_buf_append_u32(&buf, ha...
false
false
false
false
false
0
tiny_num_FB_primes(unsigned long bits) { unsigned long i; for (i = 0; i < PTABSIZE_SMALL; i++) { if (prime_tab_small[i][0] > bits) break; } return prime_tab_small[i-1][1]; }
false
false
false
false
true
1
cow_create(const char *filename, int64_t image_sectors, const char *image_filename, int flags) { int fd, cow_fd; struct cow_header_v2 cow_header; struct stat st; if (flags) return -ENOTSUP; cow_fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, ...
false
false
false
false
true
1
cpl_matrix_swap_columns(cpl_matrix *matrix, cpl_size column1, cpl_size column2) { double swap; cpl_size nrow; if (matrix == NULL) return cpl_error_set_(CPL_ERROR_NULL_INPUT); if (column1 < 0 || column1 >= matrix->nc || column2 < 0 |...
false
false
false
false
false
0
bLoadFile( const wxString & rosFName ) { // Envoke the base class load operations if( ! SimnBase::bLoadFile( rosFName ) ) return( FALSE ); // Load the independent signal source m_oCpntIndSrc = m_oCpntSwpSrc; return( TRUE ); }
false
false
false
false
false
0
array_entry(int32 i, assembly_operand VAL) { if (!glulx_mode) { /* Array entry i (initial entry has i=0) is set to Z-machine value j */ if (dynamic_array_area_size+(i+1)*array_entry_size > MAX_STATIC_DATA) memoryerror("MAX_STATIC_DATA", MAX_STATIC_DATA); if (array_entry_size==1) { dyna...
false
false
false
false
false
0
OnEvent(const SEvent& event) { if (IsEnabled) { switch(event.EventType) { case EET_GUI_EVENT: switch(event.GUIEvent.EventType) { case EGET_BUTTON_CLICKED: if (event.GUIEvent.Caller == UpButton) { scrollLeft(); return true; } else if (event.GUIEvent.Caller == D...
false
false
false
false
false
0
show_tooltips_changed(property_t prop) { GtkTooltips *tips; gboolean b; tips = GTK_TOOLTIPS(gtk_object_get_data( GTK_OBJECT(gui_main_window()), "tooltips")); update_togglebutton(prop); gui_prop_get_boolean_val(prop, &b); if (b) { gtk_tooltips_enable(tooltips); gtk_tooltips_ena...
false
false
false
false
false
0
smack_bprm_committing_creds(struct linux_binprm *bprm) { struct task_smack *bsp = bprm->cred->security; if (bsp->smk_task != bsp->smk_forked) current->pdeath_signal = 0; }
false
false
false
false
false
0
isl_val_add(__isl_take isl_val *v1, __isl_take isl_val *v2) { if (!v1 || !v2) goto error; if (isl_val_is_nan(v1)) { isl_val_free(v2); return v1; } if (isl_val_is_nan(v2)) { isl_val_free(v1); return v2; } if ((isl_val_is_infty(v1) && isl_val_is_neginfty(v2)) || (isl_val_is_neginfty(v1) && isl_val_is...
false
false
false
false
false
0
custom_list_iter_next (GtkTreeModel * tree_model, GtkTreeIter * iter) { chanlistrow *record, *nextrecord; CustomList *custom_list = CUSTOM_LIST (tree_model); record = (chanlistrow *) iter->user_data; /* Is this the last record in the list? */ if ((record->pos + 1) >= custom_list->num_rows) return FALSE; next...
false
false
false
false
false
0
faulthandler_stack_overflow(PyObject *self) { size_t depth, size; char *sp = (char *)&depth, *stop; depth = 0; stop = stack_overflow(sp - STACK_OVERFLOW_MAX_SIZE, sp + STACK_OVERFLOW_MAX_SIZE, &depth); if (sp < stop) size = stop - sp; ...
false
false
false
false
false
0
mycmp(char *str,char *within, char *end ) { while ( within<end ) { if ( *str!=*within ) return( *str-*within ); ++str; ++within; } return( *str=='\0'?0:1 ); }
false
false
false
false
false
0
utf8_char_width(const unsigned char* w) { if(w[0] < 0x80) return 1; if(w[0] < 0xe0) return 2; if(w[0] < 0xf0) return 3; if(w[0] < 0xf8) return 4; if(w[0] < 0xfc) return 5; if(w[0] < 0xfe) return 6; return -1; }
false
false
false
false
false
0
ocfs2_insert_extent(handle_t *handle, struct ocfs2_extent_tree *et, u32 cpos, u64 start_blk, u32 new_clusters, u8 flags, struct ocfs2_alloc_context *meta_ac) { int status; int uninitialized_var(free_records); struct buffer_head *last_eb_bh = NULL; struct ocfs2_insert_type insert = {0, }; struct o...
false
false
false
false
true
1
_sensor_info_output (ipmi_dcmi_state_data_t *state_data, uint8_t sensor_type, uint8_t entity_id) { fiid_obj_t obj_cmd_rs = NULL; uint8_t entity_instance_start = 0x01; /* starts at 1, not 0 */ unsigned int total_entity_instances_parsed = 0; int rv = -1; assert (state_...
false
false
false
false
false
0
fullscreen_mouse_moved(GtkWidget *widget, GdkEventButton *bevent, gpointer data) { FullScreenData *fs = data; if (!(fs->cursor_state & FULLSCREEN_CURSOR_NORMAL)) { fs->cursor_state |= FULLSCREEN_CURSOR_NORMAL; if (!(fs->cursor_state & FULLSCREEN_CURSOR_BUSY)) clear_mouse_cursor(fs->window, fs->cursor_state); ...
false
false
false
false
false
0
gmpc_metaimage_select_file (GmpcMetaImage * self) { #line 1606 "gmpc-metaimage.c" #define __GOB_FUNCTION__ "Gmpc:MetaImage::select_file" #line 785 "gmpc-metaimage.gob" g_return_if_fail (self != NULL); #line 785 "gmpc-metaimage.gob" g_return_if_fail (GMPC_IS_METAIMAGE (self)); #line 1612 "gmpc-metaimage.c" { #line 788...
false
false
false
false
false
0
special_dig_out_iface_ctl_set(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *uval) { struct snd_bebob *bebob = snd_kcontrol_chip(kctl); struct special_params *params = bebob->maudio_special_quirk; unsigned int id; int err; id = uval->value.enumerated.item[0]; if (id >= ARRAY_SIZE(special_dig_out_ifa...
false
false
false
false
false
0
stpi_unpack_4_1(int length, const unsigned char *in, unsigned char **outs) { unsigned char tempin, bit, temp0, temp1, temp2, temp3; if (length <= 0) return; for (bit = 128, temp0 = 0, temp1 = 0, temp2 = 0, temp3 = 0; length > 0; length --) { tempin = *in++; if (tempin & 1...
false
false
false
false
false
0
autorun_get_preferences (CcInfoPanel *self, const char *x_content_type, gboolean *pref_start_app, gboolean *pref_ignore, gboolean *pref_open_folder) { char **x_content_start_app; char **x_content_ignore; char **x_c...
false
false
false
false
false
0
userspace_is_remote_recovering(struct dm_dirty_log *log, region_t region) { int r; uint64_t region64 = region; struct log_c *lc = log->context; static unsigned long limit; struct { int64_t is_recovering; uint64_t in_sync_hint; } pkg; size_t rdata_size = sizeof(pkg); /* * Once the mirror has been r...
false
false
false
false
false
0
ompfbe_ddsche_write_gettask_modules(fsbe_context *cx, Hmdf_table *hmdf) { int cl_no; int pc_no; int pe_no; for (cl_no = 0; cl_no < hmdf->clustering_num; cl_no++) { for (pc_no = 0; pc_no < hmdf->pc_num; pc_no++) { for (pe_no = 0; pe_no < hmdf->pe_num; pe_no++) { ompfb...
false
false
false
false
false
0
setup_getp_0(VMG_ vm_obj_id_t self, vm_val_t *retval, uint *argc, char **new_ext) { static CVmNativeCodeDesc desc(0); /* check arguments */ if (get_prop_check_argc(retval, argc, &desc)) return TRUE; /* set up the return value */ return setup_getp_re...
false
false
false
false
false
0
gst_sim_syn_create_gaussian_white_noise (GstBtSimSyn * src, gint16 * samples) { gint i=0, j, ct=src->generate_samples_per_buffer; gdouble amp, ampf; ampf = src->volume * 32767.0; while (i < ct) { /* the volume envelope */ gst_controller_sync_values (src->volenv_controller, src->note_count); amp ...
false
false
false
false
false
0
parseSeekHead(MatroskaFile *mf,ulonglong toplen) { FOREACH(mf,toplen) case 0x4dbb: parseSeekEntry(mf,len); break; ENDFOR(mf); }
false
false
false
false
false
0
set_times(struct archive_write_disk *a) { time_t atime = a->start_time, mtime = a->start_time; long atime_nsec = 0, mtime_nsec = 0; /* If no time was provided, we're done. */ if (!archive_entry_atime_is_set(a->entry) #if HAVE_STRUCT_STAT_ST_BIRTHTIME && !archive_entry_birthtime_is_set(a->entry)...
false
false
false
false
false
0
p7_profile_SameAsVF(const P7_OPROFILE *om, P7_PROFILE *gm) { int k; int x; /* Transitions */ /* <= -eslINFINITY test is used solely to silence compiler. really testing == -eslINFINITY */ for (x = 0; x < gm->M*p7P_NTRANS; x++) gm->tsc[x] = (gm->tsc[x] <= -eslINFINITY) ? -eslINFINITY : roundf(om->scale_w *...
false
false
false
false
false
0
monster_death_use (edict_t * self) { self->flags &= ~(FL_FLY | FL_SWIM); self->monsterinfo.aiflags &= AI_GOOD_GUY; if (self->item) { Drop_Item (self, self->item); self->item = NULL; } if (self->deathtarget) self->target = self->deathtarget; if (!self->target) return; G_UseTar...
false
false
false
false
false
0
handleCrossing(const XCrossingEvent &crossing) { if (crossing.serial != ignore_enternotify_hack && crossing.serial != ignore_enternotify_hack + 1) { if (crossing.type == EnterNotify /* && crossing.mode != NotifyNormal */) { fEdgeTrigger->stopHide(); } else if (crossing.type == LeaveN...
false
false
false
false
false
0
intel_psr_write_vsc(struct intel_dp *intel_dp, const struct edp_vsc_psr *vsc_psr) { struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); struct drm_device *dev = dig_port->base.base.dev; struct drm_i915_private *dev_priv = dev->dev_private; struct intel_crtc *crtc = to_intel_crtc(dig_port->base.base....
false
false
false
false
false
0
osinfo_deployment_get_preferred_device_link(OsinfoDeployment *deployment, OsinfoFilter *filter) { g_return_val_if_fail(OSINFO_IS_DEPLOYMENT(deployment), NULL); g_return_val_if_fail(OSINFO_IS_FILTER(filter), NULL); GList *tmp = deployment->priv->deviceLinks; // For each device in section list, apply fi...
false
false
false
false
false
0
keyMatch( uint pattern, const QKeyEvent *event ) const { bool ok = false; if ( event && pattern < ( uint )d_keyPattern.count() ) ok = keyMatch( d_keyPattern[int( pattern )], event ); return ok; }
false
false
false
false
false
0
run_eval_on_string(data_t *input) { char *tmp_str; reader_node_t *tmp; String string; save_regs(); string = input->data.text; tmp_str = util_to_mbs(string); tmp = reader_read_string(tmp_str); if(tmp) { classifier_run(tmp); val = eval(tmp); } else { val = dat...
false
false
false
false
false
0
write_c_array_file(char *filename, void *buf, unsigned int buf_len) { FILE *output; unsigned char *data; unsigned int i; output = fopen(filename, "w"); data = buf; fprintf(output, "unsigned char %s[] =\n{", c_array_name); for (i=0; i<buf_len; ++i) { ...
false
false
false
false
true
1
_send_launch_failure (launch_tasks_request_msg_t *msg, slurm_addr_t *cli, int rc) { slurm_msg_t resp_msg; launch_tasks_response_msg_t resp; int nodeid; char *name = NULL; #ifndef HAVE_FRONT_END nodeid = nodelist_find(msg->complete_nodelist, conf->node_name); name = xstrdup(conf->node_name); #else nodeid = 0; n...
false
true
false
false
false
1
ComputeWithUnit(double dfValue, OGRSTUnitId eInputUnit) { OGRSTUnitId eOutputUnit = GetUnit(); double dfNewValue = dfValue; // dfValue in Meter; if (eOutputUnit == eInputUnit) return dfValue; switch (eInputUnit) { case OGRSTUGround: dfNewValue = dfValue / m_dfScale; ...
false
false
false
false
false
0
endmd5(md5p, buf, sizep) md5_t *md5p; u_char *buf; ALLOC_T *sizep; { ALLOC_T ptr; int i, n; md5p -> x[md5p -> n] |= (1 << ((md5p -> b) + BITSPERBYTE - 1)); if (md5p -> n >= 14) { calcmd5(md5p); memset((char *)(md5p -> x), 0, sizeof(md5p -> x)); } md5p -> x[14] = md5p -> cl; md5p -> x[15] = md5p -> ch; calc...
false
false
false
false
false
0
init() { create("amulet of change", 150, 20, MATERIAL_METAL, PROPERTY_SEX_CHANGE, true); create("amulet of ESP", 150, 20, MATERIAL_METAL, PROPERTY_ESP, true); create("amulet of life saving", 150, 20, MATERIAL_METAL, PROPERTY_LIFE_SAVING, false); create("amulet of magical breathing", 150, 20, MATERIAL_METAL, PROPERT...
false
false
false
false
false
0
technology_disable(struct connman_technology *technology) { int err; DBG("technology %p disable", technology); __sync_synchronize(); if (technology->enabled == FALSE) return -EALREADY; if (technology->pending_reply != NULL) return -EBUSY; if (technology->tethering == TRUE) set_tethering(technology, FALS...
false
false
false
false
false
0
dicod_xlevdist(dico_stream_t str, int argc, char **argv) { if (c_strcasecmp(argv[1], "tell") == 0) stream_printf(str, "280 %d\n", levenshtein_distance); else if (isdigit(argv[1][0]) && argv[1][0] != '0' && argv[1][1] == 0) { levenshtein_distance = atoi(argv[1]); stream_printf(str, "250 ok - Levenshtein thre...
false
false
false
false
false
0
_evas_textblock_node_text_free(Evas_Object_Textblock_Node_Text *n) { if (!n) return; eina_ustrbuf_free(n->unicode); if (n->utf8) free(n->utf8); if (n->par) n->par->text_node = NULL; free(n); }
false
false
false
false
false
0
update_leap_status(NTP_Leap leap, time_t now) { struct tm stm; int leap_sec; leap_sec = 0; if (leap_tzname && now && leap == LEAP_Normal) leap = get_tz_leap(now); if (leap == LEAP_InsertSecond || leap == LEAP_DeleteSecond) { /* Insert/delete leap second only on June 30 or December 31 and in ...
false
false
false
false
false
0
r5l_recovery_log(struct r5l_log *log) { struct r5l_recovery_ctx ctx; ctx.pos = log->last_checkpoint; ctx.seq = log->last_cp_seq; ctx.meta_page = alloc_page(GFP_KERNEL); if (!ctx.meta_page) return -ENOMEM; r5l_recovery_flush_log(log, &ctx); __free_page(ctx.meta_page); /* * we did a recovery. Now ctx.pos p...
false
false
false
false
false
0
bluetooth_applet_agent_reply_pincode (BluetoothApplet *self, const char *request_key, const char *pincode) { GDBusMethodInvocation* invocation; g_return_if_fail (BLUETOOTH_IS_APPLET (self)); g_return_if_fail (request_key != NULL); invocation = g_hash_table_lookup (self->pending_reque...
false
false
false
false
false
0
generic_read_dumpfile(ulonglong addr, void *buffer, long size, char *type, ulong error_handle) { int fd; int retval; retval = TRUE; if (!pc->dumpfile) error(FATAL, "command requires a dumpfile\n"); if ((fd = open(pc->dumpfile, O_RDONLY)) < 0) error(FATAL, "%s: %s\n", pc->dumpfile, strerror(errno)); i...
false
true
false
false
true
1
vnic_cq_alloc(struct vnic_dev *vdev, struct vnic_cq *cq, unsigned int index, unsigned int desc_count, unsigned int desc_size) { int err; cq->index = index; cq->vdev = vdev; cq->ctrl = vnic_dev_get_res(vdev, RES_TYPE_CQ, index); if (!cq->ctrl) { vdev_err("Failed to hook CQ[%d] resource\n", index); return -EI...
false
false
false
false
false
0
asn1PE_H245GenericParameter (OOCTXT* pctxt, H245GenericParameter* pvalue) { int stat = ASN_OK; ASN1BOOL extbit; /* extension bit */ extbit = 0; encodeBit (pctxt, extbit); encodeBit (pctxt, (ASN1BOOL)pvalue->m.supersedesPresent); /* encode parameterIdentifier */ stat = asn1PE_H245ParameterI...
false
false
false
false
false
0
block_table_init(void) { uint64_t pfn, section, max_section, *block_table; max_section = divideup(sd->dump_header->max_mapnr, SADUMP_PF_SECTION_NUM); block_table = calloc(sizeof(uint64_t), max_section); if (!block_table) { error(INFO, "sadump: cannot allocate memory for block_table\n"); return FALSE; } for...
false
false
false
false
false
0
__pyx_f_7sklearn_5utils_13weight_vector_12WeightVector_add(struct __pyx_obj_7sklearn_5utils_13weight_vector_WeightVector *__pyx_v_self, __pyx_t_7sklearn_5utils_13weight_vector_DOUBLE *__pyx_v_x_data_ptr, __pyx_t_7sklearn_5utils_13weight_vector_INTEGER *__pyx_v_x_ind_ptr, int __pyx_v_xnnz, double __pyx_v_c) { int __py...
false
false
false
false
false
0
break_seek_selected(gboolean focus) { GtkTreeViewColumn *column; gtk_tree_view_get_cursor(tree, NULL, &column); if (column) { static const char *unseeks[] = { "break_enabled_column", "break_ignore_column", "break_cond_column", "break_script_column", NULL }; const char *name = gtk_buildable_get_name(GTK_BUI...
false
false
false
false
false
0
hradio_float(t_hradio *x, t_floatarg f) { int i=(int)f; if(i < 0) i = 0; if(i >= x->x_number) i = x->x_number-1; if (pd_class(&x->x_gui.x_obj.ob_pd) == hradio_old_class) { /* compatibility with earlier "vdial" behavior */ if((x->x_change)&&(i != x->x_on_old)) ...
false
false
false
false
false
0
XGISetModeNew(struct xgifb_video_info *xgifb_info, struct xgi_hw_device_info *HwDeviceExtension, unsigned short ModeNo) { unsigned short ModeIdIndex; struct vb_device_info VBINF; struct vb_device_info *pVBInfo = &VBINF; pVBInfo->IF_DEF_LVDS = 0; if (HwDeviceExtension->jChipType >= XG20) pVBInfo->VBType =...
false
false
false
false
false
0
sha1_write( void *context, const void *inbuf_arg, size_t inlen) { const unsigned char *inbuf = inbuf_arg; SHA1_CONTEXT *hd = context; size_t nblocks; if (hd->count == 64) /* Flush the buffer. */ { TRANSFORM( hd, hd->buf, 1 ); _gcry_burn_stack (88+4*sizeof(void*)); hd->count = 0; hd...
false
false
false
false
false
0
getActualMaximum(UCalendarDateFields field, UErrorCode& status) const { if (field == UCAL_YEAR) { int32_t era = get(UCAL_ERA, status); if (U_FAILURE(status)) { return 0; // error case... any value } if (era == kCurrentEra) { // TODO: Investigate what value sho...
false
false
false
false
false
0
cl_com_trigger_external_fds(cl_com_handle_t* handle, cl_select_method_t mode) { cl_bool_t retval = CL_FALSE; if(handle->file_descriptor_list != NULL) { cl_fd_list_elem_t *fd; cl_raw_list_lock(handle->file_descriptor_list); fd = cl_fd_list_get_first_elem(handle->file_descriptor_list); whil...
false
false
false
false
false
0
snd_make_pwl(time_type t0, rate_type sr, LVAL lis) { register pwl_susp_type susp; /* sr specified as input parameter */ /* t0 specified as input parameter */ sample_type scale_factor = 1.0F; falloc_generic(susp, pwl_susp_node, "snd_make_pwl"); susp->bpt_ptr = lis; susp->incr = 0.0; susp-...
false
false
false
false
false
0
try_force_unload(unsigned int flags) { int ret = (flags & O_TRUNC); if (ret) add_taint(TAINT_FORCED_RMMOD, LOCKDEP_NOW_UNRELIABLE); return ret; }
false
false
false
false
false
0
hns_set_pauseparam(struct net_device *net_dev, struct ethtool_pauseparam *param) { struct hns_nic_priv *priv = netdev_priv(net_dev); struct hnae_handle *h; struct hnae_ae_ops *ops; assert(priv || priv->ae_handle); h = priv->ae_handle; ops = h->dev->ops; if (!ops->set_pauseparam) return -ESRCH; re...
false
false
false
false
false
0
gtk_combofix_set_popup_position ( GtkComboFix *combofix ) { gint x, y; gint height; GdkRectangle rectangle; gint horizontal_separator; GtkComboFixPrivate *priv = combofix -> priv; if ( !combofix ) return FALSE; /* get the position of the combofix */ gdk_window_get_origin ( GTK_WID...
false
false
false
false
false
0
t5x9_disable ( struct nic *nic ) { /* stop card */ outw(RX_DISABLE, nic->ioaddr + EP_COMMAND); outw(RX_DISCARD_TOP_PACK, nic->ioaddr + EP_COMMAND); while (inw(nic->ioaddr + EP_STATUS) & S_COMMAND_IN_PROGRESS) ; outw(TX_DISABLE, nic->ioaddr + EP_COMMAND); outw(STOP_TRANSCEIVER, nic->ioaddr + EP_COMMAND); udelay...
false
false
false
false
false
0
yajl_gen_alloc(const yajl_alloc_funcs * afs) { yajl_gen g = NULL; yajl_alloc_funcs afsBuffer; /* first order of business is to set up memory allocation routines */ if (afs != NULL) { if (afs->malloc == NULL || afs->realloc == NULL || afs->free == NULL) { return NULL; ...
false
true
false
false
false
1
T1_GetKerning( int FontID, char char1, char char2) { METRICS_ENTRY entry; METRICS_ENTRY *target_pair=NULL; /* Check whether font is loaded: */ if (T1_CheckForFontID(FontID)!=1){ T1_errno=T1ERR_INVALID_FONTID; return(0); } /* If no AFM info is present, we return an error */ if (pFontBase->pFon...
false
false
false
false
false
0
dumpr() const { VisitedSDNodeSet once; DumpNodesr(dbgs(), this, 0, nullptr, once); }
false
false
false
false
false
0
IoBlock_argumentNames(IoBlock *self, IoObject *locals, IoMessage *m) { /*doc Block argumentNames Returns a List of strings containing the argument names of the receiver. */ IoList *argsList = IoList_new(IOSTATE); LIST_FOREACH(DATA(self)->argNames, i, v, IoList_rawAppend_(argsList, (IoObject *)v)); return args...
false
false
false
false
false
0
operator==(const Matrix &a, const Matrix &b) { if(a.cols() != b.cols() && a.rows() != b.rows()) { return false; } return equal(a.begin(),a.end(),b.begin()); }
false
false
false
false
false
0
gedit_history_entry_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *spec) { GeditHistoryEntryPrivate *priv; g_return_if_fail (GEDIT_IS_HISTORY_ENTRY (object)); priv = GEDIT_HISTORY_ENTRY (object)->priv; switch (prop_id) { case PROP_HISTORY_ID: g_value...
false
false
false
false
false
0
SplineCharMerge(SplineChar *sc,SplineSet **head,int type) { SplineSet *spl, *prev=NULL, *next; for ( spl = *head; spl!=NULL; spl = next ) { next = spl->next; if ( SplinePointListMerge(sc,spl,type)==NULL ) { if ( prev==NULL ) *head = next; else prev->next = next; chunkfree(spl,sizeof(*spl))...
false
false
false
false
false
0
ath6kl_htc_pipe_start(struct htc_target *target) { struct sk_buff *skb; struct htc_setup_comp_ext_msg *setup; struct htc_packet *packet; htc_config_target_hif_pipe(target); /* allocate a buffer to send */ packet = htc_alloc_txctrl_packet(target); if (packet == NULL) { WARN_ON_ONCE(1); return -ENOMEM; } ...
false
false
false
false
false
0
ExtractKeyFromLink(char** text, char const* const* linkTypes, int* found_idx, char** something1 /*= NULL*/) { // skip empty if (!*text || !** text) return NULL; // return non link case char* arg = ExtractQuotedOrLiteralArg(text); if (arg) { if (found_idx) *found_idx ...
false
false
false
false
false
0
selectVSplatMaskR(SDValue N, SDValue &Imm) const { APInt ImmValue; EVT EltTy = N->getValueType(0).getVectorElementType(); if (N->getOpcode() == ISD::BITCAST) N = N->getOperand(0); if (selectVSplat(N.getNode(), ImmValue, EltTy.getSizeInBits()) && ImmValue.getBitWidth() == EltTy.getSizeInBits()) { ...
false
false
false
false
false
0
login(mail::account::openInfo openInfoArg) { if (ptr) { mail::account *s=ptr; ptr=NULL; delete s; } if (imap_disconnect) delete imap_disconnect; ptr=NULL; imap_disconnect=NULL; imap_disconnect=new mail::ACCOUNT::disconnectCallback(*this); mail::ACCOUNT::callback callback( *this ); if (!imap_discon...
false
false
false
false
false
0
fl_get_submatrix( void * in, int rows, int cols, int r1, int c1, int rs, int cs, unsigned int esize ) { int i; ...
false
true
false
false
false
1
sony_nc_lid_resume_setup(struct platform_device *pd, unsigned int handle) { unsigned int result; int i; if (sony_call_snc_handle(handle, 0x0000, &result)) return -EIO; lid_ctl = kzalloc(sizeof(struct snc_lid_resume_control), GFP_KERNEL); if (!lid_ctl) return -ENOMEM; lid_ctl->status = result & 0x7; l...
false
false
false
false
false
0
pipeline_thread(void *arg) { int i; int status; int workeridx; WORKER_INFO *info; ESL_THREADS *obj; ESL_SQ_BLOCK *block = NULL; void *newBlock; impl_ThreadInit(); obj = (ESL_THREADS *) arg; esl_threads_Started(obj, &workeridx); info = (WORKER_INFO *) esl_threads_GetData(obj, wor...
false
false
false
false
false
0
relabel_self_seq_next(struct seq_file *s, void *v, loff_t *pos) { struct task_smack *tsp = current_security(); return smk_seq_next(s, v, pos, &tsp->smk_relabel); }
false
false
false
false
false
0
processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index) { LEErrorCode success = LE_NO_ERROR; // todo- make a param? const IndicRearrangementStateEntry *entry = entryTable.getAlias(index,success); ByteOffset newState = SWAPW(entry->newStateOffset); IndicRearrangementFlags ...
false
false
false
false
false
0
plist(const char** fmt, union arg** args, ei_x_buff* x, int size) { int res = 0; const char* p = *fmt; char after = *p++; if (after == ']') --p; while (isspace((int)*p)) ++p; switch (*p++) { case ']': if (after == ',') res = -1; else { if (after != '|') ei_x_encode_empty_lis...
false
false
false
false
false
0
impl_DataBookView_set_fields_of_interest (EGdbusBookView *object, GDBusMethodInvocation *invocation, const gchar * const *in_fields_of_interest, EDataBookView *view) { gint ii; g_return_val_i...
false
false
false
false
false
0
couple() { double *tensor = pressure->vector; if (pstyle == ISO) p_current[0] = p_current[1] = p_current[2] = pressure->scalar; else if (pcouple == XYZ) { double ave = 1.0/3.0 * (tensor[0] + tensor[1] + tensor[2]); p_current[0] = p_current[1] = p_current[2] = ave; } else if (pcouple == XY) { do...
false
false
false
false
false
0
isBox(Point * verts, int cnt) { if (cnt != 4) return 0; if (verts[0].y == verts[1].y) return ((verts[2].y == verts[3].y) && (verts[0].x == verts[3].x) && (verts[1].x == verts[2].x)); else return ((verts[0].x == verts[1].x) && (verts[2].x == verts[3].x) && (verts[0].y == verts[3].y) && (verts[1].y ...
false
false
false
false
false
0
s3fwrn5_i2c_write(void *phy_id, struct sk_buff *skb) { struct s3fwrn5_i2c_phy *phy = phy_id; int ret; mutex_lock(&phy->mutex); phy->irq_skip = false; ret = i2c_master_send(phy->i2c_dev, skb->data, skb->len); if (ret == -EREMOTEIO) { /* Retry, chip was in standby */ usleep_range(110000, 120000); ret = i2...
false
false
false
false
false
0
lg_FindECPrivateKeyAttribute(NSSLOWKEYPrivateKey *key, CK_ATTRIBUTE_TYPE type, CK_ATTRIBUTE *attribute, SDB *sdbpw) { unsigned char hash[SHA1_LENGTH]; CK_KEY_TYPE keyType = CKK_EC; switch (type) { case CKA_KEY_TYPE: return lg_ULongAttribute(attribute, type, keyType); case CKA_ID: SHA1_HashBuf...
false
false
false
false
false
0
GrgChkOutConVia(fig,rcnlynxdebug) lofig_list *fig; short rcnlynxdebug; /************************************************************* * Cette procedure verifie la correspondance entre connecteur * * physique vers connecteur logique, et le regroupement des * * vias. ...
false
false
false
false
false
0
get_point_size(GF_Matrix2D *mat, Fixed *w, Fixed *h) { GF_Point2D pt; pt.x = mat->m[0] + mat->m[1]; pt.y = mat->m[3] + mat->m[4]; *w = *h = gf_divfix(FLT2FIX(1.41421356f) , gf_v2d_len(&pt)); }
false
false
false
false
false
0
setNew(Window win) { if (m_window != 0 && m_destroy) XDestroyWindow(display(), m_window); m_window = win; if (m_window != 0) { updateGeometry(); XWindowAttributes attr; attr.screen = 0; //get screen number if (XGetWindowAttributes(display(), ...
false
false
false
false
false
0
attachErrorInterface(as_object& o) { Global_as& gl = getGlobal(o); int flags = 0; o.init_member("toString", gl.createFunction(error_toString), flags); o.init_member("message", "Error", flags); o.init_member("name", "Error", flags); }
false
false
false
false
false
0
radeon_driver_irq_preinstall(struct drm_device * dev) { drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; u32 dummy; if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) return; /* Disable *all* interrupts */ if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS600) RADEON_...
false
false
false
false
false
0
getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot) { if (symbolTableGet(propertyName, slot)) return true; if (JSValue** location = getDirectLocation(propertyName)) { slot.setValueSlot(this, location); return true; } // Only return the built-...
false
false
false
false
false
0
_nrrd_TMF_d2_c0_4ef_N_f(float *f, const float *x, size_t len, const double *parm) { float t; size_t I; int i; AIR_UNUSED(parm); /* TMF_d2_c0_4ef */ for (I=0; I<len; I++) { t = x[I] + 3; i = (int)((t<0) ? t-1 : t); /* HEY scrutinize cast */ t -= AIR_CAST(float, i); f[I] = AIR_CAST(float, TMF_d...
false
false
false
false
false
0
refill_reqs_available(struct kioctx *ctx, unsigned head, unsigned tail) { unsigned events_in_ring, completed; /* Clamp head since userland can write to it. */ head %= ctx->nr_events; if (head <= tail) events_in_ring = tail - head; else events_in_ring = ctx->nr_events - (head ...
false
false
false
false
false
0
sb800_get_smb(void) { int lbyte, hbyte; __outb(AMD_SMBUS_BASE_REG + 1, AMD_INDEX_IO_PORT); lbyte = __inb(AMD_DATA_IO_PORT); __outb(AMD_SMBUS_BASE_REG, AMD_INDEX_IO_PORT); hbyte = __inb(AMD_DATA_IO_PORT); smbusbase = lbyte; smbusbase <<= 8; smbusbase += hbyte; smbusbase &= 0xFFE0; ...
false
false
false
false
false
0
deleteAllBanners() { unsigned int i = 0; while ( i < banners.size() ) { delete banners[i]; i++; } banners.clear(); }
false
false
false
false
false
0
makedest(str,start,ssize,size) /* makedest: make the replacement string for an regular expression */ char *str; int start, ssize, size; { char *fr = dst; char *to = str; int as, asize, c; while (*fr && size >= 0) { if (*fr == AMPERSAND) { /* & copies in the pattern that we matched */ if ((size -=...
false
false
false
false
false
0
shade_next_vertex(shade_coord_stream_t * cs, shading_vertex_t * vertex, patch_color_t *c) { /* Assuming p->c == c, provides a non-const access. */ int code = shade_next_coords(cs, &vertex->p, 1); if (code >= 0) code = shade_next_color(cs, c->cc.paint.values); if (code >= 0) cs->align(cs, ...
false
false
false
false
false
0
style_parse_icon_grid_style( char *option, char *rest, window_style *ps, icon_boxes *ib) { int val[4]; int num; int i; /* The grid always affects the prior iconbox */ if (ib == 0) { /* If no current box */ fvwm_msg( ERR,"CMD_Style", "IconGrid must follow an IconBox in same Style" " command"); ret...
false
false
false
false
false
0
io_get(struct io *io, int c, bool can_read) { char *eol; ssize_t readsize; if (!io->buf) { io->buf = io->bufpos = malloc(BUFSIZ); if (!io->buf) return NULL; io->bufalloc = BUFSIZ; io->bufsize = 0; } while (TRUE) { if (io->bufsize > 0) { eol = memchr(io->bufpos, c, io->bufsize); if (eol) { ...
false
false
false
false
false
0
gm_worlds_view_populate_worlds(GmWorldsView *view) { GmApp *app = gm_app_instance(); GList *worlds = gm_app_worlds(app); GList *item; GmWorld *world; for (item = worlds; item; item = item->next) { world = (GmWorld *)(item->data); gm_worlds_view_add_world(view, world); } g_list_free(worlds); }
false
false
false
false
false
0