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
query_exec (MatchRulePrivate * mrp, AtspiCollectionSortOrder sortby, GList * ls, gint kount, gint max, AtkObject * obj, glong index, gboolean flag, AtkObject * pobj, gboolean recurse, gboolean traverse) { switch (sortby) { case ATSPI_Collection_SORT_ORDER_CANONI...
false
false
false
false
false
0
search_monitor_remove (NemoDirectory *directory, gconstpointer client) { NemoSearchDirectory *search; SearchMonitor *monitor; GList *list; search = NEMO_SEARCH_DIRECTORY (directory); for (list = search->details->monitor_list; list != NULL; list = list->next) { monitor = list->data; if (monitor->cli...
false
false
false
false
false
0
unix_authenticate(void *instance, REQUEST *request) { #ifdef OSFSIA char *info[2]; char *progname = "radius"; SIAENTITY *ent = NULL; info[0] = progname; info[1] = NULL; if (sia_ses_init (&ent, 1, info, NULL, name, NULL, 0, NULL) != SIASUCCESS) return RLM_MODULE_NOTFOUND; if ((ret = sia_ses_authent (NUL...
true
true
false
false
false
1
git_repository_selector_set_remote (GitRepositorySelector *self, const gchar *remote) { g_free (self->priv->remote); self->priv->remote = NULL; if (remote) { self->priv->remote = g_strdup (remote); gtk_label_set_text (GTK_LABEL (self->priv->selected_remote_label), ...
false
false
false
false
false
0
set_op (GelCtx *ctx, GelETree * * a, gboolean *exception) { GelToken *id; GelEFunc *func; if G_UNLIKELY ( ! check_argument_string_or_identifier (a, 0, "set")) return NULL; if (a[0]->type == GEL_IDENTIFIER_NODE) { id = a[0]->id.id; } else /* GEL_STRING_NODE */ { id = d_intern (a[0]->str.str); } if G_UNLIKE...
false
false
false
false
false
0
tracker_task_unref (TrackerTask *task) { g_return_if_fail (task != NULL); if (g_atomic_int_dec_and_test (&task->ref_count)) { g_object_unref (task->file); if (task->data && task->destroy_notify) { (task->destroy_notify) (task->data); } g_slice_free (TrackerTask, task); } }
false
false
false
false
false
0
efx_probe_port(struct efx_nic *efx) { int rc; netif_dbg(efx, probe, efx->net_dev, "create port\n"); if (phy_flash_cfg) efx->phy_mode = PHY_MODE_SPECIAL; /* Connect up MAC/PHY operations table */ rc = efx->type->probe_port(efx); if (rc) return rc; /* Initialise MAC address to permanent address */ ether_a...
false
false
false
false
false
0
subst(std::string& subject, std::string::size_type offset, const std::string& replacement, int options) const { if (options & RE_GLOBAL) { int rc = 0; std::string::size_type pos = substOne(subject, offset, replacement, options); while (pos != std::string::npos) { ++rc; pos = substOne(subject, pos, repla...
false
false
false
false
false
0
bgav_superindex_seek(bgav_superindex_t * idx, bgav_stream_t * s, int64_t * time, int scale) { int i; int64_t time_scaled; time_scaled = gavl_time_rescale(scale, s->timescale, *time); i = s->last_index_position; /* Go to frame before */ while(i >= ...
false
false
false
false
false
0
sigar_tcp_get(sigar_t *sigar, sigar_tcp_t *tcp) { FILE *fp; char buffer[1024], *ptr=buffer; int status = SIGAR_ENOENT; if (!(fp = fopen(PROC_FS_ROOT "net/snmp", "r"))) { return errno; } while (fgets(buffer, sizeof(buffer), fp)) { if (strnEQ(buffer, SNMP_TCP_PREFIX...
false
false
false
false
false
0
set_prefetch_info(Block *bb_block, Loop_info *prefetch_loop, Def_use_table *array_list, int def_use) { PrefetchInfo *prefetch_info; prefetch_info = alloc_prefetch_info(); prefetch_info->entry = array_list->entry; prefetch_info->dim = get_array_di...
false
false
false
false
false
0
lookup_boxed_transform (GSList *transforms, GType gboxed_type, JsonNodeType node_type) { BoxedTransform lookup; GSList *t; lookup.boxed_type = gboxed_type; lookup.node_type = node_type; t = g_slist_find_custom (transforms, &lookup, boxed_transfo...
false
false
false
false
false
0
iterate_fd(struct files_struct *files, unsigned n, int (*f)(const void *, struct file *, unsigned), const void *p) { struct fdtable *fdt; int res = 0; if (!files) return 0; spin_lock(&files->file_lock); for (fdt = files_fdtable(files); n < fdt->max_fds; n++) { struct file *file; file = rcu_dereference_ch...
false
false
false
false
false
0
acpi_get_table_with_size(char *signature, u32 instance, struct acpi_table_header **out_table, acpi_size *tbl_size) { u32 i; u32 j; acpi_status status; /* Parameter validation */ if (!signature || !out_table) { return (AE_BAD_PARAMETER); } /* Walk the root table list */ for (i = 0, j = 0; i...
false
false
false
false
false
0
mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, int enabled) { struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_active_ports actv_ports = mlx4_get_active_ports( &priv->dev, slave); int min_port = find_first_bit(actv_ports.ports, priv->dev.caps.num_ports) + 1; int max_po...
false
false
false
false
false
0
center_import(Editor* ed, GraphicComp* comp) { if (!ed) return; ed->GetViewer()->Align(comp, /* Center */ 4); if (ed->GetViewer()->GetGrid() != nil) { GravityVar* grav = (GravityVar*) ed->GetState("GravityVar"); if (grav != nil && grav->IsActive()) { // seems we need one for each dimension, x and y ...
false
false
false
false
false
0
encode(const std::string& str, const std::string& reserved, std::string& encodedStr) { for (std::string::const_iterator it = str.begin(); it != str.end(); ++it) { char c = *it; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' || c == '_' || c ==...
false
false
false
false
false
0
print_line (source_location src_loc, const char *special_flags) { /* End any previous line of text. */ if (print.printed) putc ('\n', print.outf); print.printed = 0; if (!flag_no_line_commands) { const struct line_map *map = linemap_lookup (line_table, src_loc); size_t to_file_len = strle...
false
false
false
false
false
0
set_color (const color_value_base& value) { Gdk::Color color = allocate (value.get_color ()); if (is_force_needed ()) { RefPtr<Gtk::Style> style = Gtk::Style::create (); style->set_bg (Gtk::STATE_NORMAL, color); style->set_bg (Gtk::STATE_ACTIVE, color); style->set_bg (Gtk::STATE_PRELIGHT, color); set_styl...
false
false
false
false
false
0
deleteBond(int index) { std::vector<TSingleBond*> tempBond(nBonds()); int i,n; n=0; //bond deletion for (i=0; i<nBonds(); i++) if (i != index) { tempBond[n]=getBond(i); n++; } else { delete(getBond(i)); fBond[i]=NULL; }; fBond.resize(n); for (i=0;...
false
false
false
false
false
0
setup_batch_async (BatchAsyncData *data, gconstpointer service) { GDataCalendarEvent *event; GError *error = NULL; gdata_test_mock_server_start_trace (mock_server, "setup-batch-async"); /* Insert a new event which we can query asyncly */ event = gdata_calendar_event_new (NULL); gdata_entry_set_title (GDATA_ENTR...
false
false
false
false
false
0
cb_instance_max_idle_set(void *arg, void *value, char *errorbuf, int phase, int apply) { cb_backend_instance * inst=(cb_backend_instance *) arg; if (apply) { slapi_rwlock_wrlock(inst->rwl_config_lock); inst->max_idle_time=(int) ((uintptr_t)value); slapi_rwlock_unlock(inst->rwl_config_lock); } re...
false
false
false
false
false
0
_wrap_apol_tcl_open_database(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { char *arg1 = (char *) 0 ; Tcl_Interp *arg2 = (Tcl_Interp *) 0 ; sefs_db *result = 0 ; if (SWIG_GetArgs(interp, objc, objv,"o:apol_tcl_open_database filename ?interp? ",(void *)0) == TCL_ERROR...
false
false
false
false
false
0
nv10_get_spot_coeff(struct gl_light *l, float k[7]) { float e = l->SpotExponent; float a0, b0, a1, a2, b2, a3; if (e > 0) a0 = -1 - 5.36e-3 / sqrt(e); else a0 = -1; b0 = 1 / (1 + 0.273 * e); a1 = get_shine(nv10_spot_params[0], e); a2 = get_shine(nv10_spot_params[1], e); b2 = 1 / (1 + 0.273 * e); a3 = 0...
false
false
false
false
false
0
ubi_remove_volume(struct ubi_volume_desc *desc, int no_vtbl) { struct ubi_volume *vol = desc->vol; struct ubi_device *ubi = vol->ubi; int i, err, vol_id = vol->vol_id, reserved_pebs = vol->reserved_pebs; dbg_gen("remove device %d, volume %d", ubi->ubi_num, vol_id); ubi_assert(desc->mode == UBI_EXCLUSIVE); ubi_as...
false
false
false
false
true
1
moxa_set_tty_param(struct tty_struct *tty, struct ktermios *old_termios) { register struct ktermios *ts = &tty->termios; struct moxa_port *ch = tty->driver_data; int rts, cts, txflow, rxflow, xany, baud; rts = cts = txflow = rxflow = xany = 0; if (ts->c_cflag & CRTSCTS) rts = cts = 1; if (ts->c_iflag & IXON) ...
false
false
false
false
false
0
findtoc (struct cdunit *cdu, int *sectorp) { int i; int sector; if (*sectorp < 0) return NULL; sector = *sectorp; for (i = 0; i <= cdu->tracks; i++) { struct cdtoc *t = &cdu->toc[i]; if (t->address > sector) { if (i == 0) { *sectorp = 0; return t; } t--; sector -= t->address; *sectorp...
false
false
false
false
false
0
gf_svg_is_animation_tag(u32 tag) { return (tag == TAG_SVG_set || tag == TAG_SVG_animate || tag == TAG_SVG_animateColor || tag == TAG_SVG_animateTransform || tag == TAG_SVG_animateMotion || tag == TAG_SVG_discard ) ? 1 : 0; }
false
false
false
false
false
0
eGetPage( void ) { eCmdType ePage; switch( GetSelection( ) ) { case 0 : ePage = eCMD_DC; break; case 1 : ePage = eCMD_AC; break; case 2 : ePage = eCMD_TR; break; default : ePage = eCMD_NONE; } return( ePage ); }
false
false
false
false
false
0
_gcry_mpih_mul_n( mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, mpi_size_t size) { int secure; if( up == vp ) { if( size < KARATSUBA_THRESHOLD ) _gcry_mpih_sqr_n_basecase( prodp, up, size ); else { mpi_ptr_t tspace; secure = _gcry_is_secure( up ); tspace = mpi_alloc_li...
false
false
false
false
false
0
Init(const QString &ip, int port) { bool valid = true; if(port < 0 || port > 65535) { qWarning() << "Invalid port:" << port; valid = false; } QHostAddress host(ip); if(host.toString() != ip) { qWarning() << "Invalid IP:" << ip; valid = false; } if(host == QHostAd...
false
false
false
false
false
0
fix_attack_info() { int techLevel; UnitInfo *unitInfo = unit_res[unit_id]; attack_count = unitInfo->attack_count; if( attack_count > 0 && unitInfo->first_attack > 0) attack_info_array = unit_res.attack_info_array+unitInfo->first_attack-1; else attack_info_array = NULL; if( unitInfo->unit_clas...
false
false
false
false
false
0
f2fs_write_data_pages(struct address_space *mapping, struct writeback_control *wbc) { struct inode *inode = mapping->host; struct f2fs_sb_info *sbi = F2FS_I_SB(inode); bool locked = false; int ret; long diff; trace_f2fs_writepages(mapping->host, wbc, DATA); /* deal with chardevs and other special file *...
false
false
false
false
false
0
UpdateBalloonImage(vtkProp *prop, vtkImageData *image) { vtkPropMapIterator iter = this->PropMap->find(prop); if ( iter != this->PropMap->end() ) { (*iter).second.Image = image; this->WidgetRep->Modified(); } }
false
false
false
false
false
0
generic_proc_open(const char *env, const char *name) { char store[1024]; char *p = getenv(env); if (!p) { p = getenv("PROC_ROOT") ? : "/proc"; snprintf(store, sizeof(store)-1, "%s/%s", p, name); p = store; } return open(p, O_RDONLY); }
true
true
false
false
true
1
find_eoi(struct v4lconvert_data *data, const unsigned char *jpeg_data, int jpeg_data_idx, int jpeg_data_size) { int i; for (i = jpeg_data_idx; i < (jpeg_data_size - 1); i++) if (jpeg_data[i] == 0xff && jpeg_data[i + 1] == 0xd9) break; if (i >= (jpeg_data_size - 1)) { V4LCONVERT_ERR("incomp...
false
false
false
false
false
0
moveLast() { if (rowCount() > 0) { _currentRow = rowCount() - 1; return true; } else return false; }
false
false
false
false
false
0
cso_hash_erase(struct cso_hash *hash, struct cso_hash_iter iter) { struct cso_hash_iter ret = iter; struct cso_node *node = iter.node; struct cso_node **node_ptr; if (node == hash->data.e) return iter; ret = cso_hash_iter_next(ret); node_ptr = (struct cso_node**)(&hash->data.d->buckets[node->k...
false
false
false
false
false
0
_iterator_is_valid (FolksSmallSetIterator *self) { return (_iterator_flag (self, ITER_STARTED) && !_iterator_flag (self, ITER_REMOVED) && self->i < self->set->items->len); }
false
false
false
false
false
0
rb_reader_unlock(struct ring_buffer_per_cpu *cpu_buffer, bool locked) { if (likely(locked)) raw_spin_unlock(&cpu_buffer->reader_lock); return; }
false
false
false
false
false
0
print_i(const rld_t *e, uint64_t i, kstring_t *s) { int j; uint64_t k; k = fm_retrieve(e, i, s); for (j = s->l - 1; j >= 0; --j) putchar("$ACGTN"[(int)s->s[j]]); printf("\t%ld\n", (long)k); }
false
false
false
false
false
0
get_true_edge_from_guard_bb (basic_block bb) { edge e; edge_iterator ei; FOR_EACH_EDGE (e, ei, bb->succs) if (e->flags & EDGE_TRUE_VALUE) return e; gcc_unreachable (); return NULL; }
false
false
false
false
false
0
match(char *norm_input, char *low_input, arg_info *entry, boolean use_prefix) #endif { char *norm_prefix = arg_prefix (*entry); char *norm_string = arg_string (*entry); boolean prefix_match = FALSE, string_match = FALSE; int result = 0; /* Buffers for the lowercased versions of the strings being compar...
false
false
false
false
false
0
free_named_acl(named_acl_t *acl) { struct urlregex_acl_data *ura = NULL; if ( !acl ) return; switch( acl->type ) { case ACL_SRCDOM: case ACL_DSTDOM: if (acl->data) free_dom_list((struct domain_list *)acl->data); acl->data = NULL; break; case ACL_URLREGEX: case ACL_PATHREGEX: case ACL_URLREGEXI: case ACL_P...
false
false
false
false
false
0
shm_pool_allocate (struct shm_pool *pool, size_t size, int *offset) { if (pool->used + size > pool->size) return NULL; *offset = pool->used; pool->used += size; return (char *) pool->data + *offset; }
false
false
false
false
false
0
sysfs_device_set_values(struct sysfs_device *dev, const char *devpath, const char *subsystem, const char *driver) { char *pos; strlcpy(dev->devpath, devpath, sizeof(dev->devpath)); if (subsystem != NULL) strlcpy(dev->subsystem, subsystem, sizeof(dev->subsystem)); if (driver != NULL) strlcpy(dev->driver...
false
false
false
false
false
0
iwl_mvm_remove_aux_roc_te(struct iwl_mvm *mvm, struct iwl_mvm_vif *mvmvif, struct iwl_mvm_time_event_data *te_data) { struct iwl_hs20_roc_req aux_cmd = {}; u32 uid; int ret; if (!__iwl_mvm_remove_time_event(mvm, te_data, &uid)) return; aux_cmd.event_unique_id = cpu_to_le32(uid); aux_cmd.ac...
false
false
false
false
false
0
resetTempFolder() { if(m_tempDir.path() != ".") { FolderUtils::rmdir(m_tempDir); m_tempDir = QDir::temp(); } m_filesReplacedByAlienOnes.clear(); }
false
false
false
false
false
0
_limnObjectScreenTransform(limnObject *obj, limnCamera *cam) { static const char me[]="_limnObjectScreenTransform"; unsigned int vertIdx; limnVertex *vert; float d; if (limnSpaceView != obj->vertSpace) { biffAddf(LIMN, "%s: object's verts in %s (not %s) space", me, airEnumStr(limnSpace, obj-...
false
false
false
false
false
0
DrawTextBase(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore) { if (dc()) { PenColour(fore); _dc->setFont(font_.GetID()); const int segmentLength = 1000; int xbase = rc.left; if (codecBuffer.length()) { codecBuffer=FXString::null; } if (!unicodeMode) { // Fo...
false
false
false
true
false
1
GetCellCoordsType(const wxSheetCoords& coords) { if ((coords.m_row >= 0) && (coords.m_col >= 0)) { return wxSHEET_CELL_GRID; } else if (coords.m_row == -1) { if (coords.m_col == -1) return wxSHEET_CELL_CORNERLABEL; if (coords.m_col >= 0) return wxSHEET...
false
false
false
false
false
0
invert_and_revcomp_path_and_coords (struct T *old, int npairs, int querylength) { struct T *new; int i, j; new = (struct T *) MALLOC(npairs*sizeof(struct T)); for (i = 0, j = npairs-1; i < npairs; i++, j--) { memcpy(&(new[j]),&(old[i]),sizeof(struct T)); new[j].querypos = (querylength - 1) - old[i].que...
false
false
false
false
false
0
on_checkbutton_toggled (GtkToggleButton *togglebutton , gint32 *val_ptr) { GapGveAviGlobalParams *gpp; if(gap_debug) printf("CB: on_checkbutton_toggled: %d\n", (int)togglebutton); if(val_ptr) { if (togglebutton->active) { *val_ptr = 1; // TRUE; } else { *va...
false
false
false
false
false
0
remove (void *object) { ACE_Cleanup_Info_Node *node = 0; for (ACE_Cleanup_Info_Node *iter = registered_objects_.head (); iter != 0; iter = iter->next ()) { if (iter->object () == object) { node = iter; break; } } if (node) { registered_obj...
false
false
false
false
false
0
select(const Field &select, const JoinList &joins, const FieldList &conditions) const { FieldList get; get << select; return this->select(get, joins, conditions); }
false
false
false
false
false
0
get_cmddesc(nut_ctype_t *client, const char *upsname, const char *cmd) { const upstype_t *ups; const char *desc; ups = get_ups_ptr(upsname); if (!ups) { send_err(client, NUT_ERR_UNKNOWN_UPS); return; } if (!ups_available(ups, client)) return; desc = desc_get_cmd(cmd); if (desc) sendback(client, "CM...
false
false
false
false
false
0
ostream_destroy(void *data) { struct ostream *ostr = data; if (ostr->flags & OSTREAM_DESTROY_TRANSPORT) dico_stream_destroy(&ostr->transport); free(data); return 0; }
false
false
false
false
false
0
make_values_for_phi (gimple phi, basic_block block) { tree result = gimple_phi_result (phi); /* We have no need for virtual phis, as they don't represent actual computations. */ if (is_gimple_reg (result)) { pre_expr e = get_or_alloc_expr_for_name (result); add_to_value (get_expr_value_id (...
false
false
false
false
false
0
_dclone(SV* sv) { I32 count; SV* res; dSP; if (!SvROK(sv)) { return sv_mortalcopy(sv); } PUSHMARK(SP); XPUSHs(sv); PUTBACK; count = call_pv("Storable::dclone", G_SCALAR); if (count != 1) { croak("Storable::dclone call failed\n"); } SPAGAIN; res = POPs;...
false
false
false
false
false
0
gtk_source_completion_words_library_get_proposal (GSequenceIter *iter) { if (iter == NULL) { return NULL; } return GTK_SOURCE_COMPLETION_WORDS_PROPOSAL (g_sequence_get (iter)); }
false
false
false
false
false
0
update_without_attrd(const char *host_uuid, const char *name, const char *value, const char *user_name) { if (fsa_cib_conn == NULL) { return -1; } crm_trace("updating status for host_uuid %s, %s=%s", host_uuid, name ? name : "<null>", value ? value : "<null>"); return update_attr_delegate(fsa_c...
false
false
false
false
false
0
jack_client_feeds_transitive (jack_client_internal_t *source, jack_client_internal_t *dest ) { jack_client_internal_t *med; JSList *node; if (jack_slist_find (source->sortfeeds, dest)) { return 1; } for (node = source->sortfeeds; node; node = jack_slist_next (node)) { med = (jack_client_internal_t...
false
false
false
false
false
0
list_check( List *list, void *item ) { int pos = -1; ListEntry *cur = list->head->next; while ( cur != list->tail ) { pos++; if ( cur->item == item ) break; cur = cur->next; } if ( cur == list->tail ) pos = -1; /* item not found */ return pos; }
false
false
false
false
false
0
ParseJSON_Helper( LJValue& result, LJLexer& lexer ) { LJTOKEN token = lexer.Token(); switch(token) { case TOKEN_LSQBRACKET: result.SetArray(); result.SetLineNumber(lexer.Line()); lexer.Next(); ParseJSON_Array(result, lexer); break; case TOKEN_LBRACKET: result.SetObject(); result.SetLineNumber(lexer.L...
false
false
false
false
false
0
brasero_data_disc_rename_activated (BraseroDataDisc *disc) { BraseroDataDiscPrivate *priv; GtkTreeSelection *selection; GtkTreeViewColumn *column; GtkTreePath *treepath; GList *list; priv = BRASERO_DATA_DISC_PRIVATE (disc); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree)); list = gtk_tree...
false
false
false
false
false
0
block_is_inum_file(void) { if (!sbd.gfs1 && block == masterblock("inum")) return TRUE; return FALSE; }
false
false
false
false
false
0
ut_debug_text_rating (UtText * text) { ASSERT (text); if (!text->evaluation) return UT_OK; int i; for (i=0; i<ut_session->nb_charsets; i++) { printf ("=> %2i: chk:%11lx rtg:%6ld %s\n", i, text->evaluation[i].checksum, text->evaluation[i].rating, ut_session->charset[i].name); } return UT_OK; ...
false
false
false
true
false
1
vm_mmap_pgoff(struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flag, unsigned long pgoff) { unsigned long ret; struct mm_struct *mm = current->mm; unsigned long populate; ret = security_mmap_file(file, prot, flag); if (!ret) { down_write(&mm->mmap_sem); ret = do_mm...
false
false
false
false
false
0
gf_proc_dump_open (char *tmpname) { int dump_fd = -1; dump_fd = mkstemp (tmpname); if (dump_fd < 0) return -1; gf_dump_fd = dump_fd; return 0; }
false
false
false
false
false
0
unzClose(unzFile file) { unz64_s* s; if (file == NULL) return UNZ_PARAMERROR; s = (unz64_s*)file; if (s->pfile_in_zip_read != NULL) unzCloseCurrentFile(file); if ((s->filestream != NULL) && (s->filestream != s->filestream_with_CD)) ZCLOSE64(s->z_filefunc, s->filestream); ...
false
false
false
false
false
0
OnWebSocketServerEvent(wxSocketEvent& WXUNUSED(event)) { CWebSocket *client = new CWebSocket(this); if ( m_webserver_socket->AcceptWith(*client, false) ) { webInterface->Show(_("web client connection accepted\n")); } else { delete client; webInterface->Show(_("ERROR: cannot accept web client c...
false
false
false
false
false
0
fdev_pinw_idx2str(int devtype, pinw_idx_t idx) { if (devtype == DEV_IOB) { if (idx < 0 || idx >= sizeof(iob_pinw_str)/sizeof(*iob_pinw_str)) { HERE(); return 0; } return iob_pinw_str[idx]; } if (devtype == DEV_LOGIC) { if (idx < 0 || idx >= sizeof(logic_pinw_str)/sizeof(*logic_pinw_str)) { HERE(); ...
false
false
false
false
false
0
prepareConf2Ack(ZrtpPacketConfirm *confirm2, uint32_t* errMsg) { sendInfo(Info, InfoRespConf2Received); if (!confirm2->isLengthOk()) { *errMsg = CriticalSWError; return NULL; } uint8_t confMac[MAX_DIGEST_LENGTH]; uint32_t macLen; // Use the Initiator's keys here because we are...
false
false
false
false
false
0
WriteBlock(BlockBuilder* block, BlockHandle* handle) { // File format contains a sequence of blocks where each block has: // block_data: uint8[n] // type: uint8 // crc: uint32 assert(ok()); Rep* r = rep_; Slice raw = block->Finish(); Slice block_contents; CompressionType type = r->options.co...
false
false
false
false
false
0
rb_search_entry_changed_cb (GtkEditable *editable, RBSearchEntry *entry) { const char *text; if (entry->priv->clearing == TRUE) { entry->priv->searching = FALSE; rb_search_entry_update_icons (entry); return; } if (entry->priv->timeout != 0) { g_source_remove (entry->priv->timeout); entry->priv->t...
false
false
false
false
false
0
AlphabetToString_op(GelCtx *ctx, GelETree * * a, gboolean *exception) { char *s; const char *alph; int size; int alph_size; int i; GelMatrixW *m; if (a[0]->type == GEL_NULL_NODE) return gel_makenum_string (""); if G_UNLIKELY ( ! check_argument_matrix (a, 0, "AlphabetToString") || ! check_argument_string ...
false
false
false
false
false
0
add_buffer_send(send_buffer *in, struct connectdata *conn, long *bytes_written, /* add the number of sent bytes to this counter */ size_t included_body_bytes, /* how much of the buffer ...
false
false
false
false
false
0
on_adddel_changed(const Gtk::TreeModel::iterator& row, guint /* col */) { //Get old field definition: Document* pDoc = static_cast<Document*>(get_document()); if(pDoc) { const Glib::ustring strFieldNameBeingEdited = m_AddDel.get_value_key(row); sharedptr<const Field> constfield = pDoc->get_field(m_tabl...
false
false
false
false
false
0
runwicked(int argc, char **argv){ char *dbname, *dnstr, *tnstr; int i, dnum, tnum, rv; dbname = NULL; dnstr = NULL; tnstr = NULL; for(i = 2; i < argc; i++){ if(!dbname && argv[i][0] == '-'){ usage(); } else if(!dbname){ dbname = argv[i]; } else if(!dnstr){ dnstr = argv[i]; ...
false
false
false
false
false
0
ArithmEval(int pos1,int pos2) { char *s,*t; int i; /* first define the defined(...) operator */ i=findIdent("defined",strlen("defined")); if (i>=0) warning("the defined(...) macro is already defined"); else { newmacro("defined",strlen("defined"),1); macros[nmacros].macrolen=0; macros[nmacros]...
false
false
false
false
false
0
set_RGBA_from_str(RGBA_Color * color, const char *clr_str) { int r, g, b; int ret; ret = G_str_to_color(clr_str, &r, &g, &b); if (ret == 1) { color->a = RGBA_COLOR_OPAQUE; color->r = (unsigned char)r; color->g = (unsigned char)g; color->b = (unsigned char)b; } else if (ret == 2) color->a ...
false
false
false
false
false
0
bst_insert(bst *t, long key, void *data) { bstnode *n; bstnode *ins; if (t->root && IS_LEAF(t->root)) { bstnode_free(t->root, NULL); t->root = NULL; } if (!t->root) { t->root = bstnode_init(key, data, NULL); if (!t->root) return -1; t->r...
false
false
false
false
false
0
dbsetlbool(LOGINREC * login, int value, int which) { tdsdump_log(TDS_DBG_FUNC, "dbsetlbool(%p, %d, %d)\n", login, value, which); if( login == NULL ) { dbperror(NULL, SYBEASNL, 0); return FAIL; } switch (which) { case DBSETBCP: tds_set_bulk(login->tds_login, (TDS_TINYINT) value); return SUCCEED; break; ...
false
false
false
false
false
0
debug_mask(const char *name, GLbitfield mask) { GLuint i; if (unlikely(INTEL_DEBUG & DEBUG_BLIT)) { DBG("%s clear:", name); for (i = 0; i < BUFFER_COUNT; i++) { if (mask & (1 << i)) DBG(" %s", buffer_names[i]); } DBG("\n"); } }
false
false
false
false
false
0
propertyFlags( const QScriptValue &/*object*/, const QScriptString &name, uint /*id*/) { if (name == length) { return QScriptValue::Undeletable | QScriptValue::SkipInEnumeration; } return QScriptValue::Undeletable; }
false
false
false
false
false
0
CCL(void) { if((IRQMode>>6) == 1) // Count Up { IRQCount++; if((IRQCount == 0) && IRQa) { X6502_IRQBegin(FCEU_IQEXT); } } else if((IRQMode>>6) == 2) // Count down { IRQCount--; if((IRQCount == 0xFF) && IRQa) { X6502_IRQBegin(FCEU_IQEXT); } } }
false
false
false
false
false
0
Add(const String& str_arg) { const char* str = str_arg; String name, value; while (str && *str) { while (isspace(*str)) str++; name = 0; if (!isalpha(*str)) break; // Some isalnum() implementations don't allow all the letters that // isal...
false
false
false
false
false
0
stream_is_memory_buffer_or_local_file (GInputStream *stream) { return G_IS_MEMORY_INPUT_STREAM(stream) || (G_IS_FILE_INPUT_STREAM(stream) && strcmp(g_type_name_from_instance((GTypeInstance*)stream), "GLocalFileInputStream") == 0); }
false
false
false
false
false
0
gen_extendsfdf2 (rtx operand0, rtx operand1) { rtx _val = 0; start_sequence (); { rtx operands[2]; operands[0] = operand0; operands[1] = operand1; #line 4062 "../../src/gcc/config/i386/i386.md" { /* ??? Needed for compress_float_constant since all fp constants are LEGITIMATE_CONSTANT_P. */ ...
false
false
false
false
false
0
soup_message_io_pause (SoupMessage *msg) { SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (msg); SoupMessageIOData *io = priv->io_data; g_return_if_fail (io != NULL); if (io->item && io->item->new_api) g_return_if_fail (io->read_state < SOUP_MESSAGE_IO_STATE_BODY); if (io->io_source) { g_source_destroy...
false
false
false
false
false
0
GetParallelopipedBoundingPlanes( vtkPlaneCollection * pc ) { vtkPlaneCollection * pc2 = vtkPlaneCollection::New(); this->GetBoundingPlanes( pc2 ); vtkPlane *p; int i = 0; for (pc2->InitTraversal(); ((p = pc2->GetNextItem()) && i < 6); ++i ) { pc->AddItem(p); } pc2->Delete(); }
false
false
false
false
false
0
setSelection(const QPoint& point, bool selected) { const int index = m_selections.indexOf(point); if ((index >= 0) == selected) //nothing to do return; if (selected) { //add selection, possibly by reusing an old item instance Diamond* selector; if (!m_inactiveSelectors.isEmpty()) selector = m_inactiveS...
false
false
false
false
false
0
FuncINT_FFE_DEFAULT ( Obj self, Obj z ) { FFV v; /* value of finite field element */ FF ff; /* finite field */ Int q; /* size of finite field */ ...
false
false
false
false
false
0
name() const { Solid::AudioInterface::AudioDriver d = driver(); if (d == Solid::AudioInterface::Alsa) { QVariant card_id = m_device->prop("alsa.card_id"); if (card_id.isValid()) { return card_id.toString().trimmed() + QLatin1String(" (") + m_device->prop("alsa.device_id"...
false
false
false
false
false
0
qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags) { fc_port_t *fcport; fcport = kzalloc(sizeof(fc_port_t), flags); if (!fcport) return NULL; /* Setup fcport template structure. */ fcport->vha = vha; fcport->port_type = FCT_UNKNOWN; fcport->loop_id = FC_NO_LOOP_ID; qla2x00_set_fcport_state(fcport, FCS_...
false
false
false
false
false
0
isBoxNumeric (Tree in, Tree& out) { int numInputs, numOutputs; double x; int i; Tree v; if (isBoxInt(in, &i) || isBoxReal(in, &x)) { out = in; return true; } else { v = a2sb(in); if ( getBoxType(v, &numInputs, &numOutputs) && (numInputs == 0) && (numOutputs =...
false
false
false
false
false
0
hns_get_regs(struct net_device *net_dev, struct ethtool_regs *cmd, void *data) { struct hns_nic_priv *priv = netdev_priv(net_dev); struct hnae_ae_ops *ops; assert(priv || priv->ae_handle); ops = priv->ae_handle->dev->ops; cmd->version = HNS_CHIP_VERSION; if (!ops->get_regs) { netdev_err(net_dev, "ops->ge...
false
false
false
false
false
0
polylineMidpoint (splines* spl, pointf* pp, pointf* pq) { bezier bz; int i, j, k; double d, dist = 0; pointf pf, qf, mf; for (i = 0; i < spl->size; i++) { bz = spl->list[i]; for (j = 0, k=3; k < bz.size; j+=3,k+=3) { pf = bz.list[j]; qf = bz.list[k]; dist += DIST(pf, qf); } } ...
false
false
false
false
false
0
real_value_from_int_cst (const_tree type, const_tree i) { REAL_VALUE_TYPE d; /* Clear all bits of the real value type so that we can later do bitwise comparisons to see if two values are the same. */ memset (&d, 0, sizeof d); real_from_integer (&d, type ? TYPE_MODE (type) : VOIDmode, TREE_INT_CST...
false
false
false
false
false
0
cb_expose(GtkWidget *wid, GdkEventExpose *e, gDrawingArea *data) { if (data->cached()) { gdk_window_clear(GTK_WIDGET(wid)->window); data->drawBorder(); } else { if (data->onExpose) { data->_in_draw_event = true; data->onExpose(data,e->area.x,e->area.y,e->area.width,e->area.height); data->_in_draw_...
false
false
false
false
false
0