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
xmlXPathCompOpEvalToBoolean(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op, int isPredicate) { xmlXPathObjectPtr resObj = NULL; start: /* comp = ctxt->comp; */ switch (op->op) { case XPATH_OP_END: return (0); case XPAT...
false
false
false
false
false
0
gearman_string_create(gearman_vector_st *self, const char *str, const size_t str_size) { if (str_size and str == NULL) { assert_msg(str, "Programmer error, gearman_string_clear() was passed a null string, but str_size > 0"); return NULL; } if (str == NULL) { return NULL; } self= gearman_stri...
false
false
false
false
false
0
pch_uart_hal_read(struct eg20t_port *priv, unsigned char *buf, int rx_size) { int i; u8 rbr, lsr; struct uart_port *port = &priv->port; lsr = ioread8(priv->membase + UART_LSR); for (i = 0, lsr = ioread8(priv->membase + UART_LSR); i < rx_size && lsr & (UART_LSR_DR | UART_LSR_BI); lsr = ioread8(...
false
false
false
false
false
0
mptfc_init(void) { int error; show_mptmod_ver(my_NAME, my_VERSION); /* sanity check module parameters */ if (mptfc_dev_loss_tmo <= 0) mptfc_dev_loss_tmo = MPTFC_DEV_LOSS_TMO; mptfc_transport_template = fc_attach_transport(&mptfc_transport_functions); if (!mptfc_transport_template) return -ENODEV; mptf...
false
false
false
false
false
0
main( int argc, char *argv[] ) { if (argc<3) { cout<<"Usage : VolumeMedian file.mhd radius"<<endl; exit(1); } // Load Volume cout <<"load : "<<argv[1]<<endl; vtkMetaImageReader *Reader=vtkMetaImageReader::New(); Reader->SetFileName(argv[1]); Reader->Update(); vtkImageMedian3D *Median=vtkImageMedian3D::Ne...
false
false
false
false
false
0
isOrigUUID(void) const { UT_UTF8String sDoc; UT_UTF8String sOrig; if((m_pMyUUID== NULL) || (m_pOrigUUID == NULL)) return false; m_pMyUUID->toString(sDoc); m_pOrigUUID->toString(sOrig); bool b = (strcmp(sDoc.utf8_str(),sOrig.utf8_str()) == 0); return b; }
false
false
false
false
false
0
numaSubsample(NUMA *nas, l_int32 subfactor) { l_int32 i, n; l_float32 val; NUMA *nad; PROCNAME("numaSubsample"); if (!nas) return (NUMA *)ERROR_PTR("nas not defined", procName, NULL); if (subfactor < 1) return (NUMA *)ERROR_PTR("subfactor < 1", procName, NULL); ...
false
false
false
false
false
0
length_ExtKeyUsage(const ExtKeyUsage *data) { size_t ret = 0; { size_t Top_tag_oldret = ret; unsigned int n_Top_tag; ret = 0; for(n_Top_tag = (data)->len; n_Top_tag > 0; --n_Top_tag){ size_t Top_tag_for_oldret = ret; ret = 0; ret += der_length_oid(&(data)->val[n_Top_tag - 1]); ret += 1 + der_length_len (ret); ret += To...
false
false
false
false
false
0
ratingValueChanged() { DEBUG_BLOCK KRatingWidget * edit = qobject_cast<KRatingWidget *>( sender() ); if( !edit ) return; int role = m_editorRoleMap.value( edit ); m_changedValues.insert( role, QString::number( edit->rating() ) ); }
false
false
false
false
false
0
locateInPolygonRing(const Coordinate& p, const LinearRing *ring) { // can this test be folded into isPointInRing ? const CoordinateSequence *cl = ring->getCoordinatesRO(); if (CGAlgorithms::isOnLine(p,cl)) return Location::BOUNDARY; if (CGAlgorithms::isPointInRing(p,cl)) return Location::INTERIOR; return Lo...
false
false
false
false
false
0
seat_xlocal_set_active_session (Seat *seat, Session *session) { gint vt = display_server_get_vt (session_get_display_server (session)); if (vt >= 0) vt_set_active (vt); SEAT_CLASS (seat_xlocal_parent_class)->set_active_session (seat, session); }
false
false
false
false
false
0
min_horiz_cma_callback(struct widget *pWidget) { if (Main.event.button.button == SDL_BUTTON_LEFT) { struct hmove pMotion; pMotion.pScrollBar = pWidget; pMotion.min = pWidget->next->size.x + pWidget->next->size.w + 5; pMotion.max = pMotion.min + 70; pMotion.base = -20; MOVE_STEP_X = 2; ...
false
false
false
false
false
0
idtable_try_new_id(idtable_t *tbl, uint32 *id, void *value) { uint32 i = 0; idtable_check(tbl); g_assert(id != NULL); /* * Rotate through the whole ID space for three reasons: * * - to detect accidental reuse of a stale ID: someone keeping a copy of * an ID that has already been freed. * - to be able ...
false
false
false
false
false
0
compute_frame_info (MonoInternalThread *thread, DebuggerTlsData *tls) { ComputeFramesUserData user_data; GSList *tmp; int i, findex, new_frame_count; StackFrame **new_frames, *f; MonoUnwindOptions opts = (MonoUnwindOptions)(MONO_UNWIND_DEFAULT | MONO_UNWIND_REG_LOCATIONS); // FIXME: Locking on tls if (tls->fram...
false
false
false
false
false
0
streamLengthOfValue(DcmVR& vr) { static char buf[256]; Uint32 min = vr.getMinValueLength(); Uint32 max = vr.getMaxValueLength(); Uint32 undefLen = DCM_UndefinedLength; if (min==max) { sprintf(buf, "%d bytes fixed length", (int)min); } else if (min==0) { if (max==undefLen) { ...
false
false
false
false
false
0
redrawFrame(FbDrawable &drawable) { for (unsigned int i = 0; i < menuitems.size(); i++) { drawItem(drawable, i); } }
false
false
false
false
false
0
gimple_call_arg_flags (const_gimple stmt, unsigned arg) { tree attr = gimple_call_fnspec (stmt); if (!attr || 1 + arg >= (unsigned) TREE_STRING_LENGTH (attr)) return 0; switch (TREE_STRING_POINTER (attr)[1 + arg]) { case 'x': case 'X': return EAF_UNUSED; case 'R': return EAF_DIRE...
false
false
false
false
false
0
writeDimLinear(DL_WriterA& dw, const DL_DimensionData& data, const DL_DimLinearData& edata, const DL_Attributes& attrib) { dw.entity("DIMENSION"); if (version==DL_VERSION_2000) { dw.dxfString(100, "AcDbEntity"); } ...
false
false
false
false
false
0
set_range_ops(snd_mixer_elem_t *elem, int dir, long min, long max) { selem_none_t *s = snd_mixer_elem_get_private(elem); int err; s->str[dir].range = 1; s->str[dir].min = min; s->str[dir].max = max; if ((err = selem_read(elem)) < 0) return err; return 0; }
false
false
false
false
false
0
handle_immediate(struct tgsi_to_rc * ttr, struct tgsi_full_immediate * imm, unsigned index) { struct rc_constant constant; unsigned swizzle = 0; boolean can_swizzle = TRUE; unsigned i; for (i = 0; i < 4; i++) { if (imm->u[i].Float ==...
false
false
false
false
false
0
_backup_audio_orc_unpack_u8 (OrcExecutor * ORC_RESTRICT ex) { int i; int n = ex->n; orc_union32 * ORC_RESTRICT ptr0; const orc_int8 * ORC_RESTRICT ptr4; orc_int8 var34; #if defined(__APPLE__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && defined (__i386__) volatile orc_union32 var35; #else orc_union32 var35...
false
false
false
false
false
0
findentrybyindex(mp3entry *base, int *index) { mp3entry *tmp = base; mp3entry *result = NULL; if(*index == 0 || base == NULL) return NULL; while(tmp != NULL) { if(IS_FILE(tmp)) (*index)--; if((*index) == 0) return tmp; else tmp = tmp->sibling; } tmp = base; while(tmp != NULL) { if(IS_DIR(...
false
false
false
false
false
0
ioc4_unregister_submodule(struct ioc4_submodule *is) { struct ioc4_driver_data *idd; mutex_lock(&ioc4_mutex); list_del(&is->is_list); /* Remove submodule for each IOC4 */ if (!is->is_remove) goto out; list_for_each_entry(idd, &ioc4_devices, idd_list) { if (is->is_remove(idd)) { printk(KERN_WARNING ...
false
false
false
false
false
0
show_inven(olist_detail_t mode) { int i, last_slot = -1; int diff = weight_remaining(); object_type *o_ptr; int num_obj = 0; char labels[50][80]; object_type *objects[50]; bool in_term = (mode & OLIST_WINDOW) ? TRUE : FALSE; /* Include burden for term windows */ if (in_term) { strnfmt(labels[num_obj], s...
true
true
false
false
false
1
rfc1035_hostnamecmp(const char *p, const char *q) { while (*p || *q) { if (*p == '.' || *q == '.' ) { if ( (*p && *p != '.') || (*q && *q != '.')) return (1); while (*p == '.') ++p; while (*q == '.') ++q; continue; } if (!*p || !*q) return (1); if ( toupper((int)(unsigned char)*p) != toup...
false
false
false
false
false
0
_k_updateCurrentChar(const QChar &c) { if (searchMode) { //we are in search mode. make the two comboboxes show the section & block for this character. //(when we are not in search mode the current character always belongs to the current section & block.) int block = s_data->blockIndex(c); ...
false
false
false
false
false
0
nvme_reset(struct nvme_dev *dev) { if (!dev->ctrl.admin_q || blk_queue_dying(dev->ctrl.admin_q)) return -ENODEV; if (!queue_work(nvme_workq, &dev->reset_work)) return -EBUSY; flush_work(&dev->reset_work); return 0; }
false
false
false
false
false
0
AddUncleHashes (Datagram& dgram, bin64_t pos) { bin64_t peak = file().peak_for(pos); while (pos!=peak && ((NOW&3)==3 || !data_out_cap_.within(pos.parent())) && ack_in_.get(pos.parent())==binmap_t::EMPTY ) { bin64_t uncle = pos.sibling(); dgram.Push8(SWIFT_HASH); dgram.Push32...
false
false
false
false
false
0
complex_to_string (complex_t const *src, char imunit) { char *re_buffer = NULL; char *im_buffer = NULL; char const *sign = ""; char const *suffix = ""; char *res; char suffix_buffer[2]; const char *fmt = "%.*" GNM_FORMAT_g; static int digits = -1; if (digits == -1) { gnm_float l10 = gnm_log10 (FLT_RADIX); ...
false
false
false
false
false
0
SetAuditVersion() { void *rval; char rtype = 'x'; /* In addition, each bundle can have its own version */ switch (GetVariable("control_common","cfinputs_version",&rval,&rtype)) { case cf_str: if (rtype != CF_SCALAR) { yyerror("non-scalar version string"); } AUDIT...
false
false
false
false
false
0
UpDownFOV(REAL fov){ REAL ratio=currentScreensetting.aspect*(width*sr_screenWidth)/(height*sr_screenHeight); // clamp ratio to 5/3 REAL maxratio = 5.0/3.0; if (ratio > maxratio) ratio = maxratio; return 360*atan(tan(M_PI*fov/360)/ratio)/M_PI; }
false
false
false
false
false
0
musb_do_idle(unsigned long _musb) { struct musb *musb = (void *)_musb; unsigned long flags; spin_lock_irqsave(&musb->lock, flags); switch (musb->xceiv->otg->state) { case OTG_STATE_A_WAIT_BCON: if ((musb->a_wait_bcon != 0) && (musb->idle_timeout == 0 || time_after(jiffies, musb->idle_timeout))) { dev...
false
false
false
false
false
0
FetchFromOneSpans(int N, void **start, void **end) { if (tcmalloc::DLL_IsEmpty(&nonempty_)) return 0; Span* span = nonempty_.next; ASSERT(span->objects != NULL); int result = 0; void *prev, *curr; curr = span->objects; do { prev = curr; curr = *(reinterpret_cast<void**>(curr)); } while (++resu...
false
false
false
false
false
0
nautilus_path_bar_scroll_timeout (NautilusPathBar *path_bar) { gboolean retval = FALSE; if (path_bar->priv->timer) { if (gtk_widget_has_focus (path_bar->priv->up_slider_button)) { nautilus_path_bar_scroll_up (path_bar); } else { if (gtk_widget_has_focus (path_bar->priv->down_sli...
false
false
false
false
false
0
common_to_load_store_at_once_fd(Block *src, Block *dst) { Module_table *module = src->module; Array_def_use_table_semnode *fd = get_array_def_use(src, dst); Array_def_use_table_semnode *apt, *tmp, *common = NULL; Array_table *atbl; Block_array_dependence_range *srange = src->array_dependence_range; ...
false
false
false
false
false
0
read_pair_string(generic_file & f, const archive_version & edit, string & key, string & val) { infinint tmp; unsigned char fl; string pre_key = ""; if(edit < 5) // old format { f.read((char *)(&fl), 1); if((fl & EA_ROOT) != 0) pre_key = "system."; else pre_key = "user."; } tools_re...
false
false
false
false
false
0
main(int argc, char *argv[]) { struct rlimit limit; int rc; /* Check params and build regexpr */ setlocale (LC_ALL, ""); if (check_params(argc, argv)) return 1; /* Raise the rlimits in case we're being started from a shell * with restrictions. Not a fatal error. */ limit.rlim_cur = RLIM_INFINITY; limit.rl...
false
false
false
false
false
0
__ecereMethod___ecereNameSpace__ecere__com__LinkList_GetAtPosition(struct __ecereNameSpace__ecere__com__Instance * this, uint64 pos, unsigned int create) { struct __ecereNameSpace__ecere__com__LinkList * __ecerePointer___ecereNameSpace__ecere__com__LinkList = (struct __ecereNameSpace__ecere__com__LinkList *)(this ? (((...
false
false
false
true
false
1
updateBackground(unsigned long oldbg_) { MSWidgetOutput::updateBackground(oldbg_); if (dynamic()==MSTrue) computeSize(); else redraw(); }
false
false
false
false
false
0
GetScriptResourceName() const { if (IsDeadCheck("v8::Message::GetScriptResourceName()")) { return Local<String>(); } ENTER_V8; HandleScope scope; i::Handle<i::JSObject> obj = i::Handle<i::JSObject>::cast(Utils::OpenHandle(this)); // Return this.script.name. i::Handle<i::JSValue> script = i...
false
false
false
false
false
0
print_opt_section(const knot_opt_rr_t *rr) { printf("Version: %u; flags: %s; UDP size: %u B\n", knot_edns_get_version(rr), (knot_edns_do(rr) != 0) ? "do" : "", knot_edns_get_payload(rr)); for (int i = 0; i < rr->option_count; i++) { knot_opt_option_t *opt = &(rr->options[i]); if (opt->co...
false
false
false
false
false
0
parse_next_delta_command(struct diffcmd *dc) { int cmd; long line1, nlines; cmd = in_buffer_getc(); if (cmd==EOF) return -1; line1 = parsenum(); while (in_buffer_getc() == ' ') ; in_buffer_ungetc(); nlines = parsenum(); while (in_buffer_getc() != '\n') ; if (!nlines || (cmd != 'a' && cmd != 'd') |...
false
false
false
false
false
0
cfg_get_key_list(config_obj * data, const char *class) { conf_mult_obj *list = NULL; config_node *root = NULL; if (data == NULL) return NULL; if (data->root == NULL) return NULL; root = cfg_get_class(data, class); if (!root || !root->children) { return NULL; } ...
false
false
false
false
false
0
egg_asn1x_set_enumerated (GNode *node, GQuark value) { EggAsn1xDef *opt; const gchar *name; gpointer data; gsize n_data; gulong val; g_return_if_fail (node != NULL); g_return_if_fail (value != 0); g_return_if_fail (anode_def_type (node) == EGG_ASN1X_ENUMERATED); name = g_quark_to_st...
false
false
false
false
false
0
free_pages(void *p, size_t size, bool update_pmap) { if (vmm_debugging(5)) { s_debug("VMM freeing %zuKiB region at %p", size / 1024, p); } free_pages_intern(p, size, update_pmap); }
false
false
false
false
false
0
fastMarshalWString(cdrStream& stream, omniCodeSet::NCS_W* ncs, _CORBA_ULong bound, _CORBA_ULong len, const _CORBA_WChar* ws) { if (ncs->id() == id()) { // Null transformation if (bound && len > bound) OMNIORB_THROW(MARSHAL, MARSHAL_WStringIsToo...
false
false
false
false
false
0
ParseRootNodeGuidsFile( IBFabric *p_fabric, string fileName) { ifstream guidsFile; guidsFile.open(fileName.c_str(), ifstream::in); if (!guidsFile.is_open()) { cout << "-F- Given roots file could not be opened!" << endl; exit(1); } uint64_t guid; list <IBNode *> roots; string line; guidsFile...
false
false
false
false
false
0
gw_str_replace_char ( gchar *string, gchar before, gchar after) { gchar *p = NULL; gint result = -1; #ifdef GW_DEBUG_TOOLS_COMPONENT g_print ( "*** GW - %s (%d) :: %s()\n", __FILE__, __LINE__, __PRETTY_FUNCTION__); #endif if ( string != NULL ) { for ( p = string; *p; p++) { if ( *p == before ) { *...
false
false
false
false
false
0
tty_disable_completion (void) { if (no_terminal || !my_rl_inhibit_completion) return; if (!initialized) init_ttyfp(); my_rl_inhibit_completion (1); }
false
false
false
false
false
0
CRYPTO_nistcts128_decrypt_block(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], block128_f block) { size_t residue, n; union { size_t align; unsigned char c[32]; } tmp; assert (in && out && key && ivec); if (len<16) return 0; residue=len%16; if (residue==...
false
false
false
false
false
0
process_avctp(int sk, int reject) { unsigned char buf[672]; ssize_t len; while (1) { struct avctp_header *hdr = (void *) buf; len = read(sk, buf, sizeof(buf)); if (len <= 0) { perror("Read failed"); break; } dump_buffer(buf, len); if (len >= AVCTP_HEADER_LENGTH) dump_avctp_header(hdr); } }
false
false
false
false
false
0
sw_myspace_item_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { SwMySpaceItemViewPrivate *priv = GET_PRIVATE (object); switch (property_id) { ...
false
false
false
false
false
0
operator=(const FXDict& orig){ register FXint i; if(&orig!=this){ clear(); FXRESIZE(&dict,FXDictEntry,orig.total); for(i=0; i<orig.total; i++){ if(0<=orig.dict[i].hash){ dict[i].key=strdup(orig.dict[i].key); dict[i].data=orig.dict[i].data; dict[i].hash=orig.dict[i].hash; ...
false
false
false
false
false
0
precv(nhead) struct nmsg *nhead; { struct nmsg incoming; /* incoming header */ struct vcdesc *p; /* favourite pointer */ int4 extra_len; /* extra msg length */ int4 nbytes; /* # bytes read */ int4 save_flags; /* saved nh_flags */ char bitbucket; /* to trash extra msg */ /* * Locate the virtual cir...
false
false
false
false
false
0
load_libs(int level, void *pfile, unsigned bytes) { char tbuf[16]; loadlibwork_t work; int n = 1; if (level > 10) return XSF_TRUE; work.level = level; work.tag = "_lib"; do { work.taglen = strlen(work.tag); work.found = 0; if (xsf_tagenum(load_psfcb, &work, pfile, bytes) < 0) return XSF_FALSE; #...
true
true
false
false
false
1
slapd_nasty(char* str, int c, int err) { char *msg = NULL; char buffer[100]; PR_snprintf(buffer,sizeof(buffer), "%s BAD %d",str,c); LDAPDebug(LDAP_DEBUG_ANY,"%s, err=%d %s\n",buffer,err,(msg = strerror( err )) ? msg : ""); }
true
true
false
false
false
1
hide_secondary_monitors(void) { FSmon *fs; GList *list; if (!secondary_monitors_shown) return; secondary_monitors_shown = FALSE; gkrellm_freeze_side_frame_packing(); for (list = fs_mon_list; list; list = list->next) { fs = (FSmon *) list->data; if (fs->secondary && (!fs_is_mounted(fs) || !fs->show_if_mo...
false
false
false
false
false
0
opcmp(const struct btop **op1, const struct btop **op2) { if(ISDELOP(**op1) && ISDELOP(**op2)) return((*op2)->blk - (*op1)->blk); else if(!ISDELOP(**op1) && ISDELOP(**op2)) return(-1); else if(ISDELOP(**op1) && !ISDELOP(**op2)) return(1); else return((*op1)->blk - (*op2)->blk); }
false
false
false
false
false
0
sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct sc92031_priv *priv = netdev_priv(dev); void __iomem *port_base = priv->port_base; unsigned len; unsigned entry; u32 tx_status; if (unlikely(skb->len > TX_BUF_SIZE)) { dev->stats.tx_dropped++; goto out; } spin_lock(&priv->lo...
false
false
false
false
false
0
decode_end(AVCodecContext *avctx) { ZmbvContext * const c = avctx->priv_data; av_freep(&c->decomp_buf); if (c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); inflateEnd(&(c->zstream)); av_freep(&c->cur); av_freep(&c->prev); return 0; }
false
false
false
false
false
0
ndmfhdb_open (FILE *fp, struct ndmfhdb *fhcb) { int rc; NDMOS_MACRO_ZEROFILL (fhcb); fhcb->fp = fp; rc = ndmfhdb_dirnode_root (fhcb); if (rc > 0) { fhcb->use_dir_node = 1; return 0; } rc = ndmfhdb_file_root (fhcb); if (rc > 0) { fhcb->use_dir_node = 0; return 0; } return -1; }
false
false
false
false
false
0
windowCloseButtonCallback( Widget* widget, const Event* e ) { if( e->type == EMousePressed ) if( Widget_mouseOver( widget, &e->v ) ) { widget->pressed = true; return true; } if( e->type == EMouseReleased && widget->pressed ){ if( Widget_mouseOver( widget,...
false
false
false
false
false
0
rrpc_call(globus_rls_handle_t *h, BUFFER *bp, char *method, int na, ...) { struct iovec iov[10]; globus_size_t nb; int n; va_list ap; int retried = 0; int rc; char errmsg[MAXERRMSG]; if (h->flags & FH_CLOSED) { if ((rc = connect1(h, errmsg, MAXERRMSG)) != GLOBUS_RLS_SUCCESS) retur...
false
false
false
false
false
0
print_context(int c) { if ((c & 1) != 0) printf("OPC "); if ((c & 2) != 0) printf("DIR "); if ((c & 4) != 0) printf("TK "); if ((c & 8) != 0) printf("SEG "); if ((c & 16) != 0) printf("DK "); if ((c & 32) != 0) printf("MK "); if ((c & 64) != 0) printf("STA "); if ((c & 128) != 0) printf(...
false
false
false
false
false
0
showColorDialog() { if (m_itemHighlighted < 0) return; bool ok; const QColor currentColor(m_itemColors.at(m_itemHighlighted)); const QColor newColor = ColorDialog::getColor(&ok, currentColor, this); if (ok) { m_itemColors.replace(m_itemHighlighted, newColor.name()); ui.itemTable->item(m_itemHighlighted, 0)->...
false
false
false
false
false
0
PerlIOAPR_read(pTHX_ PerlIO *f, void *vbuf, Size_t count) { PerlIOAPR *st = PerlIOSelf(f, PerlIOAPR); apr_status_t rc; rc = apr_file_read(st->file, vbuf, &count); MP_TRACE_o(MP_FUNC, "%db [%s]", (int)count, MP_TRACE_STR_TRUNC(st->pool, (char *)vbuf, (int)count)); if (rc == APR_EOF)...
false
false
false
false
false
0
jump_to_species(ED4_species_name_terminal *name_term, int seq_pos, bool unfold_groups, ED4_CursorJumpType jump_type) { ED4_species_manager *species_manager = name_term->get_parent(ED4_L_SPECIES)->to_species_manager(); ED4_cursor *cursor = &ED4_ROOT->get_ed4w()->cursor; bool jumped = false; if (species_...
false
false
false
false
false
0
child_unregister(struct device *dev, void *data) { /* * the singular ndctl class device per bus needs to be * "device_destroy"ed, so skip it here * * i.e. remove classless children */ if (dev->class) /* pass */; else nd_device_unregister(dev, ND_SYNC); return 0; }
false
false
false
false
false
0
randomizeClientKey(client c) { char buf[32]; size_t i, r; for (i = 0; i < c->randlen; i++) { r = random() % config.randomkeys_keyspacelen; snprintf(buf,sizeof(buf),"%012zu",r); memcpy(c->randptr[i],buf,12); } }
false
false
false
false
false
0
print_clause(FILE *fp, struct clause *cl) { struct literal *lit; struct term *t; fprintf(fp, "%d ", cl->id); if (cl->heat_level > 0) fprintf(fp, "(heat=%d) ", (int) (cl->heat_level)); if (! multi_justifications()) { print_justification(fp, cl->parents); fprintf(fp, " "); } else { if...
false
false
false
false
false
0
_table_row_handler(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { int rc = SNMP_ERR_NOERROR; netsnmp_request_info *req; void ...
false
false
false
false
false
0
biffMsgStrGet(const biffMsg *msg) { char *ret; if (biffMsgNoop == msg) { return NULL; } ret = biffMsgStrAlloc(msg); biffMsgStrSet(ret, msg); return ret; }
false
false
false
false
false
0
revive_nasty(x, y, msg) int x,y; const char *msg; { register struct obj *otmp, *otmp2; struct monst *mtmp; coord cc; boolean revived = FALSE; for(otmp = level.objects[x][y]; otmp; otmp = otmp2) { otmp2 = otmp->nexthere; if (otmp->otyp == CORPSE && (is_rider(&mons[otmp->corpsenm]) || ot...
false
false
false
false
false
0
glade_project_verify_properties (GladeWidget *widget) { GladeProject *project; g_return_if_fail (GLADE_IS_WIDGET (widget)); project = glade_widget_get_project (widget); if (!project || project->priv->loading) return; glade_project_verify_properties_internal (widget, NULL, NULL, TRUE, GLADE_VER...
false
false
false
false
false
0
SetCursor(Cursor* c) { cursor_ = c; if (canvas != nil) { window->cursor(c); } }
false
false
false
false
false
0
open_png_writer(png_t *png, int sizeY) { png->png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png->png_ptr) return 3; png->info_ptr = png_create_info_struct(png->png_ptr); if (!png->info_ptr) return 4; if (setjmp(png_jmpbuf(png->png_ptr))) { png_destroy_write_stru...
false
false
false
false
false
0
unbind(string const & seq, FuncRequest const & func) { KeySequence k(0, 0); string::size_type const res = k.parse(seq); if (res == string::npos) unbind(&k, func); else LYXERR(Debug::KBMAP, "Parse error at position " << res << " in key sequence '" << seq << "'."); return res == string::npos ? 0 : res;...
false
false
false
false
false
0
evhttp_error_cb(struct bufferevent *bufev, short what, void *arg) { struct evhttp_connection *evcon = arg; struct evhttp_request *req = TAILQ_FIRST(&evcon->requests); if (evcon->fd == -1) evcon->fd = bufferevent_getfd(bufev); switch (evcon->state) { case EVCON_CONNECTING: if (what & BEV_EVENT_TIMEOUT) { e...
false
false
false
false
false
0
sdbout_field_types (tree type) { tree tail; for (tail = TYPE_FIELDS (type); tail; tail = TREE_CHAIN (tail)) /* This condition should match the one for emitting the actual members below. */ if (TREE_CODE (tail) == FIELD_DECL && DECL_NAME (tail) && DECL_SIZE (tail) && host_integerp (DECL_SIZE (tai...
false
false
false
false
false
0
mark_all_read_cb(GtkAction *action, gpointer data) { FolderView *folderview = (FolderView *)data; FolderItem *item; AlertValue val; item = folderview_get_selected_item(folderview); if (item == NULL) return; if (folderview->summaryview->folder_item != item && prefs_common.ask_mark_all_read) { val = alertp...
false
false
false
false
false
0
_parse_jobid_stepid(char *jobid_str) { char *ptr, *job, *step; long jobid, stepid; verbose("jobid/stepid string = %s\n", jobid_str); job = xstrdup(jobid_str); ptr = index(job, '.'); if (ptr == NULL) { error("Did not find a period in the step ID string"); _usage(); xfree(job); exit(error_exit); } else { ...
false
false
false
false
false
0
afr_trace_inodelk_out (call_frame_t *frame, afr_lock_call_type_t lock_call_type, afr_lock_op_type_t lk_op_type, struct gf_flock *flock, int op_ret, int op_errno, int32_t child_index) { xlator_t *this = NULL; afr_internal_lock_t *int_lock = NUL...
false
false
false
false
false
0
parse(private_pkcs7_signed_data_t *this, chunk_t content) { asn1_parser_t *parser; chunk_t object; int objectID, version; signerinfo_t *info = NULL; bool success = FALSE; parser = asn1_parser_create(signedDataObjects, content); parser->set_top_level(parser, 0); while (parser->iterate(parser, &objectID, &object...
false
false
false
true
false
1
find_best_colors(QuantizeObj *quantobj, int minR, int minG, int minB, int numcolors, int *colorlist,int *bestcolor) /* Find the closest colormap entry for each cell in the update box, given the list of candidate colors prepared by find_nearby_colors. Return the indexes of the closest entries in the bestcolor[] a...
false
false
false
false
false
0
_buf_realloc(ios_t *s, size_t sz) { char *temp; if ((s->buf==NULL || s->buf==&s->local[0]) && (sz <= IOS_INLSIZE)) { /* TODO: if we want to allow shrinking, see if the buffer shrank down to this size, in which case we need to copy. */ s->buf = &s->local[0]; s->maxsize = IOS_I...
false
false
false
false
false
0
snd_vt1724_ac97_read(struct snd_ac97 *ac97, unsigned short reg) { struct snd_ice1712 *ice = ac97->private_data; unsigned char old_cmd; old_cmd = snd_vt1724_ac97_ready(ice); old_cmd &= ~VT1724_AC97_ID_MASK; old_cmd |= ac97->num; outb(reg, ICEMT1724(ice, AC97_INDEX)); outb(old_cmd | VT1724_AC97_READ, ICEMT1724(ic...
false
false
false
false
false
0
optimize(Reprog *pp) { Reinst *inst, *target; int size; Reprog *npp; Reclass *cl; int diff; /* * get rid of NOOP chains */ for(inst=pp->firstinst; inst->type!=END; inst++){ target = inst->u2.next; while(target->type == NOP) target = target->u2.next; inst->u2.next = target; } /* * The origina...
false
false
false
false
false
0
dumpSVG(Inkscape::SVGOStringStream& s, Geom::Point const &/*last*/) const { s << "A " << rx << " " << ry << " " << angle << " " << (large ? "1" : "0") << " " << (clockwise ? "0" : "1") << " " << p[Geom::X] << " " << p[Geom::Y] << " "; }
false
false
false
false
false
0
insert_phi_nodes_for (tree var, bitmap phi_insertion_points, bool update_p) { unsigned bb_index; edge e; gimple phi; basic_block bb; bitmap_iterator bi; struct def_blocks_d *def_map = find_def_blocks_for (var); /* Remove the blocks where we already have PHI nodes for VAR. */ bitmap_and_compl_into (phi...
false
false
false
false
false
0
DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO) { if (x != wxDefaultCoord) { GetParent()->ClientToScreen(&x, NULL); } if (y != wxDefaultCoord) { GetParent()->ClientToScreen(NULL, &y); ...
false
false
false
false
false
0
crypto_mod_get(struct crypto_alg *alg) { return try_module_get(alg->cra_module) ? crypto_alg_get(alg) : NULL; }
false
false
false
false
false
0
SaveState() { wxString strBaseConfigLocation = wxString(wxT("/DlgAdvPreferences/")); wxConfigBase* pConfig = wxConfigBase::Get(FALSE); wxASSERT(pConfig); if (!pConfig) return false; pConfig->SetPath(strBaseConfigLocation); pConfig->Write(wxT("CurrentPage"),m_Notebook->GetSelection());...
false
false
false
false
false
0
boinc_zip(int bZipType, const char* szFileZip, const char* szFileIn) { string strFileZip, strFileIn; strFileZip.assign(szFileZip); strFileIn.assign(szFileIn); ZipFileList tempvec; tempvec.push_back(strFileIn); return boinc_zip(bZipType, strFileZip, &tempvec); }
false
false
false
false
false
0
rtsx_write_phy_register(struct rtsx_chip *chip, u8 addr, u16 val) { int retval; bool finished = false; int i; u8 tmp; retval = rtsx_write_register(chip, PHYDATA0, 0xFF, (u8)val); if (retval) { rtsx_trace(chip); return retval; } retval = rtsx_write_register(chip, PHYDATA1, 0xFF, (u8)(val >> 8)); if (retval...
false
false
false
false
false
0
get_next_mipmap_dimensions(int *next_w, int *next_h, int curr_w, int curr_h) { if(curr_w == 1 || curr_h == 1) return(0); if(next_w) *next_w = curr_w >> 1; if(next_h) *next_h = curr_h >> 1; return(1); }
false
false
false
false
false
0
php_stream_get_record(php_stream *stream, size_t maxlen, size_t *returned_len, char *delim, size_t delim_len TSRMLS_DC) { char *ret_buf, /* returned buffer */ *found_delim = NULL; size_t buffered_len, tent_ret_len; /* tentative returned length */ int has_delim = delim_len > 0; if (maxlen == 0) { ret...
false
false
false
false
false
0
example_jpeg() { FILE *handle; char *jpeg; int size; CamImage image, image2; camLoadJPEG(&image, "resources/rover.jpg"); camSaveBMP(&image, "output/rover3.bmp"); camDeallocateImage(&image); camLoadJPEG2YUV(&image, "resources/rover.jpg"); camAllocateRGBImage(&image2, image...
false
false
false
false
true
1
refreshIntervalMarkers() { foreach(QwtPlotMarker *mrk, d_mrk) { mrk->detach(); delete mrk; } d_mrk.clear(); QRegExp wkoAuto("^(Peak *[0-9]*(s|min)|Entire workout|Find #[0-9]*) *\\([^)]*\\)$"); if (rideItem->ride()) { foreach(const RideFileInterval &interval, rideItem->ride()-...
false
false
false
false
false
0
netdev_tx_complete_err ( struct net_device *netdev, struct io_buffer *iobuf, int rc ) { /* Catch data corruption as early as possible */ list_check_contains_entry ( iobuf, &netdev->tx_queue, list ); /* Dequeue and free I/O buffer */ list_del ( &iobuf->list ); netdev_tx_err ( netdev, iobuf, rc ); }
false
false
false
false
false
0
generateObservationModelDistribution( const float &sensedRange, CPointPDFSOG &outPDF, const CBeaconMap *myBeaconMap, const CPoint3D &sensorPntOnRobot, const CPoint3D &centerPoint, const float &maxDistanceFromCenter) const { MRPT_START const CPointPDFSOG *beaconPos=NULL; if ( m_typePDF==pdfGauss ) { // Co...
false
false
false
false
false
0