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
gnc_combo_cell_gui_destroy (BasicCell *bcell) { PopBox *box = bcell->gui_private; ComboCell *cell = (ComboCell *) bcell; if (cell->cell.gui_realize == NULL) { if (box != NULL && box->item_list != NULL) { combo_disconnect_signals(cell); g_object_unref (box->item_l...
false
false
false
false
false
0
arpspoof_test(struct arp_spoof_info *asi) { struct timeval tv; struct timespec timeout; struct ifunc_item ifunc_pingtest; struct packet *p; int retval; int i; if (!asi->dst_mac_valid) { fprintf(stderr, "error: try to do arpspoof_test without known dst mac\n"); return -1; } ifunc_pingtest.func = hunt_arps...
false
false
false
false
false
0
internet_address_list_prepend (InternetAddressList *list, InternetAddressList *prepend) { InternetAddress *ia; char *dest, *src; guint len, i; g_return_if_fail (IS_INTERNET_ADDRESS_LIST (prepend)); g_return_if_fail (IS_INTERNET_ADDRESS_LIST (list)); if (prepend->array->len == 0) return; len = prepend->ar...
false
false
false
false
false
0
init() { pr.init(); if (pr.isModeled()) low=1, high=0xFFFFFFFF, curr=0; else low=high=curr=0; }
false
false
false
false
false
0
png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_byte buf[7]; png_time mod_time; png_debug(1, "in png_handle_tIME\n"); if (!(png_ptr->mode & PNG_HAVE_IHDR)) png_error(png_ptr, "Out of place tIME chunk"); else if (info_ptr != NULL && (info_ptr->valid & PN...
false
false
false
false
false
0
cxio_flush_hw_cq(struct t3_cq *cq) { struct t3_cqe *cqe, *swcqe; PDBG("%s cq %p cqid 0x%x\n", __func__, cq, cq->cqid); cqe = cxio_next_hw_cqe(cq); while (cqe) { PDBG("%s flushing hwcq rptr 0x%x to swcq wptr 0x%x\n", __func__, cq->rptr, cq->sw_wptr); swcqe = cq->sw_queue + Q_PTR2IDX(cq->sw_wptr, cq->size...
false
false
false
false
false
0
WriteMolecule(OBBase* pOb, OBConversion* pConv) { OBMol* pmol = dynamic_cast<OBMol*>(pOb); if(pmol==NULL) return false; //Define some references so we can use the old parameter names ostream &ofs = *pConv->GetOutStream(); OBMol &mol = *pmol; unsigned int i; char buffer[BUFF_SIZE]; OB...
false
false
false
false
false
0
write_multiline_text(FILE *file, gchar *section, gchar *name, gchar *data) { gint i; gchar **split; if (data!=NULL) { split=g_strsplit(data,"\n",0); /* tokenize the data*/ for (i=0; split[i]!=NULL; i++) { if (DEBUG) printf("write_multiline_text: line=%d, value=%s\n", i, split[i]); fprintf(f...
false
false
false
false
false
0
draw_overlay(void) { dbgprintf("Draw_overlay called\n"); if (zoomSelRect.w > 0 && zoomSelRect.h > 0 ) { dbgprintf("Drawing rectangular overlay: (%d,%d),(%d x %d)\n", zoomSelRect.x, zoomSelRect.y, zoomSelRect.w, zoomSelRect.h); ...
false
false
false
false
false
0
__connman_dhcpv6_start_info(struct connman_network *network, dhcp_cb callback) { struct connman_dhcpv6 *dhcp; int delay; DBG(""); if (network_table != NULL) { dhcp = g_hash_table_lookup(network_table, network); if (dhcp != NULL && dhcp->started == TRUE) return -EBUSY; } dhcp = g_try_new0(struct conn...
false
false
false
false
false
0
findCenter(void) const { if (!myHasFromTo) { return myPose; } else { // rect double centerX = (myFromPose.getX() + myToPose.getX()) / 2.0; double centerY = (myFromPose.getY() + myToPose.getY()) / 2.0; double angle = myPose.getTh(); double sa = ArMath::sin(angle); double ca = ArMath::cos(...
false
false
false
false
false
0
CompareEdges(const void *x,const void *y) { register const EdgeInfo *p, *q; /* Compare two edges. */ p=(const EdgeInfo *) x; q=(const EdgeInfo *) y; if ((p->points[0].y-MagickEpsilon) > q->points[0].y) return(1); if ((p->points[0].y+MagickEpsilon) < q->points[0].y) return(-1); if ((...
false
false
false
false
false
0
dceiswholevar(DCEvar* var) { int i,whole; whole = 1; /* assume so */ for(i=0;i<nclistlength(var->segments);i++) { DCEsegment* segment = (DCEsegment*)nclistget(var->segments,i); if(!dceiswholesegment(segment)) {whole = 0; break;} } return whole; }
false
false
false
false
false
0
submatrix_dense(const DenseMatrix &A, unsigned row_start, unsigned row_end, unsigned col_start, unsigned col_end, DenseMatrix &B) { CSYMPY_ASSERT(row_end >= row_start && col_end >= col_start); CSYMPY_ASSERT(row_end < A.row_); CSYMPY_ASSERT(col_end < A.col_); CSYMPY_ASSERT(B.row_ == row_end - row...
false
false
false
false
false
0
dynamic_get_qdata (TpHandleRepoIface *repo, TpHandle handle, GQuark key_id) { TpDynamicHandleRepo *self = TP_DYNAMIC_HANDLE_REPO (repo); TpHandlePriv *priv = handle_priv_lookup (self, handle); g_return_val_if_fail (((void)"invalid handle", priv != NULL), NULL); return g_datalist_id_get_data (&priv->datali...
false
false
false
false
false
0
RecordRelocation(MachObjectWriter *Writer, const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, uint64_t &FixedValue) { if (Writer->is64Bit()) RecordX86_64Relocation(Writer, ...
false
false
false
false
false
0
wbt200_data_read(void) { /* Awooga! Awooga! Statically allocated buffer danger! * Actually, it's OK because rd_line can read arbitrarily * long lines returning only the first N characters */ char line_buf[100]; int fmt; unsigned long count; struct read_state st;...
true
true
false
false
false
1
charray_normdn_add(char ***chararray, char *dn, char *errstr) { int rc = 0; size_t len = 0; char *normdn = NULL; rc = slapi_dn_normalize_ext(dn, 0, &normdn, &len); if (rc < 0) { LDAPDebug2Args(LDAP_DEBUG_ANY, "Invalid dn: \"%s\" %s\n", dn, errstr?errstr:""); re...
false
false
false
false
false
0
setup_session (GdmSimpleSlave *slave) { if (wants_initial_setup (slave)) { start_initial_setup (slave); } else if (wants_autologin (slave)) { /* Run the init script. gdmslave suspends until script has terminated */ gdm_slave_run_script (GDM_SLAVE (slave), ...
false
false
false
false
false
0
nemo_desktop_link_monitor_delete_link (NemoDesktopLinkMonitor *monitor, NemoDesktopLink *link, GtkWidget *parent_view) { switch (nemo_desktop_link_get_link_type (link)) { case NEMO_DESKTOP_LINK_HOME: case NEMO_DESKTOP_LINK_COMPUTER: case NEMO_DESKTOP_LINK_TRASH: case NEMO_DESKTOP_LINK_NETWORK: /*...
false
false
false
false
false
0
GetTargetString(int index) { if (index == -1) index = m_TargetIndex; if (index >= 0 && index < (int)m_Targets.GetCount()) return m_Targets[index]; return wxEmptyString; }
false
false
false
false
false
0
prune ( /* input/output: */ Int Lpend [ ], /* Lpend [j] marks symmetric pruning point for L(:,j) */ /* input: */ Int Pinv [ ], /* Pinv [i] = k if row i is kth pivot row, or EMPTY if * row i is not yet pivotal. */ Int k, /* prune using column k of U ...
false
false
false
false
false
0
_auth_lb_readline (struct _line_buffer *s, char *ptr, size_t size) { char *p = strchr (s->buffer, '\n'); if (p && p - s->buffer + 1 < size) size = p - s->buffer + 1; return _auth_lb_read (s, ptr, size); }
false
false
false
false
false
0
quotearg_buffer (char *buffer, size_t buffersize, char const *arg, size_t argsize, struct quoting_options const *o) { struct quoting_options const *p = o ? o : &default_quoting_options; return quotearg_buffer_restyled (buffer, buffersize, arg, argsize, p->style, p); }
false
false
false
false
false
0
DecodeTimezone(char *str, int *tzp) { int tz; int hr, min; char *cp; int len; /* assume leading character is "+" or "-" */ hr = strtol(str + 1, &cp, 10); /* explicit delimiter? */ if (*cp == ':') min = strtol(cp + 1, &cp, 10); /* otherwise, might have run things together... */ else if (*cp ==...
false
false
false
false
false
0
wl1271_netstack_work(struct work_struct *work) { struct wl1271 *wl = container_of(work, struct wl1271, netstack_work); do { wl1271_flush_deferred_work(wl); } while (skb_queue_len(&wl->deferred_rx_queue)); }
false
false
false
false
false
0
dict_reset (dict_t *dict) { int32_t ret = -1; if (!dict) { gf_log_callingfn ("dict", GF_LOG_WARNING, "dict is NULL"); goto out; } dict_foreach (dict, _remove, NULL); ret = 0; out: return ret; }
false
false
false
false
false
0
gst_matroska_mux_class_init (GstMatroskaMuxClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gst_element_class_add_static_pad_template (gstelement_class, &videosink_templ); gst_elemen...
false
false
false
false
false
0
test_index_conflicts__remove_all_conflicts(void) { size_t i; git_index_entry *entry; cl_assert(git_index_entrycount(repo_index) == 8); cl_assert_equal_i(true, git_index_has_conflicts(repo_index)); git_index_conflict_cleanup(repo_index); cl_assert_equal_i(false, git_index_has_conflicts(repo_index)); cl_asser...
false
false
false
false
false
0
gl_label_get_default_text_line_spacing (glLabel *label) { gl_debug (DEBUG_LABEL, "START"); g_return_val_if_fail (label && GL_IS_LABEL (label), 1.0); gl_debug (DEBUG_LABEL, "END"); return label->priv->default_text_line_spacing; }
false
false
false
false
false
0
bnxt_gro_func_5731x(struct bnxt_tpa_info *tpa_info, int payload_off, int tcp_ts, struct sk_buff *skb) { #ifdef CONFIG_INET struct tcphdr *th; int len, nw_off; u16 outer_ip_off, inner_ip_off, inner_mac_off; u32 hdr_info = tpa_info->hdr_info; bool loopback = false; inner_ip_off = BNXT_TPA_INNER_L3_...
false
false
false
false
false
0
pixmap_save_sanitize_args(PixmapSaveArgs *args) { args->xytype = MIN(args->xytype, PIXMAP_SCALEBAR); args->ztype = MIN(args->ztype, PIXMAP_FMSCALE); args->inset_color.a = 1.0; args->inset_pos = MIN(args->inset_pos, INSET_NPOS - 1); /* handle inset_length later, its usability depends on the data fiel...
false
false
false
false
false
0
aaa_prot_bind(str* aaa_url, aaa_prot* prot) { aaa_prot_config pc; char *module_name; aaa_bind_api_f bind_f; if (!aaa_url || !prot) { LM_ERR("null argument\n"); return -1; } if (aaa_parse_url(aaa_url, &pc)) { LM_ERR("parse url error\n"); return -1; } module_name = (char*) pkg_malloc(pc.prot_name->le...
false
true
false
false
false
1
setPSLForLid(unsigned int lid, unsigned int maxLid, uint8_t sl) { if (PSL.empty()) { PSL.resize(maxLid + 1); for(unsigned int i = 0; i<PSL.size(); i++) PSL[i] = IB_SLT_UNASSIGNED; } PSL[lid] = sl; }
false
false
false
false
false
0
btrfs_releasepage(struct page *page, gfp_t gfp_flags) { if (PageWriteback(page) || PageDirty(page)) return 0; return __btrfs_releasepage(page, gfp_flags & GFP_NOFS); }
false
false
false
false
false
0
BlockSelectWord() { int Y = VToR(CP.Row); PELine L = RLine(Y); int P; int C; if (BlockUnmark() == 0) return 0; BlockMode = bmStream; P = CharOffset(L, CP.Col); if (P >= L->Count) return 0; C = ChClassK(L->Chars[P]); while ((P > 0) && (C == ChClassK(L->Chars[P - 1]))) P--; ...
false
false
false
false
false
0
readConfig (const QString &fname) { TsConfig config; // Add empty group. TsConfig::iterator configGroup; configGroup = config.insert(QString(), TsConfigGroup()); QFile file(fname); if (!file.open(QIODevice::ReadOnly)) { return config; } QTextStream stream(&file); stream.setC...
false
false
false
false
false
0
archive_entry_copy_mac_metadata(struct archive_entry *entry, const void *p, size_t s) { free(entry->mac_metadata); if (p == NULL || s == 0) { entry->mac_metadata = NULL; entry->mac_metadata_size = 0; } else { entry->mac_metadata_size = s; entry->mac_metadata = malloc(s); if (entry->mac_met...
false
false
false
false
false
0
lgl_xml_vendor_parse_vendors_doc (xmlDocPtr vendors_doc) { GList *vendors = NULL; xmlNodePtr root, node; lglVendor *vendor; LIBXML_TEST_VERSION; root = xmlDocGetRootElement (vendors_doc); if (!root || !root->name) { g_message ("\"%s\" ...
false
false
false
false
false
0
usb_scan_device(char *sys) { struct cc_usbdev *usbdev; usbdev = calloc(1, sizeof (struct cc_usbdev)); if (!usbdev) return NULL; usbdev->sys = strdup(sys); usbdev->manufacturer = load_string(sys, "manufacturer"); usbdev->product = load_string(sys, "product"); usbdev->serial = load_dec(sys, "serial"); usbdev->...
false
false
false
false
false
0
_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) { void *p; #ifdef ZEND_SIGNALS TSRMLS_FETCH(); #endif HANDLE_BLOCK_INTERRUPTIONS(); p = _safe_emalloc(nmemb, size, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); if (UNEXPECTED(p == NULL)) { HANDLE_UNBLOCK_INTERRUPTIONS(); ...
false
false
false
false
false
0
Graphics() // variant due to compression problems { DRIVER_ERROR error= thePrinter->Send((const BYTE*)grafStart, sizeof(grafStart) ); if (error!=NO_ERROR) return error; if (thePrintMode->Config.bCompress) { error= thePrinter->Send((const BYTE*)grafMode2, sizeof(grafMode2) ); ...
false
false
false
false
false
0
find_width(font_data *font, glyph index) { glyph_width wantw; glyph_width const *w; wantw.glyph = index; w = find234(font->info->widths, &wantw, NULL); if (!w) return 0; return w->width; }
false
false
false
false
false
0
gatxti(gaint on, gaint cs) { /* Turn this feature ON/OFF */ color_on = on; if ( cs < 0 ) cs = 0; scheme = cs; }
false
false
false
false
false
0
generate_files(void) { TESTING("generating files"); if (do_file_all(HREPACK_FILE1)<0) return FAIL; if (do_file_hyperslab(HREPACK_FILE2)<0) return FAIL; if (do_file_groups(HREPACK_FILE3)<0) return FAIL; PASSED(); return SUCCEED; }
false
false
false
false
false
0
is_comparison_with_loop_invariant_p (gimple stmt, struct loop *loop, tree *loop_invariant, enum tree_code *compare_code, tree *loop_step, tree *loop_iv_base) { tree op0, op1, bound, base; affine_iv iv0, iv1; enum tree_code code; tree step; code = gimple_cond_code (stmt); ...
false
false
false
false
false
0
gx_dc_ht_colored_get_nonzero_comps( const gx_device_color * pdevc, const gx_device * dev_ignored, gx_color_index * pcomp_bits ) { int i, ncomps = pdevc->colors.colored.num_components; gx_color_index comp_bits = pdevc->colors.colored.plane_mask; for (i ...
false
false
false
false
false
0
get_key_haup_xvr(struct IR_i2c *ir, enum rc_type *protocol, u32 *scancode, u8 *toggle) { int ret; unsigned char buf[1] = { 0 }; /* * This is the same apparent "are you ready?" poll command observed * watching Windows driver traffic and implemented in lirc_zilog. With * this added, we get far saner remo...
true
true
false
false
false
1
bacon_video_widget_gtk_plug_get_toplevel (GtkPlug *plug) { Window root, parent, *children; guint nchildren; Window xid; g_return_val_if_fail (GTK_IS_PLUG (plug), 0); xid = gtk_plug_get_id (plug); do { /* FIXME: multi-head */ if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xid, &root, ...
false
false
false
false
false
0
test_multipart (int headers_expected, int sniffed_expected, MultipartMode multipart_mode) { GError* error = NULL; SoupRequest* request = soup_session_request (session, base_uri_string, &error); SoupMessage *msg = soup_request_http_get_message (SOUP_REQUEST_HTTP (request)); GMainLoop *loop = g_main_loop_new (NULL, ...
false
false
false
false
false
0
JAM_DelSubPacket( s_JamSubPacket* SubPack_PS ) { ulong i; if (!SubPack_PS) return JAM_BAD_PARAM; for ( i=0; i < SubPack_PS->NumFields; i++ ) { s_JamSubfield* Field_PS = SubPack_PS->Fields[i]; if ( Field_PS->Buffer ) free( Field_PS->Buffer ); free( Field_PS ); } free( SubPack_PS->Fields )...
false
false
false
false
false
0
evas_font_dir_available_list(const Evas *evas) { Eina_List *l; Eina_List *ll; Eina_List *available = NULL; char *dir; #ifdef HAVE_FONTCONFIG /* Add font config fonts */ FcPattern *p; FcFontSet *set = NULL; FcObjectSet *os; int i; p = FcPatternCreate(); os = FcObjectSetBuild(FC_FAMILY,...
false
false
false
false
false
0
ajSeqGetTaxid(const AjPSeq seq) { ajuint ret = 0; ajuint i = 0; if(ajStrGetLen(seq->Taxid)) { ajStrToUint(seq->Taxid, &ret); return ret; } while(seqTaxon[i].Name) { if(ajStrPrefixCaseC(seq->Tax, seqTaxon[i].Name)) { return seqTaxon[i].Taxid; ...
false
false
false
false
false
0
apol_vector_remove(apol_vector_t * v, const size_t idx) { if (v == NULL || idx >= v->size) { errno = EINVAL; return -1; } memmove(v->array + idx, v->array + idx + 1, sizeof(v->array[0]) * (v->size - idx - 1)); v->size--; return 0; }
false
false
false
false
false
0
parse_net(const char *net, unsigned char *prefix_r, unsigned char *plen_r, int *af_r) { char buf[INET6_ADDRSTRLEN]; char *slash, *end; unsigned char prefix[16]; long plen; int af; struct in_addr ina; struct in6_addr ina6; int rc; if(strcmp(net, "default") == 0) { m...
false
false
false
false
false
0
is_eth_port_of_netdev(struct ib_device *ib_dev, u8 port, struct net_device *rdma_ndev, void *cookie) { struct net_device *event_ndev = (struct net_device *)cookie; struct net_device *real_dev; int res; if (!rdma_ndev) return 0; rcu_read_lock(); real_dev = rdma_vlan_dev_real_dev(event_ndev); if (!real_de...
false
false
false
false
false
0
_kdc_fix_time(time_t **t) { if(*t == NULL){ ALLOC(*t); **t = MAX_TIME; } if(**t == 0) **t = MAX_TIME; /* fix for old clients */ }
false
false
false
false
false
0
ParsePackage(FileDescriptorProto* file) { if (file->has_package()) { AddError("Multiple package definitions."); // Don't append the new package to the old one. Just replace it. Not // that it really matters since this is an error anyway. file->clear_package(); } DO(Consume("package")); Recor...
false
false
false
false
false
0
ssl_renegotiate(SSL *ssl) { int ret = SSL_OK; disposable_new(ssl); #ifdef CONFIG_SSL_ENABLE_CLIENT if (IS_SET_SSL_FLAG(SSL_IS_CLIENT)) { ret = do_client_connect(ssl); } else #endif { send_packet(ssl, PT_HANDSHAKE_PROTOCOL, g_hello_request, sizeof(g_hello_req...
false
false
false
false
false
0
coerce_proc_declaration (NODE_T * p) { if (p == NO_NODE) { return; } else if (IS (p, ROUTINE_TEXT)) { coerce_routine_text (SUB (p)); } else { coerce_proc_declaration (SUB (p)); coerce_proc_declaration (NEXT (p)); } }
false
false
false
false
false
0
set_blockdiff(const struct work *work) { uint64_t *data64, d64, diff64; double previous_diff; uint32_t diffhash[8]; uint32_t difficulty; uint32_t diffbytes; uint32_t diffvalue; char rhash[32]; int diffshift; difficulty = swab32(*((uint32_t *)(work->data + 72))); diffbytes = ((difficulty >> 24) & 0xff) - 3; ...
true
true
false
false
false
1
input_pad_gtk_window_real_button_pressed (InputPadGtkWindow *window, const gchar *str, guint type, guint keysym, guint ...
false
false
false
false
false
0
PyVTKAddFile_vtkDataSetGradientPrecompute( PyObject *dict, const char *modulename) { PyObject *o; o = PyVTKClass_vtkDataSetGradientPrecomputeNew(modulename); if (o && PyDict_SetItemString(dict, (char *)"vtkDataSetGradientPrecompute", o) != 0) { Py_DECREF(o); } }
false
false
false
false
false
0
AddMultiFiles(const char *file_name, const char *type_name, const char *show_filename, struct multi_files **multi_first, struct multi_files **multi_last) { struct multi_files *multi;...
false
false
false
false
false
0
rb_io_s_foreach(argc, argv) int argc; VALUE *argv; { VALUE fname; struct foreach_arg arg; rb_scan_args(argc, argv, "11", &fname, &arg.sep); SafeStringValue(fname); if (argc == 1) { arg.sep = rb_default_rs; } else if (!NIL_P(arg.sep)) { StringValue(arg.sep); } arg.io = rb_...
false
false
false
false
false
0
hset_foreach(const hset_t *hx, cdata_fn_t fn, void *data) { unsigned *hp, *end; size_t i, n; hset_check(hx); end = &hx->kset.hashes[hx->kset.size]; hash_refcnt_inc(HASH(hx)); /* Prevent any key relocation */ for (i = n = 0, hp = hx->kset.hashes; hp != end; i++, hp++) { if (HASH_IS_REAL(*hp)) { (*fn)(hx->...
false
false
false
false
false
0
generateUniqueAnimationName() { // build name std::ostringstream uidname; uidname << GeneratedAnimationNameBase.c_str() << d_uid_counter; // update counter for next time unsigned long old_uid = d_uid_counter; ++d_uid_counter; // log if we ever wrap-around (which should be pretty unlikely) ...
false
false
false
false
false
0
take_image(CIMAGE *_object, QImage *image) { bool d = image->isDetached(); //qDebug("take_image: %d x %d / %d [%c]", image->width(), image->height(), image->bytesPerLine(), image->isDetached() ? 'D' : '+'); const uchar *data = ((const QImage *)image)->bits(); //qDebug("take_image: [%c]", image->isDetached() ? 'D' :...
false
false
false
false
false
0
print_types(uint8_t min, uint8_t max, int invert, int numeric) { const char *inv = invert ? "!" : ""; if (min != 0 || max != 0xFF || invert) { printf(" "); if (min == max) { printf("%s", inv); print_type(min, numeric); } else { printf("%s", inv); print_type(min, numeric); printf(":"); print_t...
false
false
false
false
false
0
lock_sec_rec_cons_read_sees( /*========================*/ const rec_t* rec, /*!< in: user record which should be read or passed over by a read cursor */ const read_view_t* view) /*!< in: consistent read view */ { trx_id_t max_trx_id; ut_ad(page_rec_is_user_rec(rec)); /* NOTE that we might call this fu...
false
false
false
false
false
0
findWindowBox (TwmWindow *twmwin) { WindowBox *winbox; if (twmwin->iswinbox) return ((WindowBox*)0); if (!Scr->FirstWindowBox) return ((WindowBox*)0); for (winbox = Scr->FirstWindowBox; winbox; winbox = winbox->next) { if (LookInList (winbox->winlist, twmwin->full_name, &twmwin->class)) { if (visi...
false
false
false
false
false
0
linetoscr_16_shrink1_sh (int spix, int dpix, int stoppos, int spr) { uae_u16 *buf = (uae_u16 *) xlinebuffer; while (dpix < stoppos) { uae_u16 spix_val1, spix_val2; uae_u16 v; int off; spix_val1 = pixdata.apixels[spix++]; spix_val2 = pixdata.apixels[spix++]; off = ((spix_val2 & 3) * 4) + (spix_val1 & 3) +...
false
false
false
false
false
0
process_file (const char *file_name) { function_t *fns; create_file_names (file_name); fns = read_graph_file (); if (!fns) return; read_count_file (fns); while (fns) { function_t *fn = fns; fns = fn->next; fn->next = NULL; if (fn->counts) { unsigned src = fn->src; ...
false
false
false
false
false
0
__blk_queue_free_tags(struct request_queue *q) { struct blk_queue_tag *bqt = q->queue_tags; if (!bqt) return; blk_free_tags(bqt); q->queue_tags = NULL; queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q); }
false
false
false
false
false
0
gd_alter_carray(DIRFILE* D, const char* field_code, gd_type_t const_type, size_t array_len) gd_nothrow { int ret; gd_entry_t N; dtrace("%p, \"%s\", 0x%x, %zu", D, field_code, const_type, array_len); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); dreturn("%i", -1)...
false
false
false
false
false
0
mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if (!d->widget) { return; } d->handleMouseMoveEvent(event); event->accept(); return QGraphicsWidget::mouseMoveEvent(event); }
false
false
false
false
false
0
abort_async (struct devstruct *dev, uaecptr request) { struct asyncreq *ar = get_async_request (dev, request, 1); if (!ar) { write_log (_T("%s:%d: abort async but no request %x found!\n"), getdevname(), dev->unit, request); return; } if (log_uaeserial) write_log (_T("%s:%d asyncronous request=%08X aborted\n")...
false
false
false
false
false
0
area_resyncing(struct mddev *mddev, int direction, sector_t lo, sector_t hi) { struct md_cluster_info *cinfo = mddev->cluster_info; int ret = 0; struct suspend_info *s; if ((direction == READ) && test_bit(MD_CLUSTER_SUSPEND_READ_BALANCING, &cinfo->state)) return 1; spin_lock_irq(&cinfo->suspend_lock); if ...
false
false
false
false
false
0
comment(const XMLChar ch[], int start, int length) { AutoPtr<Comment> pComment = _pDocument->createComment(XMLString(ch + start, length)); appendNode(pComment); }
false
false
false
false
false
0
createScratchModel() { PD_Document* doc = getDocument(); PP_AttrProp* AP = new PP_AttrProp(); PD_RDFModelFromAP* retModel = new PD_RDFModelFromAP( doc, AP ); PD_RDFModelHandle ret( retModel ); return ret; }
false
false
false
false
false
0
op_index(int mode, Value * v) { #if ENABLE_Symbols Value i; int64_t lower_bound = 0; ContextAddress offs = 0; ContextAddress size = 0; Symbol * type = NULL; expression(mode, &i); if (mode == MODE_SKIP) return; if (v->type_class != TYPE_CLASS_ARRAY && v->type_class != TYPE_CLASS_POINTER...
false
false
false
false
false
0
gt_bittab_complement(GtBittab *dest, const GtBittab *src) { unsigned long i; gt_assert(dest && src && dest->num_of_bits == src->num_of_bits); for (i = 0; i < src->tabsize - 1; i++) dest->tabptr[i] = ~src->tabptr[i]; /* the ``last'' bittab gets special treatment to prevent that unused bits become set...
false
false
false
false
false
0
Paragraph(const AString &text) { Enclose(1, "p"); PutStr(text); Enclose(0, "p"); }
false
false
false
false
false
0
check_hashjoinable(RestrictInfo *restrictinfo) { Expr *clause = restrictinfo->clause; Oid opno; if (restrictinfo->pseudoconstant) return; if (!is_opclause(clause)) return; if (list_length(((OpExpr *) clause)->args) != 2) return; opno = ((OpExpr *) clause)->opno; if (op_hashjoinable(opno) && !cont...
false
false
false
false
false
0
NewInstance( void *theEnv) { INSTANCE_TYPE *instance; instance = get_struct(theEnv,instance); #if DEFRULE_CONSTRUCT instance->header.theInfo = &InstanceData(theEnv)->InstanceInfo; instance->header.dependents = NULL; instance->header.busyCount = 0; instance->header.timeTag = 0L; instance->par...
false
false
false
false
false
0
CreateInitialBattleGrounds() { uint32 count = 0; // 0 1 2 3 4 5 6 7 8 QueryResult* result = WorldDatabase.Query("SELECT id, MinPlayersPerTeam,MaxPlayersPerTeam,MinLvl,MaxLvl,Al...
false
false
false
false
false
0
parse_port(string const &s) { int ret; if (sscanf(s.c_str(), "%d", &ret) < 1) ret = 0; return ret; }
false
false
false
false
false
0
getToUnicodeValue(CnvExtData *extData, UCMTable *table, UCMapping *m) { UChar32 *u32; UChar *u; uint32_t value; int32_t u16Length, ratio; UErrorCode errorCode; /* write the Unicode result code point or string index */ if(m->uLen==1) { u16Length=U16_LENGTH(m->u); value=(uint3...
false
false
false
false
false
0
vmm_Close(void) { VMM_Mode *m = vmm_First(); while(m) { VMM_Mode *dm = m; m = vmm_Next(m); free(dm->name); free(dm); } vmm_modes = NULL; }
false
false
false
false
false
0
qlcnic_sriov_process_bc_cmd(struct work_struct *work) { struct qlcnic_vf_info *vf = container_of(work, struct qlcnic_vf_info, trans_work); struct qlcnic_bc_trans *trans = NULL; struct qlcnic_adapter *adapter = vf->adapter; struct qlcnic_cmd_args cmd; u8 req; if (adapter->need_fw_reset) return; if (te...
false
false
false
false
false
0
unity_scope_result_copy (const UnityScopeResult* self, UnityScopeResult* dest) { const gchar* _tmp0_ = NULL; gchar* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; guint _tmp4_ = 0U; UnityResultType _tmp5_ = 0; const gchar* _tmp6_ = NULL; gchar* _tmp7_ = NULL; const gchar* _tmp8_ = NULL; gcha...
false
false
false
false
false
0
getIndex(FbShell *shell, bool forward, bool stepfirst) { u32 index, temp = mCurShell + NR_SHELLS; #define STEP() do { \ if (forward) temp++; \ else temp--; \ } while (0) if (stepfirst) STEP(); for (u32 i = NR_SHELLS; i--;) { index = temp % NR_SHELLS; if ((shell == SHELL_ANY && mShellList[index]) || she...
false
false
false
false
false
0
ra_frame_unwind (call_frame_t *frame) { ra_local_t *local = NULL; ra_fill_t *fill = NULL; int32_t count = 0; struct iovec *vector = NULL; int32_t copied = 0; struct iobref *iobref = NULL; ra_fill_t *next = NULL; ...
false
true
false
false
false
1
param2Point(double u_p, double v_p, Point3& point) { point[0] = point[1] = point[2] = 0.0; int index = int(u_p); GcLine* line = NULL; getLine(index, line); if ( line == NULL ) { return; } line->param2Point(u_p - index, v_p, point); delete line; }
false
false
false
false
false
0
parse_cea(unsigned char *x) { int ret = 0; int version = x[1]; int offset = x[2]; unsigned char *detailed; if (version >= 1) do { if (version == 1 && x[3] != 0) ret = 1; if (offset < 4) break; if (version < 3) { printf("%d 8-byte timing descriptors\n", (offset - 4) / 8); if...
false
false
false
false
false
0
write(const char *config_char_ptr) const { // write values from string to awars // if the string contains unknown settings, they are silently ignored AWT_config wanted_state(config_char_ptr); GB_ERROR error = wanted_state.parseError(); if (!error) error = wanted_state.write_to_awars(config_mappi...
false
false
false
false
false
0
search_const_real(float val_r) { Const_table *cpt; Boolean found = FALSE; cpt = const_head; while ((found == FALSE)&&(cpt != NULL)) { if ( (cpt->type == TYPE_REAL) &&(cpt->val.r == val_r)) found = TRUE; else cpt = cpt->next; } return cpt; }
false
false
false
false
false
0
isight_trigger(struct snd_pcm_substream *substream, int cmd) { struct isight *isight = substream->private_data; switch (cmd) { case SNDRV_PCM_TRIGGER_START: ACCESS_ONCE(isight->pcm_running) = true; break; case SNDRV_PCM_TRIGGER_STOP: ACCESS_ONCE(isight->pcm_running) = false; break; default: return -EINV...
false
false
false
false
false
0
set_top( const int top ) { if( m_items.size() < MAX_LOCAL_HISTORY && top > m_history_top ) return; m_history_top = top; #ifdef _DEBUG std::cout << "ViewHistory::set_top" << std::endl << "size = " << m_items.size() << std::endl << "top = " << m_history_top << std::endl ...
false
false
false
false
false
0
var_get_real_template(struct variable *root, const char *name) { struct variable *v = es_find_var(root, name); if (v && v->type == VAR_FLOAT) return v->v.num; else { do_output(LOG_CAT_ERROR, LOG_AREA_MAIN, "Undefined real variable: %s\n", name); return -123456.0; } }
false
false
false
false
false
0