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
setLayerTag(int layer, int tag) { if (!checkLayerIndex(layer)) return; model->setModelObjectTagById(layerIds[layer], tag); }
false
false
false
false
false
0
compareDictionaries(Dict *dictA, Dict *dictB) { const int length = dictA->getLength(); if (dictB->getLength() != length) return gFalse; /* Check that every key in dictA is contained in dictB. * Since keys are unique and we've already checked that dictA and dictB * contain the same number of entries, we...
false
false
false
false
false
0
R2Contains(const R2Box& box1, const R2Box& box2) { // Return whether box1 contains box2 if (box1.IsEmpty()) return FALSE; if (box2.IsEmpty()) return TRUE; if (RNIsLess(box2.XMin(), box1.XMin())) return FALSE; if (RNIsLess(box2.YMin(), box1.YMin())) return FALSE; if (RNIsGreater(box2.XMax(), box...
false
false
false
false
false
0
labelJustification(MSAlignment justification_) { if (justification_!=labelJustification()) { if (justification_==MSLeft||justification_==MSRight||justification_==MSCenter) { _labelJustification=justification_; computeSize(); } } }
false
false
false
false
false
0
set( const string &keyName, const string &value ) { MRPT_START string strToLookFor(keyName + string("=")); size_t idx = string::npos; for (deque<string>::iterator it=m_strings.begin();it!=m_strings.end();++it) { idx = it->find(strToLookFor); if (idx==0) { // Replace existing string: (*it) = strToLo...
false
false
false
false
false
0
drawSelected(int row_) { int cs=firstColumn(); int ce=lastColumn(); int fixedCols=fixedColumns(); int nCols=numColumns(); int yy=computeYCoord(row_); unsigned long bg=selectedRowBackground(); MSBoolean rowSelected=MSTrue; MSBoolean cellSelected=MSFalse; if (fixedCols>0) { int nToDraw; ...
false
false
false
false
false
0
ppp_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct ppp_file *pf = file->private_data; struct sk_buff *skb; ssize_t ret; if (!pf) return -ENXIO; ret = -ENOMEM; skb = alloc_skb(count + pf->hdrlen, GFP_KERNEL); if (!skb) goto out; skb_reserve(skb, pf->hdrlen); ret =...
false
false
false
false
false
0
conicalP_xlt1_hyperg_A(double mu, double tau, double x, gsl_sf_result * result) { double x2 = x*x; double err_amp = 1.0 + 1.0/(GSL_DBL_EPSILON + fabs(1.0-fabs(x))); double pre_val = M_SQRTPI / pow(0.5*sqrt(1-x2), mu); double pre_err = err_amp * GSL_DBL_EPSILON * (fabs(mu)+1.0) * fabs(pre_val) ; gsl_sf_result ...
false
false
false
false
false
0
autoload_func_info_dtor(autoload_func_info *alfi) { if (alfi->obj) { zval_ptr_dtor(&alfi->obj); } if (alfi->closure) { zval_ptr_dtor(&alfi->closure); } }
false
true
false
false
false
1
hexhex2nr(p) char_u *p; { if (!vim_isxdigit(p[0]) || !vim_isxdigit(p[1])) return -1; return (hex2nr(p[0]) << 4) + hex2nr(p[1]); }
false
false
false
false
false
0
sanity_check2(TERMTYPE *tp, bool literal) { if (!PRESENT(exit_attribute_mode)) { #ifdef __UNUSED__ /* this casts too wide a net */ bool terminal_entry = !strchr(tp->term_names, '+'); if (terminal_entry && (PRESENT(set_attributes) || PRESENT(enter_standout_mode) || PRESENT(enter_underline_mode) ...
false
false
false
false
false
0
session_process_counters(struct session *s) { unsigned long long bytes; if (s->req) { bytes = s->req->total - s->logs.bytes_in; s->logs.bytes_in = s->req->total; if (bytes) { s->fe->counters.bytes_in += bytes; if (s->be != s->fe) s->be->counters.bytes_in += bytes; if (s->srv) s->srv->coun...
false
false
false
false
false
0
PrintLn(v8::Local<v8::Value> value) { v8::Local<v8::String> s = value->ToString(); ScopedVector<char> data(s->Length() + 1); if (data.start() == NULL) { V8::FatalProcessOutOfMemory("PrintLn"); return; } s->WriteAscii(data.start()); PrintF("%s\n", data.start()); }
false
false
false
false
false
0
p7_profile_Compare(P7_PROFILE *gm1, P7_PROFILE *gm2, float tol) { int x; if (gm1->mode != gm2->mode) return eslFAIL; if (gm1->M != gm2->M) return eslFAIL; if (esl_vec_FCompare(gm1->tsc, gm2->tsc, gm1->M*p7P_NTRANS, tol) != eslOK) return eslFAIL; for (x = 0; x < gm1->abc->Kp; x++) if (esl_...
false
false
false
false
false
0
get_cff_string(unsigned char *dst, const cff_data_t *o, unsigned p, unsigned len) { if (p + len > o->length) return_error(e_rangecheck); /* out of range access */ while (len) { unsigned chunk_len = o->mask + 1 - (p & o->mask); unsigned char *pos = o->blk_ref[p >> o->shift].value.bytes + ...
false
false
false
false
false
0
changeHcap(But *but) { CliMatch *m = but_packet(but); char hcapStr[3]; assert(MAGIC(m)); if (newHcap(m->hcapIn, butTextin_get(m->hcapIn)) & BUTOUT_ERR) return(BUTOUT_ERR); if (but == m->hcapUp) { ++m->hcap; if (m->hcap == 1) m->hcap = 2; if (m->hcap > 9) m->hcap = 9; } else ...
true
true
false
false
false
1
ahd_reset_current_bus(struct ahd_softc *ahd) { uint8_t scsiseq; AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK); ahd_outb(ahd, SIMODE1, ahd_inb(ahd, SIMODE1) & ~ENSCSIRST); scsiseq = ahd_inb(ahd, SCSISEQ0) & ~(ENSELO|ENARBO|SCSIRSTO); ahd_outb(ahd, SCSISEQ0, scsiseq | SCSIRSTO); ahd_flush_device_writ...
false
false
false
false
false
0
cavan_input_device_probe(struct cavan_event_device *event_dev, void *data) { int ret; int fd = event_dev->fd; uint8_t key_bitmask[KEY_BITMASK_SIZE]; uint8_t abs_bitmask[ABS_BITMASK_SIZE]; uint8_t rel_bitmask[REL_BITMASK_SIZE]; struct cavan_input_device *dev, *head, *tail; ret = cavan_event_get_abs_bitmask(fd, a...
false
false
false
false
false
0
AssertionNewList(Tcl_Interp *interp, Tcl_Obj *aObj) { Tcl_Obj **ov; int oc; XOTclTclObjList *last = NULL; if (Tcl_ListObjGetElements(interp, aObj, &oc, &ov) == TCL_OK) { if (oc > 0) { int i; for (i=oc-1; i>=0; i--) { TclObjListNewElement(&last, ov[i]); } } } return last; }
false
false
false
false
false
0
brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success) { struct ethhdr *eh; u16 type; eh = (struct ethhdr *)(txp->data); type = ntohs(eh->h_proto); if (type == ETH_P_PAE) { atomic_dec(&ifp->pend_8021x_cnt); if (waitqueue_active(&ifp->pend_8021x_wait)) wake_up(&ifp->pend_8021x_wait); } ...
false
false
false
false
false
0
init_ui (gint *argc, gchar **argv[]) { GtkWidget *about_dialog; GdkPixbuf *icon_pixbuf; GtkWidget *hpaned; GtkWidget *vpaned; gint window_width, window_height; gint position; GError *error = NULL; gtk_init (argc, argv); ...
false
false
false
false
false
0
apple2_event (Display *dpy, Window window, void *closure, XEvent *event) { struct state *st = (struct state *) closure; if (st->sim && st->controller == terminal_controller && event->xany.type == KeyPress) { terminal_keypress_handler (dpy, event, st->sim->controller_data); return True; } r...
false
false
false
false
false
0
vfs_conf(Vfs_conf *conf) { Vfs_conf *c; if (conf == NULL) { c = ALLOC(Vfs_conf); *c = vfs_conf_current; } else { Ds ds; vfs_conf_current.append_flag = conf->append_flag; vfs_conf_current.create_flag = conf->create_flag; vfs_conf_current.delete_flag = conf->delete_flag; vfs_conf_current.lock_flag = conf...
false
false
false
false
false
0
FLAC__metadata_iterator_set_block(FLAC__Metadata_Iterator *iterator, FLAC__StreamMetadata *block) { FLAC__ASSERT(0 != iterator); FLAC__ASSERT(0 != block); return FLAC__metadata_iterator_delete_block(iterator, false) && FLAC__metadata_iterator_insert_block_after(iterator, block); }
false
false
false
false
false
0
Info() { std::map< std::string, std::string > info; char *hostname; hostname = xgethostname (); info["hostname"] = hostname; info["username"] = getlogin(); return info; }
false
false
false
false
false
0
LowerINSERT_VECTOR(SDValue Op, SelectionDAG &DAG) const { EVT VT = Op.getValueType(); int VTN = VT.isVector() ? VT.getVectorNumElements() : 1; SDLoc dl(Op); SDValue Vec = Op.getOperand(0); SDValue Val = Op.getOperand(1); SDValue Idx = Op.getOperand(2); EVT VecVT =...
false
false
false
false
false
0
FormatApplicationName(RESULT* result ) { wxString strBuffer = wxEmptyString; CMainDocument* pDoc = wxGetApp().GetDocument(); RESULT* state_result = NULL; wxString strAppBuffer = wxEmptyString; wxString strClassBuffer = wxEmptyString; wxASSERT(pDoc); wxASSERT(wxDynam...
false
false
false
false
false
0
insertfirstsuffixes(Mergertrierep *trierep, unsigned long *nextpostable, Suffixarray *suffixarraytable, unsigned int numofindexes, GtError *err) { unsigned int idx; unsigned long suftabvalue; ...
false
false
false
false
false
0
draw_select_array(ivl_expr_t sube, ivl_expr_t bit_idx, unsigned bit_width, unsigned wid) { unsigned idx, label; ivl_signal_t sig = ivl_expr_signal(sube); /* unsigned sig_wid = ivl_expr_width(sube); */ ivl_expr_t ix = ivl_expr_oper1(sube); struct vector_info shiv; ...
false
false
false
false
false
0
chunk_size_show(struct mddev *mddev, char *page) { if (mddev->reshape_position != MaxSector && mddev->chunk_sectors != mddev->new_chunk_sectors) return sprintf(page, "%d (%d)\n", mddev->new_chunk_sectors << 9, mddev->chunk_sectors << 9); return sprintf(page, "%d\n", mddev->chunk_sectors << ...
false
false
false
false
false
0
amitk_roi_get_center_of_mass (AmitkRoi * roi) { g_return_val_if_fail(AMITK_IS_ROI(roi), zero_point); g_return_val_if_fail((AMITK_ROI_TYPE_ISOCONTOUR(roi) || AMITK_ROI_TYPE_FREEHAND(roi)), zero_point); if (!roi->center_of_mass_calculated) { switch(AMITK_ROI_TYPE(roi)) { case AMITK_ROI_TYPE_ISOCONTOUR_2D:...
false
false
false
false
false
0
listblock(Paragraph *top, int trim, MMIOT *f) { ParagraphRoot d = { 0, 0 }; Paragraph *p; Line *q = top->text, *text, *label; int isdl = (top->typ == DL), para = 0, ltype; while (( text = q )) { if ( top->typ == DL ) { Line *lp; for ( lp = label = text; lp ; lp = lp->next ) { text =...
false
false
false
false
false
0
_dxf_FlattenHierarchy ( Object in ) { CompositeField out = NULL; int position = 0; if ( DXGetObjectClass ( in ) == CLASS_FIELD ) return in; else { if ( ( NULL == ( out = DXNewCompositeField () ) ) || !_flatten_hierarchy ( in, out, &position ) ) ...
false
false
false
false
false
0
oc_state_frag_recon_mmx(const oc_theora_state *_state,ptrdiff_t _fragi, int _pli,ogg_int16_t _dct_coeffs[64],int _last_zzi,ogg_uint16_t _dc_quant){ unsigned char *dst; ptrdiff_t frag_buf_off; int ystride; int mb_mode; /*Apply the inverse transform.*/ /*Special case only having a ...
false
false
false
false
false
0
GetExternalElement(uint32_t index) { // Get element works for both JSObject and JSArray since // JSArray::length cannot change. switch (GetElementsKind()) { case PIXEL_ELEMENTS: { PixelArray* pixels = PixelArray::cast(elements()); if (index < static_cast<uint32_t>(pixels->length())) { uint...
false
false
false
false
false
0
draw(Canvas* c, const Allocation& a) const { if (c != nil) { if (marked_ && underlay_ != nil) { do_draw( c, underlay_, left_, right_, x1_, y1_, y1_ + h1_, x2_, y2_, y2_ + h2_ ); } } MonoGlyph::draw(c, a); if (c != nil) { if ...
false
false
false
false
false
0
widget_set_tooltip(struct tooltip *new_tooltip, SDL_Rect *widget_rect) { if (!new_tooltip || !widget_rect) { tooltip_info.value = NULL; return; } if ((new_tooltip->get_text && new_tooltip->get_text()) || new_tooltip->text) { tooltip_info.value = new_tooltip; tooltip_info.widget_rect = *widget_rect; } else ...
false
false
false
false
false
0
preprocess_expression(PlannerInfo *root, Node *expr, int kind) { /* * Fall out quickly if expression is empty. This occurs often enough to * be worth checking. Note that null->null is the correct conversion for * implicit-AND result format, too. */ if (expr == NULL) return NULL; /* * If the query has ...
false
false
false
false
false
0
fsGoUpDirTreeCbk(GtkButton *button, gpointer data) { int count; bool done; char* newCurrentDir; /* do nothing if already at root */ if(GBLfsCurrentDir[0] == '/' && GBLfsCurrentDir[1] == '\0') return; /* need to allocate a new string because changeFsDirectory() uses it * to...
false
true
false
false
false
1
uprv_uca_unsafeCPAddCCNZ(tempUCATable *t, UErrorCode *status) { UChar c; uint16_t fcd; // Hi byte is lead combining class. lo byte is trailing combing class. UBool buildCMTable = (t->cmLookup==NULL); // flag for building combining class table UChar *cm=NULL; uint16_t inde...
false
false
false
false
false
0
bgav_audio_parser_get_packet_parse_frame(void * parser1) { bgav_packet_t * ret; bgav_audio_parser_t * parser = parser1; if(parser->out_packet) { ret = parser->out_packet; parser->out_packet = NULL; return ret; } ret = parser->src.get_func(parser->src.data); if(!ret) return NULL; i...
false
false
false
false
false
0
ensureAvailable() { QString storeId = this->storeId(); QString entryId = id(); KeyStoreEntryContext *c = (KeyStoreEntryContext *)qVariantValue<void*>(trackercall("entry", QVariantList() << storeId << entryId)); if(c) change(c); return isAvailable(); }
false
false
false
false
false
0
bm_describe_track_value(BuzzMachineHandle *bmh,int const param,int const value) { static const char *empty=""; if(!(param<bmh->machine_info->numTrackParameters)) return(empty); //DBG2("(param=%d,value=%d)\n",param,value); return(bmh->bm->machine_iface->DescribeValue(bmh->machine_info->numGlobalP...
false
false
false
false
false
0
reset(void) { opening.resize(0); closing.resize(0); state=hidden; }
false
false
false
false
false
0
xfrm_acquire_print(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) { FILE *fp = (FILE*)arg; struct xfrm_user_acquire *xacq = NLMSG_DATA(n); int len = n->nlmsg_len; struct rtattr * tb[XFRMA_MAX+1]; __u16 family; len -= NLMSG_LENGTH(sizeof(*xacq)); if (len < 0) { fprintf(stderr, "BUG: wro...
false
false
false
false
false
0
ensGvdatabaseadaptorTrace(const EnsPGvdatabaseadaptor gvdba, ajuint level) { AjPStr indent = NULL; if (!gvdba) return ajFalse; indent = ajStrNew(); ajStrAppendCountK(&indent, ' ', level * 2); ajDebug("%SensGvdatabaseadaptorTrace %p\n" "%S Dat...
false
false
false
false
false
0
cqueue_list_find_all_matching_references(const lList *this_list, lList **answer_list, const char *cqueue_pattern, lList **qref_list) { bool ret = true; DENTER(CQUEUE_LAYER, "cqueue_list_find...
false
false
false
false
false
0
bytecode_disassemble(struct vm_class *vmc, const unsigned char *code, unsigned long size) { unsigned long pc; bytecode_for_each_insn(code, size, pc) { char *opc_name; int size; int _pc; size = bc_insn_size(code, pc); trace_printf(" [ %-3ld ] 0x%02x ", pc, code[pc]); opc_name = bc_get_insn_nam...
false
false
false
false
false
0
main (int argc, char** argv) { puts ("Controls: Arrow keys switch between plugins, TAB toggles fullscreen, ESC quits."); puts (" Each plugin can has its own mouse/key bindings, too."); if (argc > 1) { v.plugin = argv[1]; } else { puts ("Note: you can give your favourite libvisual plugin as command line...
false
false
false
false
false
0
rcu_eqs_enter(bool user) { long long oldval; struct rcu_dynticks *rdtp; rdtp = this_cpu_ptr(&rcu_dynticks); oldval = rdtp->dynticks_nesting; WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) && (oldval & DYNTICK_TASK_NEST_MASK) == 0); if ((oldval & DYNTICK_TASK_NEST_MASK) == DYNTICK_TASK_NEST_VALUE) { rdtp-...
false
false
false
false
false
0
cert_cache_create() { private_cert_cache_t *this; int i; INIT(this, .public = { .set = { .create_cert_enumerator = _create_enumerator, .create_private_enumerator = (void*)return_null, .create_shared_enumerator = (void*)return_null, .create_cdp_enumerator = (void*)return_null, .cache_cert = ...
false
false
false
false
false
0
_shmem_broadcast(void *target, const void *source, size_t nbytes, int PE_root, int PE_start, int logPE_stride, int PE_size, ...
false
false
false
false
false
0
showcnt( int cnt ) #else static void showcnt(cnt) int cnt; #endif { char str[80]; int i; Abool found = FALSE; #define CNT (cnt-CNTMIN) if (cnt < CNTMIN || cnt > CNTMAX) { sprintf(str, "Container number out of range. Between %ld and %ld, please.", (unsigned long) CNTMIN, (unsigned long) CNTMAX); ou...
false
false
false
false
false
0
atk_text_real_get_bounded_ranges (AtkText *text, AtkTextRectangle *rect, AtkCoordType coord_type, AtkTextClipType x_clip_type, AtkTextClipType y_clip_type) { gint boun...
false
false
false
false
false
0
stop (NMDHCPClient *client, gboolean release, const GByteArray *duid) { NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (client); /* Chain up to parent */ NM_DHCP_CLIENT_CLASS (nm_dhcp_dhclient_parent_class)->stop (client, release, duid); if (priv->conf_file) remove (priv->conf_file); if (priv->pid_...
false
false
false
false
false
0
send_packet2net(n2n_edge_t * eee, uint8_t *tap_pkt, size_t len) { ipstr_t ip_buf; n2n_mac_t destMac; n2n_common_t cmn; n2n_PACKET_t pkt; uint8_t pktbuf[N2N_PKT_BUF_SIZE]; size_t idx=0; size_t tx_transop_idx=0; ether_hdr_t eh; /* tap_pkt is not aligned ...
false
false
false
false
false
0
GMT_is_a_blank_line (char *line) { /* Returns TRUE if we should skip this line (because it is blank or has comments) */ GMT_LONG i = 0; if (line[i] == '#' && GMT_io.EOF_flag[GMT_IN] != '#') return (TRUE); /* Comment */ while (line[i] && (line[i] == ' ' || line[i] == '\t')) i++; /* Wind past leading whitespace */ i...
false
false
false
false
false
0
pedump_assembly_search_hook (MonoAssemblyName *aname, gpointer user_data) { GList *tmp; for (tmp = loaded_assemblies; tmp; tmp = tmp->next) { MonoAssembly *ass = tmp->data; if (mono_assembly_names_equal (aname, &ass->aname)) return ass; } return NULL;...
false
false
false
false
false
0
initMemory(FileInfo *file) { /* Set up memory mapping */ MemInfo *mi = &file->minfo; mi->data = 0; mi->size = 0; mi->relPos = 0; mi->filePos = file->skip; /* Skip over bytes at start of file */ if (!grabMemChunk(file)){ return 0; } return mi->data + mi->relPos; }
false
false
false
false
false
0
__pyx_pf_13pybloomfilter_11BloomFilter_10sync(struct __pyx_obj_13pybloomfilter_BloomFilter *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_R...
false
false
false
false
false
0
read32(FILE *input, uint32_t * ret) { union { uint32_t v; char bytes[4]; } u; size_t l = fread(u.bytes,sizeof(char),4,input); if( l != 4 || feof(input) ) return false; *ret = bswap_32(u.v); return true; }
false
false
false
false
false
0
validIdentifier(String *s) { char *c = Char(s); const char *c0 = c; const char *c1 = c0 + 1; while (*c) { if (*c == '`' && c == c0) { c++; continue; } if ((*c == '+' || *c == '-' || *c == '*' || *c == '/') && c == c1) { c++; continue; } if (!(isalnum(*c) || (*c == '_'))...
false
false
false
false
false
0
cache_check_change(const char *path) { const char *data; Eina_Bool changed = EINA_TRUE; Eina_File *f; f = eina_file_open(path, EINA_FALSE); if (!f) return EINA_TRUE; if (eina_file_size_get(f) < 1) return EINA_TRUE; data = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (*data == 'n') cha...
false
false
false
false
false
0
slcan_init(void) { int status; if (maxdev < 4) maxdev = 4; /* Sanity */ pr_info("slcan: serial line CAN interface driver\n"); pr_info("slcan: %d dynamic interface channels.\n", maxdev); slcan_devs = kzalloc(sizeof(struct net_device *)*maxdev, GFP_KERNEL); if (!slcan_devs) return -ENOMEM; /* Fill in our l...
false
false
false
false
false
0
option_list_delete(option_list_t* list) { option_list_t* temp; while (list) { temp = list; list = list->next; if (temp->destructor) temp->destructor(temp->object); free(temp); } }
false
false
false
false
false
0
mdio_write(struct net_device *dev, int phyad, int regad, int data) { struct netdev_private *np = netdev_priv(dev); void __iomem *miiport = np->mem + MANAGEMENT; ulong miir; unsigned int mask; miir = m80x_send_cmd_to_phy(miiport, OP_WRITE, phyad, regad); /* write data */ mask = 0x8000; while (mask) { /* low ...
false
false
false
false
false
0
FDKaacEnc_deinterleaveInputBuffer(INT_PCM *pOutputSamples, INT_PCM *pInputSamples, INT nSamples, INT nChannels) { INT k; /* deinterlave input samples and write to output buffer */ for (k=0; k...
false
false
false
false
false
0
build_input_slot(const stp_vars_t *v, const char *name) { stp_mxml_node_t *node, *n1; stp_mxml_node_t *doc = get_slots_xml(v); input_slot_t *answer; if (!doc) return NULL; node = stp_mxmlFindElement(doc, doc, "slot", "name", name, STP_MXML_DESCEND); if (!node) return NULL; answer = stp_zalloc(size...
false
false
false
false
false
0
base_getstackinfos(HSQUIRRELVM v) { SQInteger level; SQStackInfos si; SQInteger seq = 0; const SQChar *name = NULL; sq_getinteger(v, -1, &level); if (SQ_SUCCEEDED(sq_stackinfos(v, level, &si))) { const SQChar *fn = _SC("unknown"); const SQChar *src = _SC("unknown"); if(si.funcname)fn = si.funcname; if(si...
false
false
false
false
false
0
mp_irqdomain_get_attr(u32 gsi, struct mp_chip_data *data, struct irq_alloc_info *info) { if (info && info->ioapic_valid) { data->trigger = info->ioapic_trigger; data->polarity = info->ioapic_polarity; } else if (acpi_get_override_irq(gsi, &data->trigger, &data->polarity) < 0) { /* PCI interrupts are...
false
false
false
false
false
0
release_edges(graph *g){ edge *e = g->edges; while(e){ edge *next=e->next; release_intersection_list(e); e->next=edge_pool; edge_pool=e; e=next; } g->edges=0; g->num_edges=0; g->num_edges_active=0; }
false
false
false
false
false
0
hdhomerun_device_selector_find_device(struct hdhomerun_device_selector_t *hds, uint32_t device_id, unsigned int tuner_index) { size_t index; for (index = 0; index < hds->hd_count; index++) { struct hdhomerun_device_t *entry = hds->hd_list[index]; if (hdhomerun_device_get_device_id(entry) != device_id) { contin...
false
false
false
false
false
0
datatypestr(int datatype) { static char str[20]; str[0] = 0; sprintf(str, "%d bit packed", datatype); if ( datatype == DATATYPE_PACK ) return ("P0"); else if ( datatype > 0 && datatype <= 32 ) return (str); else if ( datatype == DATATYPE_CPX32 ) return ("C32"); else if ( datatype == DATATYPE_CPX...
false
false
false
false
false
0
get_sdma_base_addr(struct cik_sdma_rlc_registers *m) { uint32_t retval; retval = m->sdma_engine_id * SDMA1_REGISTER_OFFSET + m->sdma_queue_id * KFD_CIK_SDMA_QUEUE_OFFSET; pr_debug("kfd: sdma base address: 0x%x\n", retval); return retval; }
false
false
false
false
false
0
__ecereNameSpace__ecere__com__Double_OnSerialize(struct __ecereNameSpace__ecere__com__Class * _class, double * data, struct __ecereNameSpace__ecere__com__Instance * channel) { unsigned char bytes[8]; (bytes)[0] = (unsigned char)(((*(uint64 *)data) >> 56) & 0xFF); (bytes)[1] = (unsigned char)(((*(uint64 *)data) >> 48) ...
false
false
false
false
false
0
AssignData( wxPGChoicesData* data ) { Free(); if ( data != wxPGChoicesEmptyData ) { m_data = data; data->m_refCount++; } }
false
false
false
false
false
0
lra_create_live_ranges (bool all_p) { basic_block bb; int i, hard_regno, max_regno = max_reg_num (); int curr_point; bool have_referenced_pseudos = false; timevar_push (TV_LRA_CREATE_LIVE_RANGES); complete_info_p = all_p; if (lra_dump_file != NULL) fprintf (lra_dump_file, "\n********** Pseudo ...
false
false
false
false
false
0
gtk_sheet_attach (GtkSheet *sheet, GtkWidget *widget, gint row, gint col, gint xoptions, gint yoptions, gint xpadding, gint ypadding) { GdkRectangle area; GtkS...
false
false
false
false
false
0
get_file_uri_without_extension(const Glib::ustring& uri) { if(uri.empty()) return uri; Glib::RefPtr<Gio::File> file = Gio::File::create_for_uri(uri); if(!file) return uri; //Actually an error. const Glib::ustring filename_part = file->get_basename(); const Glib::ustring::size_type pos_dot = filenam...
false
false
false
false
false
0
checkUnknownPattern() { static std::set<std::string> knownPatterns; if (knownPatterns.empty()) { knownPatterns.insert("%any%"); knownPatterns.insert("%var%"); knownPatterns.insert("%type%"); knownPatterns.insert("%num%"); knownPatterns.insert("%bool%"); knownPatte...
false
false
false
false
false
0
utest_tmpfile_named(void) { char msg[] = "tmpfile_named unit test failed"; char tmpfile[32] = "esltmpXXXXXX"; FILE *fp = NULL; char buf[256]; if (esl_tmpfile_named(tmpfile, &fp) != eslOK) esl_fatal(msg); fprintf(fp, "Unit test.\n"); fclose(fp); if ((fp = fopen(tmpfile, "r")) == N...
true
true
true
false
true
1
putRV(RegisterValue rv) { getReplaced()->putRV(rv); if(m_pfnIsBreak(rv.data, break_mask, break_value)) invokeAction(); }
false
false
false
false
false
0
pm_generic_runtime_suspend(struct device *dev) { const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; int ret; ret = pm && pm->runtime_suspend ? pm->runtime_suspend(dev) : 0; return ret; }
false
false
false
false
false
0
__find_call_rel_cbs(struct net_t *np, int32 i1) { register struct dcevnt_t *dcep; register struct cbrec_t *cbp; for (dcep = np->dcelst; dcep != NULL; dcep = dcep->dcenxt) { if (dcep->dce_typ == DCE_RNG_CBR) { if (i1 != -1 && (i1 < dcep->dci2.i || i1 > dcep->dci1)) { if (__num_vpi_rel_cbs == 1) ...
false
false
false
false
false
0
afr_sh_entry_impunge_xattrop_cbk (call_frame_t *impunge_frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, dict_t *xattr) { afr_private_t *priv = NULL; afr_local_t *impunge_loc...
false
false
false
false
false
0
ParseUnaryExpression(bool* ok) { // UnaryExpression :: // PostfixExpression // 'delete' UnaryExpression // 'void' UnaryExpression // 'typeof' UnaryExpression // '++' UnaryExpression // '--' UnaryExpression // '+' UnaryExpression // '-' UnaryExpression // '~' UnaryExpression // ...
false
false
false
false
false
0
zrtp_getMultiStrParams(ZrtpContext* zrtpContext, int32_t *length) { std::string ret; *length = 0; if (zrtpContext && zrtpContext->zrtpEngine) ret = zrtpContext->zrtpEngine->getMultiStrParams(&zrtpContext->zrtpMaster); else return NULL; if (ret.size() == 0) return NULL; ...
false
false
false
false
false
0
write_all(int fd, const void *buf, int nr_bytes) { int block, offset = 0; char *buffer = (char *) buf; while (nr_bytes > 0) { block = write(fd, &buffer[offset], nr_bytes); if (block < 0) { if (errno == EINTR) continue; return block; } if (block == 0) return offset; offset += block; nr_byt...
false
false
false
false
false
0
odls_default_child_died(orte_proc_t *child) { time_t end; pid_t ret; /* Because of rounding in time (which returns whole seconds) we * have to add 1 to our wait number: this means that we wait * somewhere between (target) and (target)+1 seconds. Otherwise, * the default 1s actually ...
false
false
false
false
true
1
hasSOPclassUID(const char *uid) const { const char *str = getSOPclassUID(); return (str != NULL) && (strcmp(str, uid) == 0); }
false
false
false
false
false
0
finalize_panel_subset (DATASET *subset) { int pdp = subset->pd; int den = 10.0; while ((pdp = pdp / 10)) { den *= 10; } subset->sd0 = 1.0 + 1.0 / den; ntodate(subset->stobs, 0, subset); ntodate(subset->endobs, subset->n - 1, subset); }
false
false
false
false
false
0
gst_dc1394_src_fixate (GstPad * pad, GstCaps * caps) { GstDc1394 *src = GST_DC1394 (gst_pad_get_parent (pad)); GstStructure *structure; int i; GST_LOG_OBJECT (src, " fixating caps to closest to 320x240 , 30 fps"); for (i = 0; i < gst_caps_get_size (caps); ++i) { structure = gst_caps_get_structure (caps...
false
false
false
false
false
0
canHandleResponse(const WorkQueue::Response* res, const WorkQueue* srcQ) { const WorkQueue::Request* req = res->getRequest(); if(req->getType()==WORKQUEUE_DERIVED_DATA_REQUEST) { DerivedDataRequest ddreq = any_cast<DerivedDataRequest>(req->getData()); // only deal with ow...
false
false
false
false
false
0
__Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unico...
false
false
false
false
false
0
slPaintLevel() { // Repaint the thumbnail sketch of the level whenever the level changes. if (slGameIndex < 0) { return; // Owner has no games. } // Fetch level-data and save layout, name and label in the thumbnail. QString dir = (myGameList.at (slGameIndex)->owner == USER) ? ...
false
false
false
false
false
0
screenGeometryChanged(int) { int i; // first iterate over all the new and old ones to set sizes appropriately for (i = 0; i < m_desktop->screenCount(); i++) { if (i < m_windows.count()) { m_windows[i]->setGeometry(m_desktop->availableGeometry(i)); } else { Spl...
false
false
false
false
false
0
couldNotLoadDictionary ( const char * szLang ) { XAP_App * pApp = XAP_App::getApp (); XAP_Frame * pFrame = pApp->getLastFocussedFrame (); char szLangName[255]; UT_Language lang; UT_uint32 id = lang.getIndxFromCode(szLang); const gchar* pLang = lang.getNthLangName(id); sprintf(szL...
false
false
false
false
false
0
WebPRescalerExportRowC(WebPRescaler* const wrk, int x_out) { if (wrk->y_accum <= 0) { uint8_t* const dst = wrk->dst; int32_t* const irow = wrk->irow; const int32_t* const frow = wrk->frow; const int yscale = wrk->fy_scale * (-wrk->y_accum); const int x_out_max = wrk->dst_width * wrk->num_channels;...
false
false
false
false
false
0
Dacc_modulate_rgb_set_alpha( GenefxState *gfxs ) { int w = gfxs->length; GenefxAccumulator *D = gfxs->Dacc; GenefxAccumulator Cacc = gfxs->Cacc; int a = gfxs->color.a; while (w--) { if (!(D->RGB.a & 0xF000)) { D->RGB.a = a; ...
false
false
false
false
false
0
_slurm_rpc_complete_job_allocation(slurm_msg_t * msg) { static int active_rpc_cnt = 0; int error_code = SLURM_SUCCESS; DEF_TIMERS; complete_job_allocation_msg_t *comp_msg = (complete_job_allocation_msg_t *) msg->data; /* Locks: Write job, write node */ slurmctld_lock_t job_write_lock = { NO_LOCK, WRITE_LOCK, ...
false
false
false
false
false
0