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
edflib_fprint_ll_number_nonlocalized(FILE *file, long long q, int minimum, int sign) { int flag=0, z, i, j=0; long long base = 1000000000000000000LL; if(minimum < 0) { minimum = 0; } if(minimum > 18) { flag = 1; } if(q < 0LL) { fputc('-', file); j++; q = -q; } else { ...
false
false
false
false
false
0
_dbd_result_set_numfields(dbi_result_t *result, unsigned int numfields) { result->numfields = numfields; if (numfields > 0) { result->field_names = calloc(numfields, sizeof(char *)); result->field_types = calloc(numfields, sizeof(unsigned short)); result->field_attribs = calloc(numfields, sizeof(unsigned int...
false
false
false
false
true
1
playerTakeTurn(KSquaresPlayer* currentPlayer) { statusBar()->changeItem(currentPlayer->name(), 0); QTimer::singleShot(200, this, SLOT(aiChooseLine())); }
false
false
false
false
false
0
handle_UPROC(struct ptype_action_args *parg) { /* * /UPROC-packet, user-profile-request, if we want to and have an * answer, do it. */ parg->connec->flags.last_data_active = true; logg_packet_old(STDSF, "/UPROC"); if(likely(server.settings.profile.want_2_send && server.settings.profile.xml && server.s...
false
false
false
false
false
0
bna_rx_coalescing_timeo_set(struct bna_rx *rx, int coalescing_timeo) { struct bna_rxp *rxp; list_for_each_entry(rxp, &rx->rxp_q, qe) { rxp->cq.ccb->rx_coalescing_timeo = coalescing_timeo; bna_ib_coalescing_timeo_set(&rxp->cq.ib, coalescing_timeo); } }
false
false
false
false
false
0
anjuta_window_remove_value (AnjutaShell *shell, const char *name, GError **error) { AnjutaWindow *win; GValue *value; char *key; g_return_if_fail (ANJUTA_IS_WINDOW (shell)); g_return_if_fail (name != NULL); win = ANJUTA_WINDOW (shell); /* g_return_if_fail (win->values != NULL); if (win->widgets && g_hash_ta...
false
false
false
false
false
0
process_smi_save_state_64(struct kvm_vcpu *vcpu, char *buf) { #ifdef CONFIG_X86_64 struct desc_ptr dt; struct kvm_segment seg; unsigned long val; int i; for (i = 0; i < 16; i++) put_smstate(u64, buf, 0x7ff8 - i * 8, kvm_register_read(vcpu, i)); put_smstate(u64, buf, 0x7f78, kvm_rip_read(vcpu)); put_smstate(u...
false
false
false
false
false
0
ButtonEdit() { if ( gamemap->events.size() ) { MemoryStreamStorage buf; int marked = listbox->GetSelectedIndex(); if ( marked < 0 ) return false; GameMap::Events::iterator e = gamemap->events.begin(); fo...
false
false
false
false
false
0
GC_remove_protection(struct hblk *h, word nblocks, GC_bool is_ptrfree) { struct hblk * h_trunc; /* Truncated to page boundary */ struct hblk * h_end; /* Page boundary following block end */ struct hblk * current; # if defined(GWW_VDB) if (GC_GWW_AVAILABLE()) r...
false
true
false
false
true
1
onKeyRelease(FXObject*,FXSelector sel,void* ptr){ FXEvent* event=(FXEvent*)ptr; if(!isEnabled()) return 0; FXTRACE((200,"%s::onKeyRelease %p keysym=0x%04x state=%04x\n",getClassName(),this,event->code,event->state)); if(pane && pane->shown() && pane->handle(pane,sel,ptr)) return 1; switch(event->code){ ca...
false
false
false
false
false
0
e_cal_component_commit_sequence (ECalComponent *comp) { ECalComponentPrivate *priv; g_return_if_fail (comp != NULL); g_return_if_fail (E_IS_CAL_COMPONENT (comp)); priv = comp->priv; g_return_if_fail (priv->icalcomp != NULL); ensure_alarm_properties (comp); if (!priv->need_sequence_inc) return; if (priv->...
false
false
false
false
false
0
acpi_ac_remove_fs(struct acpi_ac *ac) { if (acpi_device_dir(ac->device)) { remove_proc_entry(ACPI_AC_FILE_STATE, acpi_device_dir(ac->device)); remove_proc_entry(acpi_device_bid(ac->device), acpi_ac_dir); acpi_device_dir(ac->device) = NULL; } return 0; }
false
false
false
false
false
0
sunionDiffGenericCommand(redisClient *c, robj **setskeys, int setsnum, robj *dstkey, int op) { dict **dv = zmalloc(sizeof(dict*)*setsnum); dictIterator *di; dictEntry *de; robj *dstset = NULL; int j, cardinality = 0; for (j = 0; j < setsnum; j++) { robj *setobj; setobj = dstkey...
false
false
false
false
false
0
pipe_putc(char c) { if (G.pipeline.idx == G.pipeline.len) { G.pipeline.buf = xrealloc(G.pipeline.buf, G.pipeline.len + PIPE_GROW); G.pipeline.len += PIPE_GROW; } G.pipeline.buf[G.pipeline.idx++] = c; }
false
false
false
false
false
0
OnAttach() { if(!Manager::LoadResource(_T("autosave.zip"))) { NotifyMissingFile(_T("autosave.zip")); } timer1 = new wxTimer(this, 10000); timer2 = new wxTimer(this, 20000); Start(); }
false
false
false
false
false
0
ToCIF() { char *s; char CIFFile[81]; int Layer; int Layers[CDNUMLAYERS+1]; MenuSelect(MenuTOCIF); ShowPrompt("CIF file name? "); strcpy(CIFFile,Parameters.kpCellName); if ((s = strchr(CIFFile,'.')) != NULL) *s = '\0'; strcat(CIFFile,".cif"); s = FBEdit(CIFFile); if (s != N...
false
false
false
false
false
0
soup_cookie_jar_get_cookies (SoupCookieJar *jar, SoupURI *uri, gboolean for_http) { GSList *cookies; g_return_val_if_fail (SOUP_IS_COOKIE_JAR (jar), NULL); g_return_val_if_fail (uri != NULL, NULL); cookies = get_cookies (jar, uri, for_http, FALSE); if (cookies) { char *result = soup_cookies_to_cookie_...
false
false
false
false
false
0
getIconFileName( int numerical ) { switch ( numerical ) { case cwcruisemissile: return "weap-cruisemissile"; case cwbombn: return "weap-bomb"; case cwlargemissilen: return "weap-bigmissile"; case cwsmallmissilen: return "weap-smallmissile"; case cwtor...
false
false
false
false
false
0
v4l2_of_parse_csi_bus(const struct device_node *node, struct v4l2_of_endpoint *endpoint) { struct v4l2_of_bus_mipi_csi2 *bus = &endpoint->bus.mipi_csi2; struct property *prop; bool have_clk_lane = false; unsigned int flags = 0; u32 v; prop = of_find_property(node, "data-lanes", NULL); if (prop) { const _...
false
false
false
false
false
0
fopen1(char *name, char *flag) { FILE *fp; if (!(fp = fopen(name, flag))) { fprintf(stdout, "\n"); fprintf(stdout, " ******************************************************\n"); fprintf(stdout, " You chose a moving window or sampling units analysis \n"); fprintf(stdout, " but r.le.pixel can...
false
false
false
false
false
0
crypto_check_alg(struct crypto_alg *alg) { crypto_check_module_sig(alg->cra_module); if (alg->cra_alignmask & (alg->cra_alignmask + 1)) return -EINVAL; if (alg->cra_blocksize > PAGE_SIZE / 8) return -EINVAL; if (alg->cra_priority < 0) return -EINVAL; atomic_set(&alg->cra_refcnt, 1); return crypto_set_d...
false
false
false
false
false
0
callInclude( KJS::ExecState *exec, KJS::JSObject *self, const KJS::List &args ) { Q_UNUSED(self); if( args.size() == 1) { KJS::UString filename = args[0]->toString(exec); qDebug() << "include: " << toQString(filename); KJS::Completion c = Engine::runFile( exec->dynamicInterpreter(),...
false
false
false
false
false
0
_cpufreq_event_cb_powersave(void *data __UNUSED__, int type, void *event) { E_Event_Powersave_Update *ev; Eina_List *l; Eina_Bool has_powersave = EINA_FALSE; Eina_Bool has_conservative = EINA_FALSE; if (type != E_EVENT_POWERSAVE_UPDATE) return ECORE_CALLBACK_PASS_ON; if (!cpufreq_config->auto_powersa...
false
false
false
false
false
0
emit_body(struct basic_block *bb, struct buffer *buf) { struct insn *insn; bb->mach_offset = buffer_offset(buf); bb->is_emitted = true; for_each_insn(insn, &bb->insn_list) { emit_insn(buf, bb, insn); } if (opt_trace_machine_code) emit_nop(buf); }
false
false
false
false
false
0
sock_s_gethostbyaddr(int argc, VALUE *argv) { VALUE addr, family; struct hostent *h; char **pch; VALUE ary, names; int t = AF_INET; rb_scan_args(argc, argv, "11", &addr, &family); StringValue(addr); if (!NIL_P(family)) { t = rsock_family_arg(family); } #ifdef AF_INET6 else if (...
false
false
false
false
false
0
PrintInfo ( Stat stat ) { UInt i; /* loop variable */ /* print the keyword */ Pr("%2>Info",0L,0L); /* print the opening parenthesis */ Pr("%<( %>"...
false
false
false
false
false
0
GVA_get_next_frame(t_GVA_Handle *gvahand) { t_GVA_RetCode l_rc; if(gap_debug) { printf("GVA_get_next_frame: START handle:%d\n", (int)gvahand); } l_rc = p_gva_worker_get_next_frame(gvahand); if(gap_debug) { printf("GVA_get_next_frame: END rc:%d\n", (int)l_rc); } return(l_rc); }
false
false
false
false
false
0
internal_oscode_find_keyboard(unsigned oscode) { const struct KeyboardInfo *keyinfo; keyinfo = osd_get_key_list(); while (keyinfo->name) { if (keyinfo->code == oscode) return keyinfo; ++keyinfo; } return 0; }
false
false
false
false
false
0
equinox_draw_scrollbar_trough (cairo_t * cr, const EquinoxColors * colors, const WidgetParameters * widget, const ScrollBarParameters * scrollbar, int x, int y, int width, int height, int scrollbarstyle, int scrollbartrough) { EquinoxRGB bg; EquinoxRGB shadow, highlight; cairo_pat...
false
false
false
false
false
0
pf_capture_pkt_handler(netio_desc_t *nio,void *pkt,size_t len, void *opt) { struct netio_filter_capture *c = opt; struct pcap_pkthdr pkt_hdr; if (c != NULL) { gettimeofday(&pkt_hdr.ts,0); pkt_hdr.caplen = len; pkt_hdr.len = len; pcap_dump((u_char *)c-...
false
false
false
false
false
0
ulong_arg(const char *option, const char *arg) { char *endptr; unsigned long rv = strtoul(arg, &endptr, 0); if (strchr(arg, '-') || endptr == arg || *endptr) die("%s: argument must be a non-negative integer", option); return rv; }
false
false
false
false
false
0
qrstat_report_start_unknown_ar(qrstat_report_handler_t* handler, qrstat_env_t *qrstat_env, lList **alpp) { bool ret = true; FILE *out = (FILE*)handler->ctx; DENTER(TOP_LAYER, "qrstat_report_unknown_start"); if (!qrstat_env->header_printed) { fprintf(out, "Following advance reservations do not exist...
false
false
false
false
false
0
rb_yield_splat(values) VALUE values; { int avalue = Qfalse; if (TYPE(values) == T_ARRAY) { if (RARRAY(values)->len == 0) { values = Qundef; } else { avalue = Qtrue; } } return rb_yield_0(values, 0, 0, 0, avalue); }
false
false
false
false
false
0
SyStrnicmp(const char *zLeft, const char *zRight, sxu32 SLen) { register unsigned char *p = (unsigned char *)zLeft; register unsigned char *q = (unsigned char *)zRight; if( SX_EMPTY_STR(p) || SX_EMPTY_STR(q) ){ return SX_EMPTY_STR(p)? SX_EMPTY_STR(q) ? 0 : -1 :1; } for(;;){ if( !SLen ){ return 0; }if( !*p ...
false
false
false
false
false
0
save_icon(void) { unsigned char *data; int iconX, iconY; char tbuf[64]; int ix; unsigned long nitems; { Atom actual_type; int actual_format; unsigned long leftover; if (XGetWindowProperty(display, XtWindow(toplevel), a_state, 0L, 2L, False, a_state, &actual_type, &actual_format, &nitems, &le...
false
false
false
false
false
0
p_cdr(g, l) l1sp_ctx *g; l1sp *l; { switch(l1sp_tag(l)) { case L1SP_NIL: case L1SP_PAIR: return l1sp_cdr(l); default: l1sp_diebadarg(g, l); } }
false
false
false
false
false
0
add_ranges_and_copies (void) { basic_block bb; edge_iterator ei; edge e; ira_loop_tree_node_t node; bitmap live_through; live_through = ira_allocate_bitmap (); FOR_EACH_BB (bb) { /* It does not matter what loop_tree_node (of source or destination block) to use for searching allocnos by their ...
false
false
false
false
false
0
composePoint(double lx,double ly,double lz, double &gx, double &gy, double &gz, mrpt::math::CMatrixFixedNumeric<double,3,3> *out_jacobian_df_dpoint, mrpt::math::CMatrixFixedNumeric<double,3,6> *out_jacobian_df_dpose) const { const double angle = this->m_rotvec.norm(); const double K1 = sin(angle)/angle...
false
false
false
false
false
0
recursive_build_path(struct mailimap_body * root_part, struct mailimap_body * part, clist ** result) { clistiter * cur; uint32_t count; int r; clist * imap_id_list; if (part == root_part) { imap_id_list = clist_new(); if (imap_id_list == NULL) { return MAILIMAP_ERROR_MEMORY; } ...
false
false
false
false
false
0
in_gate_area(struct mm_struct *mm, unsigned long addr) { struct vm_area_struct *vma = get_gate_vma(mm); if (!vma) return 0; return (addr >= vma->vm_start) && (addr < vma->vm_end); }
false
false
false
false
false
0
udf_truncate_tail_extent(struct inode *inode) { struct extent_position epos = {}; struct kernel_lb_addr eloc; uint32_t elen, nelen; uint64_t lbcount = 0; int8_t etype = -1, netype; int adsize; struct udf_inode_info *iinfo = UDF_I(inode); if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB || inode->i_size ==...
false
false
false
false
false
0
gst_asf_demux_process_advanced_mutual_exclusion (GstASFDemux * demux, guint8 * data, guint64 size) { ASFGuid guid; guint16 num, i; guint8 *mes; if (size < 16 + 2 + (2 * 2)) goto not_enough_data; gst_asf_demux_get_guid (&guid, &data, &size); num = gst_asf_demux_get_uint16 (&data, &size); if (num...
false
false
false
false
false
0
drmGetBufInfo(int fd) { drm_buf_info_t info; drmBufInfoPtr retval; int i; info.count = 0; info.list = NULL; if (drmIoctl(fd, DRM_IOCTL_INFO_BUFS, &info)) return NULL; if (info.count) { if (!(info.list = drmMalloc(info.count * sizeof(*info.list)))) return NULL; if (dr...
false
false
false
false
false
0
init_tcl(int argc, char **argv) { #ifdef USE_TCL_ENCODING const char *encoding; int i; char *langEnv; #endif /* USE_TCL_ENCODING */ #ifdef USE_TCL_PACKAGE int j; char pver[1024] = ""; #endif /* USE_TCL_PACKAGE */ /* This must be done *BEFORE* Tcl_SetSystemEncoding(), * or Tcl_SetSystemEncoding() will cause ...
false
false
false
false
false
0
inc_host_errors(const char *ip_string) { if (!ip_string) return; char ip_key[HOST_ENTRY_KEY_SIZE]; prepare_hostname_cache_key(ip_string, ip_key); mysql_mutex_lock(&hostname_cache->lock); Host_entry *entry= hostname_cache_search(ip_key); if (entry) entry->connect_errors++; mysql_mutex_unlock(&...
false
false
false
false
false
0
tdb1_do_delete(struct tdb_context *tdb, tdb1_off_t rec_ptr, struct tdb1_record *rec) { tdb1_off_t last_ptr, i; struct tdb1_record lastrec; if ((tdb->flags & TDB_RDONLY) || tdb->tdb1.traverse_read) return -1; if (((tdb->tdb1.traverse_write != 0) && (!TDB1_DEAD(rec))) || tdb1_write_lock_record(tdb, rec_ptr) ==...
false
false
false
false
false
0
gth_backtrace_path_add_deletion(GthBacktracePath *bp) { Editoperation deletion_eop = DELETIONEOP; gt_assert(bp); gt_assert(bp->alphatype == DNA_ALPHA || bp->alphatype == PROTEIN_ALPHA); gt_array_add(bp->editoperations, deletion_eop); }
false
false
false
false
false
0
mxr_reg_reset(struct mxr_device *mdev) { unsigned long flags; u32 val; /* value stored to register */ spin_lock_irqsave(&mdev->reg_slock, flags); mxr_vsync_set_update(mdev, MXR_DISABLE); /* set output in RGB888 mode */ mxr_write(mdev, MXR_CFG, MXR_CFG_OUT_RGB888); /* 16 beat burst in DMA */ mxr_write_mask(md...
false
false
false
false
false
0
decide_blitter (int hpos) { int hsync = hpos < 0; if (blit_startcycles > 0) do_startcycles (hpos); if (blt_delayed_irq > 0 && hsync) { blt_delayed_irq--; if (!blt_delayed_irq) send_interrupt (6, 2 * CYCLE_UNIT); } if (bltstate == BLT_done) return; #ifdef BLITTER_DEBUG if (blitter_delayed_debug) { ...
false
false
false
false
false
0
run_shell (const char* pz_cmd) { tSCC zNoServer[] = "Server not running, cannot run:\n%s\n\n"; t_bool retry = BOOL_TRUE; do_retry: /* IF the shell server process is not running yet, THEN try to start it. */ if (server_id == NULLPROCESS) { def_args[0] = find_shell (); server_id = proc2...
false
false
false
false
false
0
wi_mutable_url_set_password(wi_mutable_url_t *url, wi_string_t *password) { WI_RUNTIME_ASSERT_MUTABLE(url); wi_retain(password); wi_release(url->password); url->password = password; _wi_url_regenerate_string(url); }
false
false
false
false
false
0
setup_treeview (GtkWidget *treeview, GtkTreeModel *model, char *headers[], int render_index) { GtkTreeSelection *selection; int i; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); g_assert (selection...
false
false
false
false
false
0
arr( EnvT* e, dimension& dim, SizeT pOffs=0) { int nParam=e->NParam()-pOffs; if( nParam <= 0) e->Throw( "Incorrect number of arguments."); const string BadDims="Array dimensions must be greater than 0."; if( nParam == 1 ) { BaseGDL* par = e->GetParDefined( pOffs); SizeT new...
false
false
false
false
false
0
ath6kl_htc_rx_fetch(struct htc_target *target, struct list_head *rx_pktq, struct list_head *comp_pktq) { int fetched_pkts; bool part_bundle = false; int status = 0; struct list_head tmp_rxq; struct htc_packet *packet, *tmp_pkt; /* now go fetch the list of HTC packets */ while (!list_empty(rx...
false
false
false
false
false
0
PyFF_Glyph_dealloc(PyFF_Glyph *self) { if ( self->sc!=NULL ) self->sc = NULL; Py_XDECREF(self->layers); Py_XDECREF(self->refs); Py_XDECREF(self->mk); ((PyObject *)self)->ob_type->tp_free((PyObject *) self); }
false
false
false
false
false
0
iot_io_begin(struct io_tracker *iot, sector_t len) { unsigned long flags; spin_lock_irqsave(&iot->lock, flags); iot->in_flight += len; spin_unlock_irqrestore(&iot->lock, flags); }
false
false
false
false
false
0
CollectNamespaceDecls ( NamespaceMap * nsMap, const XML_Node & node ) { size_t i, limit; if ( ! node.ns.empty() ) { size_t nameMid = 0; while ( node.name[nameMid] != ':' ) ++nameMid; std::string prefix = node.name.substr ( 0, nameMid ); (*nsMap)[prefix] = node.ns; } if ( node.kind == kElemNode ) { for...
false
false
false
false
false
0
sh_loop_finish (call_frame_t *loop_frame, xlator_t *this) { afr_local_t *loop_local = NULL; afr_self_heal_t *loop_sh = NULL; if (!loop_frame) goto out; loop_local = loop_frame->local; if (loop_local) { loop_sh = &loop_local->s...
false
false
false
false
false
0
py_gnumeric_Style_method (PyObject *self, PyObject *args) { if (!PyArg_ParseTuple (args, (char *) ":GnmStyle")) { return NULL; } return py_new_Style_object (gnm_style_new_default ()); }
false
false
false
false
false
0
gregorio_free_styles (det_style ** first_style) { det_style *current_style; if (!first_style) { return; } current_style = (*first_style); while (current_style) { current_style = current_style->next_style; free ((*first_style)); (*first_style) = current_style; } }
false
false
false
false
false
0
mca_pml_bfo_send_request_put_frag( mca_pml_bfo_rdma_frag_t* frag ) { mca_mpool_base_registration_t* reg = NULL; mca_bml_base_btl_t* bml_btl = frag->rdma_bml; mca_btl_base_descriptor_t* des; size_t save_size = frag->rdma_length; int rc; /* setup descriptor */ mca_bml_base_prepare_src( bml_bt...
false
false
false
false
false
0
FindDatabase(char *name, char *hostName) { char *dbhome = NULL; char *fullpath = NULL; /* Does Name includes fullpath */ if (strcmp(basename(name), name)) { if (IsDatabaseFile(name)) fullpath = GB.NewZeroString(name); return fullpath; } /* Hostname contains home area */ fullpath = GB.NewZeroString(hos...
false
false
false
false
false
0
Strip ( char * szText ) { char * szIterator1 = szText; char * szIterator2 = szText; while ( *szIterator1 ) { if ( !isspace ( (unsigned char) *szIterator1 ) && *szIterator1 != '-' ) { *szIterator2 = *szIterator1; ++szIterator2; } ++szIterator1; } *szIterator2 = '\0'; while ( *szText ) { *szText...
false
false
false
false
false
0
get_irqs_from_stat(struct stats_irq *irq) { FILE *fp; char buf[1024]; fp = fopen_for_read(PROCFS_STAT); if (!fp) return; while (fgets(buf, sizeof(buf), fp)) { //bb_error_msg("/proc/stat:'%s'", buf); if (strncmp(buf, "intr ", 5) == 0) { /* Read total number of IRQs since system boot */ sscanf(buf + 5,...
true
true
false
false
false
1
wq_sleep_timeout(const void *key, int delay, wq_callback_t cb, void *arg) { wq_event_t *we; we = wq_sleep(key, cb, arg); WALLOC(we->tm); we->tm->delay = delay; we->tm->timeout_ev = cq_main_insert(delay, wq_timed_out, we); return we; }
false
false
false
false
false
0
DrawPolygon(const std::vector<std::pair<double,double> > &points) { m_ofs << "<polygon points=\""; std::vector<std::pair<double,double> >::const_iterator i; for (i = points.begin(); i != points.end(); ++i) m_ofs << i->first << ' ' << i->second << ' '; m_ofs << "\" />\n"; }
false
false
false
false
false
0
binop1_max_bang(t_binop *x) { outlet_float(x->x_obj.ob_outlet, (x->x_f1 > x->x_f2 ? x->x_f1 : x->x_f2)); }
false
false
false
false
false
0
get_config_byoffset(struct ddf1 *ddf1, struct ddf1_phys_drive *pd, uint64_t offset) { int cfgs = NUM_CONFIG_ENTRIES(ddf1), i; uint32_t *cfg_drive_ids, j; uint64_t *cfg_drive_offsets; struct ddf1_config_record *cfg; for (i = 0; i < cfgs; i++) { cfg = CR(ddf1, i); if (cfg->signature == DDF1_VD_CONFIG_REC)...
false
false
false
false
false
0
mono_get_method_constrained (MonoImage *image, guint32 token, MonoClass *constrained_class, MonoGenericContext *context, MonoMethod **cil_method) { MonoMethod *result; mono_loader_lock (); *cil_method = mono_get_method_from_token (image, token, NULL, context, NULL); if (!*cil_method) { mono_loader_unloc...
false
false
false
false
false
0
getIterator(uint_t id) { //AVM_WRITE("ASF network reader", "GETITERATOR %d\n", id); if (id >= m_Streams.size()) return 0; m_Iterators.push_back(new NetworkIterator(this, m_Streams[id].hdr.stream & 0x7f)); AsfIterator* it = m_Iterators.back(); it->addRef(); return it; }
false
false
false
false
false
0
cdc_ncm_eth_hlen(struct usbnet *dev) { if (cdc_ncm_comm_intf_is_mbim(dev->intf->cur_altsetting)) return 0; return ETH_HLEN; }
false
false
false
false
false
0
knot_dname_unpack(uint8_t* dst, const knot_dname_t *src, size_t maxlen, const uint8_t *pkt) { if (dst == NULL || src == NULL) return KNOT_EINVAL; /* Seek first real label occurence. */ src = knot_wire_seek_label(src, pkt); /* Unpack rest of the labels. */ int len = 0; while (*src != '\0'...
false
true
false
false
false
1
gen_iorsi3 (rtx operand0, rtx operand1, rtx operand2) { rtx _val = 0; start_sequence (); { rtx operands[3]; operands[0] = operand0; operands[1] = operand1; operands[2] = operand2; #line 2957 "../../src/gcc/config/arm/arm.md" if (GET_CODE (operands[2]) == CONST_INT) { if (TARGET_32BI...
false
false
false
false
false
0
main (int argc, char **argv) { GMainLoop *loop; CkTtyIdleMonitor *monitor; char *device; g_type_init (); if (argc < 2) { device = ttyname (0); } else { device = g_strdup (argv[1]); } if (! is_console (d...
false
false
false
false
false
0
mtd_do_chip_probe(struct map_info *map, struct chip_probe *cp) { struct mtd_info *mtd = NULL; struct cfi_private *cfi; /* First probe the map to see if we have CFI stuff there. */ cfi = genprobe_ident_chips(map, cp); if (!cfi) return NULL; map->fldrv_priv = cfi; /* OK we liked it. Now find a driver for the ...
false
false
false
false
false
0
VBE_UseHealth(const struct director *vdi) { struct vdi_simple *vs; ASSERT_CLI(); if (strcmp(vdi->name, "simple")) return; CAST_OBJ_NOTNULL(vs, vdi->priv, VDI_SIMPLE_MAGIC); if (vs->vrt->probe == NULL) return; VBP_Start(vs->backend, vs->vrt->probe, vs->vrt->hosthdr); }
false
false
true
true
false
1
c_sfx_01_track(state_t *s) { resource_t *song = scir_find_resource(s->resmgr, sci_sound, cmd_params[0].val, 0); int offset = cmd_params[1].val; if (!song) { sciprintf("Doesn't exist\n"); return 1; } midi_hexdump(song->data + offset, song->size, offset); return 0; }
false
false
false
false
false
0
convertToBoolean(List &words) { HtConfiguration* config= HtConfiguration::config(); List list; int i; int do_and = strcmp(config->Find("match_method"), "and") == 0; int in_phrase = 0; String quote = "\""; if (words.Count() == 0) return; list.Add(words[0]); // We might start off w...
false
false
false
false
false
0
SECITEM_DupArray(PLArenaPool *arena, const SECItemArray *from) { SECItemArray *result; unsigned int i; /* Require a "from" array. * Reject an inconsistent "from" array with NULL data and nonzero length. * However, allow a "from" array of zero length. */ if (!from || (!from->items && from...
false
false
false
false
false
0
sas_eh_handle_resets(struct Scsi_Host *shost) { struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost); struct sas_internal *i = to_sas_internal(shost->transportt); /* handle directed resets to sas devices */ spin_lock_irq(&ha->lock); while (!list_empty(&ha->eh_dev_q)) { struct domain_device *dev; struct ssp_devic...
false
false
false
false
false
0
vEndOfParagraphPDF(diagram_type *pDiag, USHORT usFontSize, long lAfterIndentation) { fail(pDiag == NULL); fail(pDiag->pOutFile == NULL); fail(usFontSize < MIN_FONT_SIZE || usFontSize > MAX_FONT_SIZE); fail(lAfterIndentation < 0); if (pDiag->lXleft > 0) { /* To the start of the line */ vMove2NextLinePDF(pDiag...
false
false
false
false
false
0
gsearch_history_entry_finalize (GObject *object) { GsearchHistoryEntryPrivate *priv; priv = GSEARCH_HISTORY_ENTRY (object)->priv; g_free (priv->history_id); if (priv->settings != NULL) { g_object_unref (G_OBJECT (priv->settings)); priv->settings = NULL; } G_OBJECT_CLASS (gsearch_history_entry_parent_cla...
false
false
false
false
false
0
ath6kl_keepalive_write(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { struct ath6kl *ar = file->private_data; int ret; u8 val; ret = kstrtou8_from_user(user_buf, count, 0, &val); if (ret) return ret; ret = ath6kl_wmi_set_keepalive_cmd(ar->wmi, 0, val); if (r...
false
false
false
false
false
0
setText(const ustring &tip) { fText = tip; if (fText != null) { YDimension const size(toolTipFont->multilineAlloc(fText)); setSize(size.w + 6, size.h + 7); //!!! merge with below code in locate int x = this->x(); int y = this->y(); if (x + width() >= desktop->wid...
false
false
false
true
false
1
activity_bar_weak_notify_cb (EActivityBar *bar, GObject *where_the_object_was) { g_return_if_fail (E_IS_ACTIVITY_BAR (bar)); bar->priv->activity = NULL; e_activity_bar_set_activity (bar, NULL); }
false
false
false
false
false
0
_replica_update_entry (Replica *r, Slapi_Entry *e, char *errortext) { int rc; Slapi_Mod smod; Slapi_Value *val; PR_ASSERT (r); /* add attribute that stores state of csn generator */ rc = csngen_get_state ((CSNGen*)object_get_data (r->repl_csngen), &smod); if (rc != CSN_SUCCESS) { ...
false
false
false
false
false
0
OnReadEvent(AsyncSocket* socket) { // If we're NATed, we need to process the connect reply. ASSERT(socket == socket_); if (type_ == SOCK_STREAM && !server_addr_.IsAny() && !connected_) { HandleConnectReply(); } else { SignalReadEvent(this); } }
false
false
false
false
false
0
ValidDSN (LPCSTR lpszDSN) { char *currp = (char *) lpszDSN; while (*currp) { if (strchr (INVALID_CHARS, *currp)) return FALSE; else currp++; } return TRUE; }
false
false
false
false
false
0
solo_timer_sync(struct solo_dev *solo_dev) { u32 sec, usec; struct timespec ts; long diff; if (solo_dev->type != SOLO_DEV_6110) return; if (++solo_dev->time_sync < 60) return; solo_dev->time_sync = 0; sec = solo_reg_read(solo_dev, SOLO_TIMER_SEC); usec = solo_reg_read(solo_dev, SOLO_TIMER_USEC); ktime...
false
false
false
false
false
0
sparse_count_chunks(struct sparse_file *s) { struct backed_block *bb; unsigned int last_block = 0; unsigned int chunks = 0; for (bb = backed_block_iter_new(s->backed_block_list); bb; bb = backed_block_iter_next(bb)) { if (backed_block_block(bb) > last_block) { /* If there is a gap between chunks, add a ski...
false
false
false
false
false
0
coeff(int narg, char **arg) { if (!allocated) allocate(); if (narg != 3 + atom->ntypes) error->all(FLERR,"Incorrect args for pair coefficients"); // insure I,J args are * * if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) error->all(FLERR,"Incorrect args for pair coefficients"); // read arg...
false
false
false
false
false
0
kill_how_often_add(struct kill *msg, const ev_uint32_t value) { if (++msg->how_often_length >= msg->how_often_num_allocated) { int tobe_allocated = msg->how_often_num_allocated; ev_uint32_t* new_data = NULL; tobe_allocated = !tobe_allocated ? 1 : tobe_allocated << 1; new_data = (ev_uint32_t*) realloc(...
false
false
false
false
false
0
close_tab(HybridChatWindow *chat) { HybridConversation *conv; gint page_index; g_return_if_fail(chat != NULL); conv = chat->parent; page_index = gtk_notebook_page_num(GTK_NOTEBOOK(conv->notebook), chat->vbox); gtk_notebook_remove_page(GTK_NOTEBOOK(conv->notebook), p...
false
false
false
false
false
0
RemoveMapping(const char* attributeName) { vtkInternal::VectorType::iterator iter; for (iter=this->Internal->Mappings.begin(); iter != this->Internal->Mappings.end(); ++iter) { if (iter->AttributeName == attributeName) { this->Internal->Mappings.erase(iter); return true; } } ...
false
false
false
false
false
0
file_cache_handler(request_rec *r) { a_file *match; int errstatus; int rc = OK; /* XXX: not sure if this is right yet * see comment in http_core.c:default_handler */ if (ap_strcmp_match(r->handler, "*/*")) { return DECLINED; } /* we don't handle anything but GET */ if...
false
false
false
false
false
0
action_current_volume (Unit *unit, dpacket packet) { if (filesys_isvolume(unit)) PUT_PCK_RES1 (packet, unit->volume >> 2); else PUT_PCK_RES1 (packet, 0); }
false
false
false
false
false
0
ib_uverbs_remove_one(struct ib_device *device, void *client_data) { struct ib_uverbs_device *uverbs_dev = client_data; int wait_clients = 1; if (!uverbs_dev) return; dev_set_drvdata(uverbs_dev->dev, NULL); device_destroy(uverbs_class, uverbs_dev->cdev.dev); cdev_del(&uverbs_dev->cdev); if (uverbs_dev->devnu...
false
false
false
false
false
0
readSettings() { KConfigGroup group(KGlobal::config(), "Colors"); QString collectionName = group.readEntry("CurrentPalette"); if (collectionName.isEmpty()) { collectionName = i18nc("palette name", colorCollectionName[fortyColorIndex].m_displayName); } else { for (int i = 0; colorCollect...
false
false
false
false
false
0
printFloatingPointConstants(const Constant *C) { // If this is a constant expression, recursively check for constant fp values. if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) printFloatingPointConstants(CE->getOperand(i)); return; ...
false
false
false
false
true
1
slotFilterClear() { DEBUG_BLOCK m_searchEdit->setText( QString() ); }
false
false
false
false
false
0