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
create_character_set_sensitive(int sensitive) { int i; gtk_widget_set_sensitive(button_cc_done, sensitive); gtk_widget_set_sensitive(button_choose_starting_map, sensitive); gtk_widget_set_sensitive(entry_new_character_name, sensitive); gtk_widget_set_sensitive(combobox_rs, sensitive); gtk_widge...
false
false
false
false
false
0
init() { m_fontInfoIterator = 0; m_backend = Document::SplashBackend; paperColor = Qt::white; m_hints = 0; m_optContentModel = 0; if ( count == 0 ) { utf8Map = 0; globalParams = new GlobalParams(); setErrorCallback(qt...
false
false
false
false
false
0
GetArrayType( char *p, char **pEnd, STABCOFFMAP *pMap, unsigned short *DerivedBits, int ExtraLevels ){ int MinIndex, MaxIndex, Result, Size, i; char *pMinIndex, *pMaxIndex, *pType; unsigned short Type; Result = True; pMinIndex = pMaxIndex = pType = 0; while ( *p && (*p != ';') ) p++; /*...
false
false
false
false
true
1
lms_dlna_get_image_profile(struct lms_image_info *info) { const struct lms_dlna_image_profile *rules = _get_image_rules(info); const struct lms_dlna_image_profile *profile; if (!rules) return NULL; for (profile = rules; !_image_rule_is_sentinel(profile); profile++) { const struct lms_dlna_imag...
false
false
false
false
false
0
var(const string & n, btp_stack & s) { string name = www2id(n); if (_var->is_constructor_type()) return _var->var(name, s); else { s.push((BaseType *) this); return _var; } }
false
false
false
false
false
0
add_enums(Class *c) { GList *li; out_printf(out, "\n"); if(signals>0) { out_printf(out, "enum {\n"); for(li=c->nodes;li;li=g_list_next(li)) { Node *n = li->data; if(n->type == METHOD_NODE) { Method *m = (Method *)n; if(m->method == SIGNAL_LAST_METHOD || m->method == SIGNAL_FIRST_METHOD) { ...
false
false
false
false
false
0
decode_writev( struct pfs_process *p, int entering, int syscall, INT64_T *args ) { if(entering) { int fd = args[0]; struct pfs_kernel_iovec *uv = (struct pfs_kernel_iovec *)POINTER(args[1]); int count = args[2]; struct pfs_kernel_iovec *v; int size; char *buffer; int result; if(!uv || count<=0) { ...
false
false
false
false
false
0
trimline(struct replay_thread *thr, const char *str) { size_t len; char *p; /* skip leading space */ while (*str && *str == ' ') ++str; /* seek to end of string */ for (len = 0; str[len]; ++len) /* nothing */ ; /* trim trailing space */ while (len && str[len - 1] == ' ') --len; /* copy and return */...
false
false
false
false
false
0
date_hash(PyDateTime_Date *self) { if (self->hashcode == -1) self->hashcode = generic_hash( (unsigned char *)self->data, _PyDateTime_DATE_DATASIZE); return self->hashcode; }
false
false
false
false
false
0
HPseek(filerec_t *file_rec,int32 offset) { CONSTR(FUNC, "HPseek"); intn ret_value = SUCCEED; #ifdef HFILE_SEEKINFO printf("%s: file_rec=%p, last_offset=%ld, offset=%ld, last_op=%d",FUNC,file_rec,(long)file_rec->f_cur_off,(long)offset,(int)file_rec->last_op); #endif /* HFILE_SEEKINFO */ if(file_rec->f_cur_off...
false
false
false
false
false
0
ast_format_cap_iter_next(struct ast_format_cap *cap, struct ast_format *format) { struct ast_format *tmp = ao2_iterator_next(&cap->it); if (!tmp) { return -1; } ast_format_copy(format, tmp); ao2_ref(tmp, -1); return 0; }
false
false
false
false
false
0
DVDReadBlocks( dvd_file_t *dvd_file, int offset, size_t block_count, unsigned char *data ) { int ret; /* Check arguments. */ if( dvd_file == NULL || offset < 0 || data == NULL ) return -1; /* Hack, and it will still fail for multiple opens in a threaded app ! */ if( dvd_file->dvd-...
false
false
false
false
false
0
get_min_degree (byte *board, int i, int j) { int k, x, y; int min_deg = 8; for (k=0; k<8; k++) { int deg; x = i + incx[k]; y = j + incy[k]; if (ISINBOARD (x, y) && IS_FREE(board [y * board_wid + x])) if ((deg = get_degree (board, x, y)) < min_deg) min_deg = deg; } return min_deg; }
false
false
false
false
false
0
cp_build_function_call (tree function, tree params, tsubst_flags_t complain) { VEC(tree,gc) *vec; tree ret; vec = make_tree_vector (); for (; params != NULL_TREE; params = TREE_CHAIN (params)) VEC_safe_push (tree, gc, vec, TREE_VALUE (params)); ret = cp_build_function_call_vec (function, &vec, complain);...
false
false
false
false
false
0
BuildStackAlignAND(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, DebugLoc DL, unsigned Reg, uint64_t MaxAlign) const { uint64_t Val = -MaxAlign; unsigned AndOp = getANDriOpcode(U...
false
false
false
false
false
0
display16_lookup(int d16_ix, ucs4_t ucs4) { int row, col; int ix; /* Handle errors. */ if (d16_ix < 0) return -1; /* Handle ISO 10646-1. */ if (d16_ix == ISO10646_IX) return (int)ucs4; /* Handle more errors. */ if ((unsigned)d16_ix >= (ND16 - 1)) return -1; /* Check for a match in the pro...
false
false
false
false
false
0
GdipGetPenDashArray (GpPen *pen, float *dash, int count) { if (!pen || !dash) return InvalidParameter; if (count == 0) return OutOfMemory; if (count != pen->dash_count) return InvalidParameter; memcpy (dash, pen->dash_array, count * sizeof (float)); return Ok; }
false
false
false
false
false
0
mark_stdr_wires(void) { register int32 gi; register struct mod_t *mdp; register struct conta_t *cap; int32 i, skip_giarr; struct gate_t *gp; struct giarr_t *giap; giap = NULL; for (mdp = __modhdr; mdp != NULL; mdp = mdp->mnxt) { for (gi = 0; gi < mdp->mgnum; gi++) { gp = &(mdp->mgates[gi]); ...
false
false
false
false
false
0
i915_mmio_setup(struct drm_device *dev) { struct drm_i915_private *dev_priv = to_i915(dev); int mmio_bar; int mmio_size; mmio_bar = IS_GEN2(dev) ? 1 : 0; /* * Before gen4, the registers and the GTT are behind different BARs. * However, from gen4 onwards, the registers and the GTT are shared * in the same BA...
false
false
false
false
false
0
select(GlyphIndex i) { if (item_ != i) { if (item_ != -1) { active(item_, false); } if (i >= -1 && i < items_->count()) { item_ = i; if (i >= 0) { active(item_, true); } } } }
false
false
false
false
false
0
dsp3780I_DisableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings) { unsigned long flags; unsigned short usDspBaseIO = pSettings->usDspBaseIO; DSP_ISA_SLAVE_CONTROL rSlaveControl; PRINTK_1(TRACE_3780I, "3780i::dsp3780i_DisableDSP entry\n"); rSlaveControl.ClockControl = 0; rSlaveControl.SoftReset = TRUE; rSlaveControl...
false
false
false
false
false
0
nvt_remove(struct pnp_dev *pdev) { struct nvt_dev *nvt = pnp_get_drvdata(pdev); unsigned long flags; spin_lock_irqsave(&nvt->nvt_lock, flags); /* disable CIR */ nvt_cir_reg_write(nvt, 0, CIR_IREN); nvt_disable_cir(nvt); /* enable CIR Wake (for IR power-on) */ nvt_enable_wake(nvt); spin_unlock_irqrestore(&nvt-...
false
false
false
false
false
0
gap_story_new_section() { GapStorySection *new_section; new_section = g_new(GapStorySection, 1); new_section->stb_elem = NULL; new_section->section_name = NULL; new_section->current_vtrack = 1; new_section->section_id = global_stb_elem_id++; new_section->version = 0; new_section->next = NU...
false
false
false
false
false
0
binop3_mod_bang(t_binop *x) { int n2 = x->x_f2, result; if (n2 < 0) n2 = -n2; else if (!n2) n2 = 1; result = ((int)(x->x_f1)) % n2; if (result < 0) result += n2; outlet_float(x->x_obj.ob_outlet, (t_float)result); }
false
false
false
false
false
0
minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) { int error; struct inode *inode; if (!old_valid_dev(rdev)) return -EINVAL; inode = minix_new_inode(dir, mode, &error); if (inode) { minix_set_inode(inode, rdev); mark_inode_dirty(inode); error = add_nondir(dentry, inode); ...
false
false
false
false
false
0
selectionPressed( GtkTreeView *psTreeView, GdkEventButton *psEvent, gpointer pUserData ) { GtkTreeSelection *psSelection = gtk_tree_view_get_selection( psTreeView ); GtkTreeModel *psModel; GtkTreeIter sIter; if ( ( psEvent -> type != GDK_BUTTON_PRESS ) || ( psEvent -> button != 1 ) ) { return FALSE; } if ( gt...
false
false
false
false
false
0
IoSQLite3_columnNamesResultRow(void *context, int argc, char **argv, char **azColName) { IoSQLite3 *self = context; int i = 0; for (i= 0; i < argc; i ++) { if (!strcmp(azColName[i], "name")) { IoList_rawAppend_(DATA(self)->results, IOSYMBOL(argv[i])); break; } } return 0; }
false
false
false
false
false
0
ath9k_process_tsf(struct ath_rx_status *rs, struct ieee80211_rx_status *rxs, u64 tsf) { u32 tsf_lower = tsf & 0xffffffff; rxs->mactime = (tsf & ~0xffffffffULL) | rs->rs_tstamp; if (rs->rs_tstamp > tsf_lower && unlikely(rs->rs_tstamp - tsf_lower > 0x10000000)) rxs->mactime -= 0x100000000ULL;...
false
false
false
false
false
0
tda10048_writeregbulk(struct tda10048_state *state, u8 reg, const u8 *data, u16 len) { struct tda10048_config *config = &state->config; int ret = -EREMOTEIO; struct i2c_msg msg; u8 *buf; dprintk(2, "%s(%d, ?, len = %d)\n", __func__, reg, len); buf = kmalloc(len + 1, GFP_KERNEL); if (buf == NULL) { ret =...
false
false
false
false
false
0
tree_model_iter(GtkTreeIter *iter, gpointer model) { gpointer data; if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(sysenv.tree_store), iter)) return(FALSE); do { gtk_tree_model_get(GTK_TREE_MODEL(sysenv.tree_store), iter, TREE_POINTER, &data, -1); if (data == model) return(TRUE); } while (gtk_tree_mod...
false
false
false
false
false
0
enum_prev(const char *dir, ht_registry_node *prevkey) { rec_depth = 0; ht_registry_node *n = find_entry_i(NULL, dir, true); if (n) { if (n->type != RNT_SUBDIR) return NULL; Container *t = ((ht_registry_data_stree*)n->data)->tree; if (prevkey) { return (ht_registry_node *)t->get(t->findL(prevkey)); } else...
false
false
false
false
false
0
MudHandler_ZMP_HandleSubNeg(MudTelnet *telnet, guchar *buf, guint len, MudTelnetHandler *handler) { gchar command_buf[1024]; gint count = 0; gint index = 0; GString *args = g_string_new(NULL); gchar **argv; gint argc; MudZMPFunction zmp_handler = NULL; while(buf[count] != '\0' &...
false
false
false
false
false
0
dbus_g_value_type_build_g_variant_type (GType type) { if (dbus_g_type_is_collection (type)) { GType element_type = dbus_g_type_get_collection_specialization (type); GVariantType *element_sig = dbus_g_value_type_build_g_variant_type ( element_type); GVariantType *ret = g_variant_type_ne...
false
false
false
false
false
0
devel_pragma_enable_check_hooks() { if (DEVEL_PRAGMA_CHECK_HOOKS_ENABLED != 1) { devel_pragma_check_do_file_id = hook_op_check(OP_DOFILE, devel_pragma_check_require, NULL); devel_pragma_check_require_id = hook_op_check(OP_REQUIRE, devel_pragma_check_require, NULL); /* work around B::Hooks::...
false
false
false
false
false
0
fuse_create_resume (fuse_state_t *state) { fd_t *fd = NULL; fuse_private_t *priv = NULL; if (!state->loc.parent) { gf_log ("glusterfs-fuse", GF_LOG_WARNING, "%"PRIu64" CREATE %s/%s resolution failed", state->finh->uniqu...
false
false
false
false
true
1
ReadImageInfo(VP8LBitReader* const br, int* const width, int* const height, int* const has_alpha) { if (VP8LReadBits(br, 8) != VP8L_MAGIC_BYTE) return 0; *width = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1; *height = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1; *...
false
false
false
false
false
0
set_seat_properties (Seat *seat, const gchar *config_section) { gchar **keys; gint i; keys = config_get_keys (config_get_instance (), "SeatDefaults"); for (i = 0; keys[i]; i++) { gchar *value = config_get_string (config_get_instance (), "SeatDefaults", keys[i]); seat_set_property (s...
false
false
false
false
false
0
save_filesys (int num, int *len) { uae_u8 *dstbak, *dst; UnitInfo *ui; int type = is_hardfile (num); ui = &mountinfo.ui[num]; if (!ui->open) return NULL; /* not initialized yet, do not save */ if ((type == FILESYS_VIRTUAL || type == FILESYS_CD) && ui->self == NULL) return NULL; write_log (_T("FS_FILESYS: '...
false
false
false
false
false
0
abituguru3_synchronize(struct abituguru3_data *data) { int x, timeout = ABIT_UGURU3_SYNCHRONIZE_TIMEOUT; x = abituguru3_wait_while_busy(data); if (x != ABIT_UGURU3_SUCCESS) { ABIT_UGURU3_DEBUG("synchronize timeout during initial busy " "wait, status: 0x%02x\n", x); return -EIO; } outb(0x20, data->addr + A...
false
false
false
false
false
0
get_declarer_elements (NODE_T * p, SCOPE_T ** r, BOOL_T no_ref) { if (p != NO_NODE) { if (IS (p, BOUNDS)) { gather_scopes_for_youngest (SUB (p), r); } else if (IS (p, INDICANT)) { if (MOID (p) != NO_MOID && TAX (p) != NO_TAG && HAS_ROWS (MOID (p)) && no_ref) { scope_add (r, p, scope_make_t...
false
false
false
false
false
0
reiserfs_for_each_xattr(struct inode *inode, int (*action)(struct dentry *, void *), void *data) { struct dentry *dir; int i, err = 0; struct reiserfs_dentry_buf buf = { .ctx.actor = fill_with_dentries, }; /* Skip out, an xattr has no xattrs associated with it */ if (IS_PRIVATE(inode) || get_inod...
false
false
false
false
false
0
ClearBreakpoint(unsigned int address) { int k; for (k = 0; k < cpu8051.bp_count; k++) { if (cpu8051.bp[k] == address) { /* Fill removed breakpoint slot with last entry */ cpu8051.bp[k] = cpu8051.bp[cpu8051.bp_count - 1]; cpu8051.bp_count--; } } }
false
false
false
false
false
0
g_strstr_len (const gchar *haystack, gssize haystack_len, const gchar *needle) { g_return_val_if_fail (haystack != NULL, NULL); g_return_val_if_fail (needle != NULL, NULL); if (haystack_len < 0) return strstr (haystack, needle); else { const gchar *p = haystack; gsize ...
false
false
false
false
false
0
gf_cli3_1_get_volume (call_frame_t *frame, xlator_t *this, void *data) { gf_cli_req req = {{0,}}; int ret = 0; cli_cmd_volume_get_ctx_t *ctx = NULL; dict_t *dict = NULL; int32_t...
false
false
false
false
false
0
update_minmaxll() { minlag = INT_MAX; maxlead =INT_MIN; for (Tvarmap::const_iterator it = vars.begin(); it != vars.end(); ++it) { const Tlagmap& lmap = (*it).second; for (Tlagmap::const_iterator itt = lmap.begin(); itt != lmap.end(); ++itt) { int ll = (*itt).first; if (ll < minlag) minlag = ll; if (...
false
false
false
false
false
0
real_process_header(struct stream_t *stream) { struct stream_ctrl_t *stream_ctrl = stream->stream_ctrl; struct rtsp_ctrl_t *rtsp_ctrl = stream_ctrl->rtsp_ctrl; struct rtsp_header_t *rtsp_hdr = NULL; int status_code = 0; int bodylen = 0; uint8_t *body = NULL; char *field = NULL; int got_c...
false
false
false
false
false
0
gth_change_date_task_new (GFile *location, GList *files, /* GthFileData */ GthChangeFields fields, GthChangeType change_type, GthDateTime *date_time, int time_offset) { GthChangeDateTask *self; self = GTH_CHANGE_DATE_TASK (g_object_new (GT...
false
false
false
false
false
0
to_event_str(int event) { static const char* event_str[] = { "CCAE_REMOTE_SHUTDOWN", "CCAE_ACTIVE_CONNECT_RESULTS", "CCAE_CONNECTION_REQUEST", "CCAE_LLP_CLOSE_COMPLETE", "CCAE_TERMINATE_MESSAGE_RECEIVED", "CCAE_LLP_CONNECTION_RESET", "CCAE_LLP_CONNECTION_LOST", "CCAE_LLP_SEGMENT_SIZE_INVALID", "CCAE_...
false
false
false
false
false
0
au_ren_del_whtmp(struct au_ren_args *a) { int err; struct inode *dir; dir = a->dst_dir; SiMustAnyLock(dir->i_sb); if (!au_nhash_test_longer_wh(&a->whlist, a->btgt, au_sbi(dir->i_sb)->si_dirwh) || au_test_fs_remote(a->h_dst->d_sb)) { err = au_whtmp_rmdir(dir, a->btgt, a->h_dst, &a->whlist); if (u...
false
false
false
false
false
0
SetInput (vtkPolyData * Input) { vtkPolyDataMapper *Mapper=(vtkPolyDataMapper *) this->MeshActor->GetMapper(); if (Mapper==0) { Mapper=vtkPolyDataMapper::New(); Mapper->SetResolveCoincidentTopologyToPolygonOffset (); if (this->ImmediateMode) Mapper->ImmediateModeRenderingOn (); this->MeshActor->SetMap...
false
false
false
false
false
0
deg2str (string, lstr, deg, ndec) char *string; /* Character string (returned) */ int lstr; /* Maximum number of characters in string */ double deg; /* Angle in degrees */ int ndec; /* Number of decimal places in degree string */ { char degform[8]; int field; char tstring[64]; double deg1; doub...
false
false
false
false
false
0
username_get(char *name) { struct passwd *p; p = getpwuid(getuid()); if(p) { strcpy(name, p->pw_name); return 1; } else { return 0; } }
false
false
false
false
false
0
zend_check_property_access(zend_object *zobj, const char *prop_info_name, int prop_info_name_len TSRMLS_DC) /* {{{ */ { zend_property_info *property_info; const char *class_name, *prop_name; zval member; zend_unmangle_property_name(prop_info_name, prop_info_name_len, &class_name, &prop_name); ZVAL_STRING(&member,...
false
false
false
false
false
0
pool_gc2() { static int recurse; struct pool_head *entry; if (recurse++) goto out; list_for_each_entry(entry, &pools, list) { void *temp, *next; //qfprintf(stderr, "Flushing pool %s\n", entry->name); next = entry->free_list; while (next && entry->allocated > entry->minavail && entry->a...
false
false
false
false
false
0
plist_get_node_type(plist_t node) { if (node) { plist_data_t data = plist_get_data(node); if (data) return data->type; } return PLIST_NONE; }
false
false
false
false
false
0
cgraph_same_body_alias (struct cgraph_node *decl_node ATTRIBUTE_UNUSED, tree alias, tree decl) { struct cgraph_node *n; #ifndef ASM_OUTPUT_DEF /* If aliases aren't supported by the assembler, fail. */ return NULL; #endif /* Langhooks can create same body aliases of symbols not defined. Those are useless. ...
false
false
false
false
false
0
AddActiveSampler(Sampler* sampler) { ASSERT(sampler->IsActive()); ScopedLock lock(mutex_); if (active_samplers_ == NULL) { active_samplers_ = new List<Sampler*>; } else { ASSERT(!active_samplers_->Contains(sampler)); } active_samplers_->Add(sampler); }
false
false
false
false
false
0
f1x_match_to_this_node(struct amd64_pvt *pvt, unsigned range, u64 sys_addr, int *chan_sel) { int cs_found = -EINVAL; u64 chan_addr; u32 dct_sel_base; u8 channel; bool high_range = false; u8 node_id = dram_dst_node(pvt, range); u8 intlv_en = dram_intlv_en(pvt, range); u32 intlv_sel = dram_intlv_sel(p...
false
false
false
false
false
0
get_file(const std::string& title, Gtk::FileChooserAction action, Conf& _conf) { std::string file; SimpleFileDialog dialog(title, action, _conf); if (dialog.run()) { return dialog.get(); } else { return file; } }
false
false
false
false
false
0
gst_ogm_parse_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) { GstOgmParse *ogm = GST_OGM_PARSE (parent); GstFormat format; gboolean res = FALSE; switch (GST_QUERY_TYPE (query)) { case GST_QUERY_POSITION: { gint64 val; gst_query_parse_position (query, &format, NULL); ...
false
false
false
false
false
0
menu_choice_set_visible(GtkWidget *widget, gboolean visible) { if (visible) { #if GTK_CHECK_VERSION(2,20,0) if (!gtk_widget_get_visible(widget)) gtk_widget_show(widget); #else if (!GTK_WIDGET_VISIBLE(widget)) gtk_widget_show(widget); #endif } else { #if GTK_CHECK_VERSION(2,20,0) if (gtk_widget_get_visible...
false
false
false
false
false
0
color_gamut_clamp (Color * dest, Color * src) { dest->v[0] = CLAMP (src->v[0], 0.0, 1.0); dest->v[1] = CLAMP (src->v[1], 0.0, 1.0); dest->v[2] = CLAMP (src->v[2], 0.0, 1.0); }
false
false
false
false
false
0
php_sockop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) { php_netstream_data_t *sock = (php_netstream_data_t*)stream->abstract; int nr_bytes = 0; if (sock->socket == -1) { return 0; } if (sock->is_blocked) { php_sock_stream_wait_for_data(stream, sock TSRMLS_CC); if (sock->timeout_event) r...
false
false
false
false
false
0
viio_trigger_alloc(const char *fmt, va_list vargs) { struct iio_trigger *trig; trig = kzalloc(sizeof *trig, GFP_KERNEL); if (trig) { int i; trig->dev.type = &iio_trig_type; trig->dev.bus = &iio_bus_type; device_initialize(&trig->dev); mutex_init(&trig->pool_lock); trig->subirq_base = irq_alloc_descs(...
false
false
false
false
false
0
mg_strcasecmp(const char *s1, const char *s2) { int diff; do { diff = lowercase(s1++) - lowercase(s2++); } while (diff == 0 && s1[-1] != '\0'); return diff; }
false
false
false
false
false
0
Decode(std::istream &is, std::ostream &os) { unsigned char packedbytes; unsigned char unpackedbytes[8]; while( is.read((char*)&packedbytes,1) ) { unsigned char mask = 1; for (unsigned int i = 0; i < 8; ++i) { if ( (packedbytes & mask) == 0) { unpackedbytes[i] = 0; }...
false
false
false
false
false
0
IsOnChannel(std::string channel) { for(std::vector<std::string>::iterator i = channels.begin(); i != channels.end(); i++) { if (*i == channel) { return true; } } return false; }
false
false
false
false
false
0
get_bg_tile_info(int tile_index) { int code = kyugo_bgvideoram[tile_index]; int attr = kyugo_bgattribram[tile_index]; SET_TILE_INFO(1, code | ((attr & 0x03) << 8), (attr >> 4) | (bgpalbank << 4), TILE_FLIPYX((attr & 0x0c) >> 2)) }
false
false
false
false
false
0
svq1_parse_string (GetBitContext *bitbuf, uint8_t *out) { uint8_t seed; int i; out[0] = get_bits (bitbuf, 8); seed = string_table[out[0]]; for (i=1; i <= out[0]; i++) { out[i] = get_bits (bitbuf, 8) ^ seed; seed = string_table[out[i] ^ seed]; } }
false
false
false
false
false
0
find_case(unicode_char c) { unsigned idx= c % unicode_case_hash; unsigned i=unicode_case_offset[idx]; unicode_char uc; --i; do { uc=unicode_case_tab[++i][0]; if (uc == c) return (i); } while ( (uc % unicode_case_hash) == idx); return (0); }
false
false
false
false
false
0
previewDialog(QWidget *parent, bool test) { if (!d->m_Printer) d->m_Printer = new QPrinter(QPrinter::ScreenResolution); Q_UNUSED(test); preparePages(); QPrintPreviewDialog dialog(d->m_Printer, parent, Qt::Window | Qt::CustomizeWindowHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint | Q...
false
false
false
false
false
0
gutsOfTransposeTimesScaled(const double * COIN_RESTRICT pi, const double * COIN_RESTRICT columnScale, int * COIN_RESTRICT index, double * COIN_RESTRICT array, const double zeroTolerance) const { int numberNonZero = 0; // get matrix data pointers const int * COIN_RE...
false
false
false
false
false
0
MoveChild(ExpandingToolBar *toolBar, wxRect dropTarget) { int i, j; for(i=0; i<(int)mDropTargets.GetCount(); i++) { if (dropTarget == mDropTargets[i]) { int newIndex = mDropTargetIndices[i]; int newRow = mDropTargetRows[i]; mChildArray.Insert(toolBar, newIndex); mRowArr...
false
false
false
false
false
0
getSemaphoreCount( void ) const { Short aVal(theNumberOfSemaphores); if( aVal == 0 ) { if( this->isPrivate() == false ) { aVal = theGroupCSA->groupSemCount; } else { ; // do nothing } } else { ...
false
false
false
false
false
0
drac3_getinfo(StonithPlugin * s, int reqtype) { struct pluginDevice *drac3d; const char *ret = NULL; ERRIFWRONGDEV(s,NULL); drac3d = (struct pluginDevice *) s; switch (reqtype) { case ST_DEVICEID: ret = drac3d->idinfo; break; case ST_DEVICENAME: ret = drac3d->host; break; case ST_DEVICEDESCR: ...
false
false
false
false
false
0
ergo_CSR_add_equal_structure(csr_matrix_struct* csrDest, const csr_matrix_struct* csrSource) { int n = csrSource->n; int nnz = csrSource->nnz; // Check that matrices have identical structure if(csrDest->symmetryFlag != csrSource->symmetryFlag) return -1; if(memcmp(csrDest->rowList, csrSource->rowList, ...
false
false
false
false
false
0
network_name_to_address( const char *name, network_address *addr ) { struct hostent *h; h = gethostbyname( name ); if(h) { memcpy(addr,h->h_addr,sizeof(*addr)); *addr = ntohl(*addr); return 1; } else { return 0; } }
false
true
false
false
false
1
unmap_window(FvwmWindow *t) { XWindowAttributes winattrs; unsigned long eventMask = 0; Status ret; /* * Prevent the receipt of an UnmapNotify, since that would * cause a transition to the Withdrawn state. */ ret = XGetWindowAttributes(dpy, FW_W(t), &winattrs); if (ret) { eventMask = winattrs.your_event_...
false
false
false
false
false
0
DelPILPluginType(PILPluginType*pitype) { PILValidatePluginType(NULL, pitype, NULL); if (DEBUGPLUGIN) { PILLog(PIL_DEBUG, "DelPILPluginType(%s)", pitype->plugintype); } STATFREE(pitype); g_hash_table_foreach_remove(pitype->Plugins, RmAPILPlugin, NULL); g_hash_table_destroy(pitype->Plugins); DELETE(pitype->plug...
false
false
false
false
false
0
camlidl_abstract0_ap_abstract0_bound_dimension( value _v_man, value _v_a, value _v_v) { ap_manager_ptr man; /*in*/ ap_abstract0_ptr a; /*in*/ ap_dim_t v; /*in*/ struct ap_interval_t *_res; value _vres; struct camlidl_ctx_struct _ctxs = { CAMLIDL_TRANSIENT, NULL }; camlidl_ctx _ctx = &_ctxs; camlidl_...
false
false
false
false
false
0
pythongiInitGtk(void) { /* Long description */ gchar *cl = _("Python scripting"); /* Short description */ gchar *tl = _("Python"); GHashTable *options; ToolOption *opt; const gchar *file; isPanelInitialised = FALSE; panelPython = visu_ui_panel_newWithIconFromPath("Panel_python", cl, ...
false
false
false
false
false
0
run() { Poco::Buffer<char> buffer(BUFFER_SIZE); Poco::Timespan waitTime(WAITTIME_MILLISEC* 1000); while (!_stopped) { try { if (_socket.poll(waitTime, Socket::SELECT_READ)) { Poco::Net::SocketAddress sourceAddress; int n = _socket.receiveFrom(buffer.begin(), BUFFER_SIZE, sourceAddress); if (n ...
false
false
false
false
false
0
copytable (Ttable_t *tp, long ln) { Tkvlist_t **olp, **lp; Tkvlist_t *okvlp, *kvlp, *nkvlp; Tkv_t *kvp; long ik, oln, i, j, k, ind; double rk; char *sk; lp = Mallocate ((long) (ln * T_KVLISTPTRSIZE)); oln = tp->ln, tp->ln = ln; olp = tp->lp, tp->lp = lp; kvlp = NULL; ind = 0...
false
false
false
false
false
0
add(ct_widget_t *widget) { if(widgets) { widget->next = widgets; widget->prev = widgets->prev; widgets->prev->next = widget; widgets->prev = widget; widget->_widget_index = widget->prev->_widget_index + 1; if(!_selected->interactive) select(widget); } else { widget->_widget_index = 0; widget->ne...
false
false
false
false
false
0
knot_zone_contents_class(const knot_zone_contents_t *contents) { if (contents == NULL || contents->apex == NULL || knot_node_rrset(contents->apex, KNOT_RRTYPE_SOA) == NULL) { return KNOT_EINVAL; } return knot_rrset_class(knot_node_rrset(contents->apex, KNOT_RRTYPE_SOA)); }
false
false
false
false
false
0
iser_free_fastreg_pool(struct ib_conn *ib_conn) { struct iser_fr_pool *fr_pool = &ib_conn->fr_pool; struct iser_fr_desc *desc, *tmp; int i = 0; if (list_empty(&fr_pool->all_list)) return; iser_info("freeing conn %p fr pool\n", ib_conn); list_for_each_entry_safe(desc, tmp, &fr_pool->all_list, all_list) { li...
false
false
false
false
false
0
parse_opt (int key, char *arg, struct argp_state *state) { switch (key) { case 'o': target_output_name = arg; break; case 'O': pirate_output_name = arg; break; case 'c': target_cpu = perf_argp_parse_long("CPU", arg, state); if (target_cpu < 0) ...
false
false
false
false
false
0
IsInteriorRing(int nRequestedRingIndex) { OGRGeometry *poGeom; OGRLinearRing *poRing = NULL; poGeom = GetGeometryRef(); if (poGeom && (wkbFlatten(poGeom->getGeometryType()) == wkbPolygon || wkbFlatten(poGeom->getGeometryType()) == wkbMultiPolygon)) { /*------------...
false
false
false
false
false
0
TCSP_UnBind_Internal(TCS_CONTEXT_HANDLE hContext, /* in */ TCS_KEY_HANDLE keyHandle, /* in */ UINT32 inDataSize, /* in */ BYTE * inData, /* in */ TPM_AUTH * privAuth, /* in, out */ UINT32 * outDataSize, /* out */ BYTE ** outData) /* out */ { UINT32 paramSize; TSS_RESULT resul...
false
false
false
false
false
0
read_bits (EnumRegistration& er, string str) { vector<int>::iterator i; vector<string>::iterator s; int result = 0; bool found = false; string::size_type comma; /* catch old-style hex numerics */ if (str.length() > 2 && str[0] == '0' && str[1] == 'x') { int val = strtol (str.c_str(), (char **) 0, 16); ...
false
false
false
false
false
0
qce_setup_regs_ablkcipher(struct crypto_async_request *async_req, u32 totallen, u32 offset) { struct ablkcipher_request *req = ablkcipher_request_cast(async_req); struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); struct qce_cipher_ctx *ctx = crypto_tfm_ctx(async_req->tfm); struct qce_alg_templa...
false
false
false
false
false
0
getDate() { CalendarModel * tmpCal = DataTheme.general.getCalendar(); Q_CHECK_PTR(tmpCal); //return ""; return tmpCal->getLevelName(0,(_day-1)) + QString( ", %1 " ).arg( _daynum ) + tmpCal->getLevelName(2,(_month-1)) + QString( ", %1 " ).arg( _year ); }
false
false
false
false
false
0
set_degstr(void) { const char *deg_default_text[2] = { " C", " F" }; #ifdef HAVE_ICONV /* Size hardcoded for better performance. Don't forget to count the trailing \0! */ size_t deg_latin1_size = 3; char deg_latin1_text[2][3] = { "\260C", "\260F" }; char *deg_latin1_ptr = deg_latin1_text[fahrenheit]; size_t ...
false
false
false
false
false
0
Codegen_expand_format(Codegen *c, gchar *format){ register GString *str = g_string_sized_new(strlen(format)); register gint i, j; register gchar *expanded_format; for(i = 0; format[i]; i++){ g_string_append_c(str, format[i]); if((format[i] == '\n') /* If there is a newline */ ...
false
false
false
false
false
0
SetGraph(vtkGraph *graph) { vtkSetObjectBodyMacro(Graph, vtkGraph, graph); if (this->Graph) { this->Current = 0; this->End = this->Graph->GetNumberOfVertices(); // For a distributed graph, shift the iteration space to cover // local vertices vtkDistributedGraphHelper *helper = this->...
false
false
false
true
false
1
on_speed_spinbutton_changed (GtkEditable *editable, GapPlayerMainGlobalParams *gpp) { if(gpp == NULL) { return; } gpp->speed = GTK_ADJUSTMENT(gpp->speed_spinbutton_adj)->value; /* stop audio at speed changes * (audio will restart automatically at...
false
false
false
false
false
0
connection_add_activate_cb (NMClient *client, NMActiveConnection *connection, const char *path, GError *error, gpointer user_data) { NetDeviceWifi *device_wifi = user_data; if (connection == ...
false
false
false
false
false
0
sizeMess(int argc, t_atom*argv) { switch(argc){ case 1: m_size[0]=m_size[1]=m_size[2]=atom_getfloat(argv); break; case 3: m_size[0]=atom_getfloat(argv++); m_size[1]=atom_getfloat(argv++); m_size[2]=atom_getfloat(argv++); default:; } }
false
false
false
false
false
0
othercase(int ch) { ch = (uch)ch; assert(isalpha(ch)); if (isupper(ch)) return ((uch)tolower(ch)); else if (islower(ch)) return ((uch)toupper(ch)); else /* peculiar, but could happen */ return(ch); }
false
false
false
false
false
0
clear_intrusion(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct it87_data *data = dev_get_drvdata(dev); long val; int config; if (kstrtol(buf, 10, &val) < 0 || val != 0) return -EINVAL; mutex_lock(&data->update_lock); config = it87_read_value(data, IT87_REG_CONFIG)...
false
false
false
false
false
0