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
edd_dev_is_type(struct edd_device *edev, const char *type) { struct edd_info *info; if (!edev) return 0; info = edd_dev_get_info(edev); if (type && info) { if (!strncmp(info->params.host_bus_type, type, strlen(type)) || !strncmp(info->params.interface_type, type, strlen(type))) return 1; } return 0;...
false
false
false
false
false
0
ndi_resolve(LIST *nodelist) { struct ndi newnode; /* new list element */ struct ndi * p; /* current list element */ LIST * newnodelist; /* resolved node ID list */ int4 index; /* index counter */ /* * Initialize the new list. */ newnodelist = al_init(sizeof(struct ndi), 0); if (newnodelist == 0) return...
false
false
false
false
false
0
__xmknodat (int version, int dirfd,const char *path,mode_t mode,dev_t *dev) { int result; instw_t instw; /* If all we are doing is normal open, forgo refcounting, etc. */ if(dirfd == AT_FDCWD || *path == '/') { #if DEBUG debug(2, "__xmknod(%d, %s, 0%o, %p)\n", version, path, mode, dev); #...
false
false
false
false
false
0
elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill) { ELM_PHOTO_CHECK(obj); ELM_PHOTO_DATA_GET(obj, sd); elm_image_fill_outside_set(sd->icon, !fill); sd->fill_inside = !!fill; _sizing_eval(obj); }
false
false
false
false
false
0
PolySubst(string, class, new) /* returns pointer to a swapped about copy */ char *string; char class; char new; { char *ptr; static char area[STRINGSIZE]; ptr = area; while (*string) { *(ptr++) = (MatchClass(class, *string) ? new : *string); string++; } *ptr = '\0'; return (area); }
false
false
false
false
false
0
record_last_set_info (rtx dest, const_rtx setter ATTRIBUTE_UNUSED, void *data) { rtx last_set_insn = (rtx) data; if (GET_CODE (dest) == SUBREG) dest = SUBREG_REG (dest); if (REG_P (dest)) record_last_reg_set_info (last_set_insn, REGNO (dest)); else if (MEM_P (dest) /* Ignore pushes, they clobber n...
false
false
false
false
false
0
traverse_slots(PyTypeObject *type, PyObject *self, visitproc visit, void *arg) { Py_ssize_t i, n; PyMemberDef *mp; n = Py_SIZE(type); mp = PyHeapType_GET_MEMBERS((PyHeapTypeObject *)type); for (i = 0; i < n; i++, mp++) { if (mp->type == T_OBJECT_EX) { char *addr = (char *)self +...
false
false
false
false
false
0
pthread_join (pthread_t th, void **thread_return) { FUNCTION_NAME; EZTRACE_EVENT0(FUT_START_THREAD_JOIN); int ret = libpthread_join(th, thread_return); EZTRACE_EVENT3(FUT_STOP_THREAD_JOIN, th, thread_return, ret); return ret; }
false
false
false
false
false
0
orthogonalComplement(SymmetricComplex &complex)const { IntegerVectorList l; for(int i=0;i<indices.size();i++) l.push_back(complex.vertices[indices[i]]); FieldMatrix m=integerMatrixToFieldMatrix(rowsToIntegerMatrix(l,complex.n),Q); return fieldMatrixToIntegerMatrixPrimitive(m.reduceAndComputeKernel()).getRows(); ...
false
false
false
false
false
0
add_gradient( const CL_GLState &state, const CL_Quad &quad, const CL_Gradient &gradient) { set_state(state, CL_GRADIENT); add_quad_vertices( state, (double)quad.x1, (double)quad.y1, (double)quad.x2, (double)quad.y2, (double)quad.x3, (double)quad.y3, (double)quad.x4, (double)quad.y4 ); int a = primitive_count*16;...
false
false
false
false
false
0
unfreeze_partials(struct kmem_cache *s, struct kmem_cache_cpu *c) { #ifdef CONFIG_SLUB_CPU_PARTIAL struct kmem_cache_node *n = NULL, *n2 = NULL; struct page *page, *discard_page = NULL; while ((page = c->partial)) { struct page new; struct page old; c->partial = page->next; n2 = get_node(s, page_to_nid(...
false
false
false
true
false
1
_check_key_is_zero_filled (dict_t *d, char *k, data_t *v, void *tmp) { if (mem_0filled ((const char*)v->data, v->len)) { /* -1 means, no more iterations, treat as 'break' */ return -1; } return 0; }
false
false
false
false
false
0
nullp(Bnode p) { return (p->atom && str_ident(p->label,"nil")); }
false
false
false
false
false
0
LynxUnifyFigure( FigureUnify ) rdsfig_list *FigureUnify; { rdswindow *WindowRds; rdsrec_list *HeadEqui; rdsrec_list *ScanEqui; WindowRds = buildrdswindow( FigureUnify ); HeadEqui = equirdsfig( FigureUnify, WindowRds ); destroyrdswindow( FigureUnify, WindowRds ); unifyrdsfig( FigureUnify, HeadEqui )...
false
false
false
false
false
0
verify_object(const unsigned char *sha1, const char *expected_type) { int ret = -1; enum object_type type; unsigned long size; void *buffer = read_sha1_file(sha1, &type, &size); const unsigned char *repl = lookup_replace_object(sha1); if (buffer) { if (type == type_from_string(expected_type)) ret = check_sh...
false
false
false
false
false
0
configfile_init() { const gchar *search_dirs[3] = {"/etc",".",NULL}; if(key_file) return 2; key_file = g_key_file_new(); if(!g_key_file_load_from_dirs(key_file,CONFIG_FILE_NAME,search_dirs,NULL,0,NULL)) { g_key_file_free(key_file); key_file = NULL; return 3; } ...
false
false
false
false
false
0
merge_collapse(MergeState *ms) { struct s_slice *p = ms->pending; assert(ms); while (ms->n > 1) { Py_ssize_t n = ms->n - 2; if (n > 0 && p[n-1].len <= p[n].len + p[n+1].len) { if (p[n-1].len < p[n+1].len) --n; if (merge_at(ms, n) < 0) ...
false
false
false
false
false
0
open_xim() { XIMTriggerKeys triggerKeys; im_styles.supported_styles = Styles; im_styles.count_styles = sizeof(Styles)/sizeof(Styles[0]); triggerKeys.count_keys = sizeof(trigger_keys)/sizeof(trigger_keys[0]); triggerKeys.keylist = trigger_keys; encodings.count_encodings = sizeof(chEncodings)/sizeof(XIMEnc...
false
false
false
false
false
0
all_sounds_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan) { int n; if (! ops->note_terminate) return; for (n = 0; n < 128; n++) { if (chan->note[n]) { ops->note_terminate(drv, n, chan); chan->note[n] = 0; } } }
false
false
false
false
false
0
vlv_set_infoframes(struct drm_encoder *encoder, bool enable, const struct drm_display_mode *adjusted_mode) { struct drm_i915_private *dev_priv = encoder->dev->dev_private; struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder); struct intel_crtc *intel_crtc = to_intel_crtc(encoder->...
false
false
false
false
false
0
arg_blk_pass(NODE *node1, NODE *node2) { if (node2) { node2->nd_head = node1; return node2; } return node1; }
false
false
false
false
false
0
write_directory_structure(struct entry *entry, char *base, unsigned int offset) { int stack_entries = 0; int stack_size = 64; struct entry **entry_stack; entry_stack = malloc(stack_size * sizeof(struct entry *)); if (!entry_stack) { die(MKFS_ERROR, 1, "malloc failed"); } if (opt_verbose) { printf("root:\n"...
false
false
false
false
false
0
eb_set_endword(EB_Book *book, const char *input_word, char *word, char *canonicalized_word, EB_Word_Code *word_code) { EB_Error_Code error_code; const EB_Search *search; LOG(("in: eb_set_endword(book=%d, input_word=%s)", (int)book->code, eb_quoted_string(input_word))); /* * Make a fixed word...
false
false
false
false
false
0
identifyOpenType(Reader *reader) { FoFiIdentifierType type; Guint offset; int nTables, i; if (!reader->getU16BE(4, &nTables)) { return fofiIdUnknown; } for (i = 0; i < nTables; ++i) { if (reader->cmp(12 + i*16, "CFF ")) { if (reader->getU32BE(12 + i*16 + 8, &offset) && offset < (Guint)INT_...
false
false
false
false
false
0
RTMP_Connect(RTMP *r, RTMPPacket *cp) { struct sockaddr_in service; if (!r->Link.hostname.av_len) return FALSE; memset(&service, 0, sizeof(struct sockaddr_in)); service.sin_family = AF_INET; if (r->Link.socksport) { /* Connect via SOCKS */ if (!add_addr_info(&service, &r->Link.sockshost,...
false
false
false
false
false
0
free_fitem(Dt_t* d, fitem* p, Dtdisc_t* ds) { if (p->ti.str) free (p->ti.str); free (p); }
false
false
false
false
false
0
billterm_scrub_invoices (QofInstance * invoice_p, gpointer ht_p) { GHashTable *ht = ht_p; GncInvoice *invoice = GNC_INVOICE(invoice_p); GncBillTerm *term, *new_bt; gint32 count; term = gncInvoiceGetTerms(invoice); if (term) { if (billterm_is_grandchild(term)) { P...
false
false
false
false
false
0
boundingRect() const { if (m_viewID != ViewLayer::PCBView) { return PaletteItem::boundingRect(); } return shape().controlPointRect(); }
false
false
false
false
false
0
e_border_stack_below(E_Border *bd, E_Border *below) { /* TODO: Should stack below allow the border to change level */ E_Event_Border_Stack *ev; E_Border *last = NULL, *child; E_OBJECT_CHECK(bd); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); ecore_x_window_shadow_tree_flush(); if (...
false
false
false
false
false
0
egg_wrap_box_remove (GtkContainer *container, GtkWidget *widget) { EggWrapBox *box = EGG_WRAP_BOX (container); EggWrapBoxPrivate *priv = box->priv; GList *list; list = g_list_find_custom (priv->children, widget, (GCompareFunc)find_child_...
false
false
false
false
false
0
write_counterTables(fstream& tex, struct AllData& alldata) { /* * source data map is sorted by counter ID, then function ID * precondition: sorted by counterID !!! */ { /* separate into single maps, sorted by exclusive time */ sortedCtrMap_t currMap; uint64_t lastCtrID; ...
false
false
false
false
false
0
gameToIndex(int index) { if(index > size() || index < 0 || !contains(index)) { return -1; } if(index < size() / 2) { int count = 0; for(int i = 0; i < index; ++i) if(contains(i)) { ++count; } return count; } ...
false
false
false
false
false
0
daemon_main(void) { if (is_a_socket(STDIN_FILENO)) { int i; /* we are running via inetd - close off stdout and * stderr so that library functions (and getopt) don't * try to use them. Redirect them to /dev/null */ for (i = 1; i < 3; i++) { close(i); open("/dev/null", O_RDWR); } return start_dae...
false
false
false
false
true
1
AllocateByteArray(int length) { if (length < 0 || length > ByteArray::kMaxLength) { return Failure::OutOfMemoryException(); } int size = ByteArray::SizeFor(length); AllocationSpace space = (size > MaxObjectSizeInPagedSpace()) ? LO_SPACE : NEW_SPACE; Object* result = AllocateRaw(size, space, OLD_DATA...
false
false
false
false
false
0
checkString(char* str) { char* delim = (char*)"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; for(uint32_t i = 0; i < strlen(str); i++) { for(uint32_t y = 0; y < strlen(delim); y++) { if(str[i]==delim[y]) { return false; } } } return true; }
false
false
false
false
false
0
DBtype(dbfile) FILE **dbfile ; { char line[80]; char rc = '\0' ; rc = ERROR; while ((rc == ERROR) && fgets(line, sizeof(line), *dbfile) != NULL) { /* check if first entry has BL and MA lines */ if ((strncmp(line,"BL ", 5)) == 0) { rc = BLOCK_DB ; } else ...
false
false
false
false
false
0
cs5536_set_piomode(struct ata_port *ap, struct ata_device *adev) { static const u8 drv_timings[5] = { 0x98, 0x55, 0x32, 0x21, 0x20, }; static const u8 addr_timings[5] = { 0x2, 0x1, 0x0, 0x0, 0x0, }; static const u8 cmd_timings[5] = { 0x99, 0x92, 0x90, 0x22, 0x20, }; struct pci_dev *pdev = to_pci_dev(ap-...
false
false
false
false
false
0
scan_omp_parallel (gimple_stmt_iterator *gsi, omp_context *outer_ctx) { omp_context *ctx; tree name; gimple stmt = gsi_stmt (*gsi); /* Ignore parallel directives with empty bodies, unless there are copyin clauses. */ if (optimize > 0 && empty_body_p (gimple_omp_body (stmt)) && find_omp_clau...
false
false
false
false
false
0
getFields() { vector<MapCoordinate> fields = objectsRemovable; for ( map<MapCoordinate,vector<MineTypes> > ::iterator i = objectsCreatable.begin(); i != objectsCreatable.end(); ++i ) if ( find(fields.begin(), fields.end(), i->first) == fields.end() ) fields.push_back ( i->first ); return fie...
false
false
false
false
false
0
ds1343_show_tricklecharger(struct device *dev, struct device_attribute *attr, char *buf) { struct ds1343_priv *priv = dev_get_drvdata(dev); int data; char *diodes = "disabled", *resistors = " "; regmap_read(priv->map, DS1343_TRICKLE_REG, &data); if ((data & 0xf0) == DS1343_TRICKLE_MAGIC) { switch (data & 0...
false
true
false
false
false
1
sys_gethrtime(void) { struct timespec ts; long long result; if (clock_gettime(CLOCK_MONOTONIC,&ts) != 0) { print_error("Fatal, could not get clock_monotonic value, terminating! " "errno = %d\n", errno); exit(1); } result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ...
false
false
false
false
false
0
lirc_write(struct file *file, const char __user *buf, size_t n, loff_t *ppos) { int i, count; unsigned long flags; long delta = 0; int *wbuf; if (!(hardware[type].features & LIRC_CAN_SEND_PULSE)) return -EPERM; count = n / sizeof(int); if (n % sizeof(int) || count % 2 == 0) return -EINVAL; wbuf = memd...
false
false
false
false
false
0
console_interaction_ask_password (GTlsInteraction *interaction, GTlsPassword *password, GCancellable *cancellable, GError **error) { const gchar *value; gchar *prompt; ...
false
false
false
false
true
1
ttchk() { /* Check if input ready */ int x = 0; if (nonblock) { /* Try to read */ errno = 0; x = read(0,&tinbuf[tlast],TINBUFSIZ-tlast); #ifdef EXTRADEBUG fprintf(db,"ttchk read %d errno = %d\n",x,errno); #endif /* EXTRADEBUG */ #ifdef EWOULDBLOCK if (x < 0 && errno == EWOULDBLOCK) /* Nothing to read *...
false
false
false
false
false
0
session_data_cb (CamSL * sl, CamSLSession * session, guint8 * data, guint size) { CamALApplication *application; guint tag = 0; guint8 length_field_len; guint length; guint i; application = CAM_AL_APPLICATION (session->user_data); if (application == NULL) { GST_ERROR ("session is established but has ...
false
false
false
false
false
0
ufshcd_init_clk_gating(struct ufs_hba *hba) { if (!ufshcd_is_clkgating_allowed(hba)) return; hba->clk_gating.delay_ms = 150; INIT_DELAYED_WORK(&hba->clk_gating.gate_work, ufshcd_gate_work); INIT_WORK(&hba->clk_gating.ungate_work, ufshcd_ungate_work); hba->clk_gating.delay_attr.show = ufshcd_clkgate_delay_show;...
false
false
false
false
false
0
icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v) { struct icalvalue_impl* impl; icalerror_check_arg_rv( (value!=0),"value"); impl = (struct icalvalue_impl*)value; if(!icaltime_is_null_time(v.time)){ icalvalue_set_datetime((icalvalue*)impl,v.time); impl->kind = I...
false
false
false
false
false
0
pm_command_queue_start_thread (PmCommandQueue *queue) { queue->done_queue = g_async_queue_new (); queue->work_queue = g_async_queue_new (); queue->job_queue = g_queue_new (); queue->worker = g_thread_new ("am-project-worker", (GThreadFunc) pm_command_queue_thread_main_loop, queue); ...
false
false
false
false
false
0
NSC_DecryptDigestUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pEncryptedPart, CK_ULONG ulEncryptedPartLen, CK_BYTE_PTR pPart, CK_ULONG_PTR pulPartLen) { CK_RV crv; CHECK_FORK(); crv = NSC_DecryptUpdate(hSession,pEncryptedPart, ulEncryptedPartLen, pPart, pulPartLen); if (crv !=...
false
false
false
false
false
0
php_check_open_basedir_ex(const char *path, int warn TSRMLS_DC) { /* Only check when open_basedir is available */ if (PG(open_basedir) && *PG(open_basedir)) { char *pathbuf; char *ptr; char *end; /* Check if the path is too long so we can give a more useful error * message. */ if (strlen(path) > (MAXPATH...
false
false
false
false
false
0
lgdt3306a_check_neverlock_status(struct lgdt3306a_state *state) { u8 val = 0; int ret; enum lgdt3306a_neverlock_status lockStatus; ret = lgdt3306a_read_reg(state, 0x0080, &val); if (ret) return ret; lockStatus = (enum lgdt3306a_neverlock_status)(val & 0x03); dbg_info("NeverLock=%d", lockStatus); return loc...
false
false
false
false
false
0
sort_rows_by_nonzeroes(struct sortElement* array, int rowIndex, int maxRows, int whichTab) const { // Note: this function only takes into account rows which share at least // a nonzero column with the row that we want to reduce (rowIndex). int counter = 0; int numZeroCost = 0; for (int i = 0; i <...
false
false
false
false
false
0
drm_bufs_info(struct seq_file *m, void *data) { struct drm_info_node *node = (struct drm_info_node *) m->private; struct drm_device *dev = node->minor->dev; struct drm_device_dma *dma; int i, seg_pages; mutex_lock(&dev->struct_mutex); dma = dev->dma; if (!dma) { mutex_unlock(&dev->struct_mutex); return 0; ...
false
false
false
false
false
0
pcxhr_stop_pipes(struct pcxhr_mgr *mgr, int audio_mask) { struct pcxhr_rmh rmh; int err; int audio = 0; while (audio_mask) { if (audio_mask & 1) { pcxhr_init_rmh(&rmh, CMD_STOP_PIPE); if (audio < PCXHR_PIPE_STATE_CAPTURE_OFFSET) { /* stop playback pipe */ pcxhr_set_pipe_cmd_params(&rmh, 0, audio, 0...
false
false
false
false
false
0
quote(const std::string& x) { return std::string("'").append(x).append("'"); }
false
false
false
false
false
0
list_engines(const struct curl_slist *engines) { puts("Build-time engines:"); if(!engines) { puts(" <none>"); return; } for(; engines; engines = engines->next) printf(" %s\n", engines->data); }
false
false
false
false
false
0
e_layout_virtual_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) { E_Smart_Data *sd; if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (w) *w = sd->vw; if (h) *h = sd->vh; }
false
false
false
false
false
0
main(int argc, char** argv) { char* src_dir, *dst_dir; int fanout=0; std::string filename; char dst_path[MAXPATHLEN], src_path[MAXPATHLEN]; int retval; if ( (argc == 1) || !strcmp(argv[1], "-h") || !strcmp(argv[1],"--help") || (argc != 4) ) { fprintf(stderr, "%s", usage); e...
false
false
false
false
false
0
ario_audioscrobbler_perform (ArioAudioscrobbler *audioscrobbler, char *url, char *post_data, SoupSessionCallback response_handler) { ARIO_LOG_FUNCTION_START SoupMessage *msg; msg = soup_message_new (post_data...
false
false
false
false
false
0
HEpush(hdf_err_code_t error_code, const char *function_name, const char *file_name, intn line) { intn i; /* if the stack is not allocated, then do it */ if (!error_stack) { error_stack = (error_t *) HDmalloc((uint32) sizeof(error_t) * ERR_STACK_SZ); if (!error_stack) ...
false
false
false
false
false
0
slay_power(const object_type *o_ptr, int verbose, ang_file* log_file, bool known) { bitflag s_index[OF_SIZE], f[OF_SIZE], f2[OF_SIZE]; u32b sv = 0; int i, j; int mult; const struct slay *best_s_ptr = NULL; monster_race *r_ptr; monster_type *m_ptr; monster_type monster_type_body; const char *desc[SL_MAX] = { 0...
true
true
false
false
false
1
StartResize(XEvent *evp, TwmWindow *tmp_win, Bool fromtitlebar, Bool from3dborder) { Window junkRoot, grabwin; unsigned int junkbw, junkDepth; Cursor cursor; cursor = (Scr->BorderCursors && tmp_win->curcurs) ? tmp_win->curcurs : Scr->ResizeCursor; ResizeWindow = tmp_win->frame; if (! Sc...
false
false
false
false
false
0
isLastRunInBlock(fp_Run * pRun) const { if(((UT_sint32)pRun->getBlockOffset()+2) == getLength()) { return true; } return false; }
false
false
false
false
false
0
argcv_scan (int len, const char *command, const char *delim, int *start, int *end, int *save) { int i = *save; /* Skip initial whitespace */ while (i < len && isws (command[i])) i++; *start = i; switch (command[i]) { case '"': case '\'': while (++i < len && command[i] != command[*...
false
false
false
false
false
0
coda_file_splice_read(struct file *coda_file, loff_t *ppos, struct pipe_inode_info *pipe, size_t count, unsigned int flags) { ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); struct coda_file_info *cfi; struct file *host_file; cfi = CODA_FTO...
false
false
false
false
false
0
isprime(x) register long x; { static int quick[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 0 }; register int *ip; register long div; register long stop; /* hit the first few primes quickly to eliminate easy ones */ /* this incidentally prevents ridiculously small tables */ for (ip = quick; (div = *ip) != ...
false
false
false
false
false
0
expand(U pass,sSV* w,sFace* f,U e,sHorizon& horizon) { static const U i1m3[]={1,2,0}; static const U i2m3[]={2,0,1}; if(f->pass!=pass) { const U e1=i1m3[e]; if((btDot(f->n,w->w)-f->d)<-EPA_PLANE_EPS) { sFace* nf=newface(f->c[e1],f->c[e],w,false); if(nf) { bind(...
false
false
false
false
false
0
I_new_control_point(struct Control_Points *cp, double e1, double n1, double e2, double n2, int status) { int i; unsigned int size; if (status < 0) return 1; i = (cp->count)++; size = cp->count * sizeof(double); cp->e1 = (double *)G_realloc(cp->e1, size); cp->e2 = (double *)G_realloc(...
false
false
false
false
false
0
pg_results(void *userdata, const char *uri, const ne_prop_result_set *rset) { struct results *r = userdata; const char *value; const ne_status *status; int n; r->result = 0; for (n = 0; n < numprops; n++) { value = ne_propset_value(rset, &propnames[n]); status = ne_propset_status(rs...
false
false
false
false
false
0
erase(iterator begin, iterator end) BOOST_NOEXCEPT { while (begin != end) { m_pImpl->erase(begin++); } }
false
false
false
false
false
0
huffman_lookup(struct bit_read_struct *inp, int *tree) { int pos = 0; int bit; while (!(tree[pos] & HUFFMAN_LEAF)) { CALLC(bit = getbits(inp, 1)); if (DEBUG_DCL_INFLATE) fprintf(stderr,"[%d]:%d->", pos, bit); if (bit) pos = tree[pos] & ~(~0 << BRANCH_SHIFT); else pos = tree[pos] >> BRANCH_SHIFT; }...
false
false
false
false
false
0
tabKind(QWidget *widget) { QChar retval = 0; if (qobject_cast<ChatDlg*> (widget)) { retval = 'C'; } else if (qobject_cast<GCMainDlg*> (widget)) { retval = 'M'; } else { qDebug("Checking if widget should be tabbed: Unknown type"); } return retval; }
false
false
false
false
false
0
val_int() { DBUG_ASSERT(fixed == 1); String *a=args[0]->val_str(&value1); String *b=args[1]->val_str(&value2); if (!a || !b) { null_value=1; return 0; /* purecov: inspected */ } null_value=0; /* must be longlong to avoid truncation */ longlong start= 0; longlong start0= 0; my_match_t mat...
false
false
false
false
false
0
b_convert_block_dt(Stasche_lm_dt *sld) { int mt_num = sld->mt_num; int i; for (i = 1; i <= mt_num; i++) { b_convert_block_dt_block(sld->block[i], &(sld->bld[i])); } }
false
false
false
false
false
0
show_compute_matches_status(bool direct, GthShowVerbose showverbose, unsigned long gen_file_num, unsigned long num_of_gen_files, unsigned long ref_file_num, uns...
true
true
false
false
false
1
dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) { struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(cpu_dai); int ret = 0; switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: if (dev->capability & DW_I2S_SLAVE) ret = 0; else ret = -EINVAL; break; case SND_SOC_DAIFMT_C...
false
false
false
false
false
0
onCmdToggleEnabled(FXObject*,FXSelector,void*){ isEnabled() ? disable() : enable(); return 1; }
false
false
false
false
false
0
_e_winlist_cb_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Event_Mouse_Wheel *ev; int i; ev = event; if (ev->window != _input_window) return ECORE_CALLBACK_PASS_ON; e_bindings_wheel_event_handle(E_BINDING_CONTEXT_WINLIST, E_OBJECT(_winlist...
false
false
false
false
false
0
PyObject_Hash(PyObject *v) { PyTypeObject *tp = v->ob_type; if (tp->tp_hash != NULL) return (*tp->tp_hash)(v); /* To keep to the general practice that inheriting * solely from object in C code should work without * an explicit call to PyType_Ready, we implicitly call * PyType_Ready he...
false
false
false
false
false
0
gwa_update_properties_from_type (GladeWidgetAdaptor *adaptor, GType type, GList **properties, gboolean is_packing) { gpointer object_class = g_type_class_ref (type); GParamSpec **specs = NULL, *spec; guint i, n_spec...
false
false
false
false
false
0
fs_decimal_init_from_int64_offset(fs_decimal *d, int64_t i, int offset) { fs_decimal_init(d); unsigned long long val = llabs(i); if (i < 0) { d->flags |= FS_D_NEGATIVE; } return from_uint64(d, val, offset); }
false
false
false
false
false
0
lirc_dev_fop_close(struct inode *inode, struct file *file) { struct irctl *ir = irctls[iminor(inode)]; struct cdev *cdev; if (!ir) { printk(KERN_ERR "%s: called with invalid irctl\n", __func__); return -EINVAL; } cdev = ir->cdev; dev_dbg(ir->d.dev, LOGHEAD "close called\n", ir->d.name, ir->d.minor); WARN...
false
false
false
false
false
0
operator() (double x) const { return x<0 ? -_incompleteGamma(x*x): _incompleteGamma(x*x); }
false
false
false
false
false
0
send(const MSString& aString_) { if (isSet(MSProtocolConnection<MSString>::Reset)==MSTrue) return MSFalse; if (readChannel()==0) return MSFalse; MSBuffer *pBuffer=new MSBuffer; pBuffer->stuff(aString_.string(),aString_.length()); sendTheBuffer(pBuffer); if (isSet(MSProtocolConnection<MSString>::WritePause...
false
false
false
false
false
0
expand() { if (nElements_&&packedMode_) { double * temp = new double[capacity_]; int i; for (i=0;i<nElements_;i++) temp[indices_[i]]=elements_[i]; CoinZeroN(elements_,nElements_); for (i=0;i<nElements_;i++) { int iRow = indices_[i]; elements_[iRow]=temp[iRow]; } delete [...
false
false
false
false
false
0
can_install( CS* cs, const Job *job ) { // trace() << "can_install host: '" << cs->host_platform << "' target: '" << job->target_platform << "'" << endl; if ( cs->busy_installing ) { #if DEBUG_SCHEDULER > 0 trace() << cs->nodename << " is busy installing since " << time(0) - cs->busy_installing << " secon...
false
false
false
false
false
0
cb_swatch_scale (unsigned i, GOStyle const *style, char const *name, PangoAttrList *l, SwatchScaleClosure *data) { GOStyleLine const *line = NULL; double size; double maximum, scale; size = go_marker_get_size (style->marker.mark); if (data->size_max < size) data->size_max = size; if (data->size_min > size) ...
false
false
false
false
false
0
reset() { if (frames) { for(int i = 0; i < frames_size; i++) delete frames[i]; delete [] frames; frames = 0; } else if (frames_size) cerr << "Shape::~Shape(): 'frames' is null, while frames_size=" << (int) frames_size << endl; }
false
false
false
false
false
0
expandlist(Tree ldef) { set<string> visited; return expandrec(ldef, visited, nil); }
false
false
false
false
false
0
gvir_config_object_get_node_content_uint64(GVirConfigObject *object, const char *node_name) { xmlNodePtr node; const char *str; guint64 value; node = gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(object)); if (node == NULL) return 0; str ...
false
false
false
false
false
0
splitString(string str, string delims) { vector<string> vec; string temp; //const string delims(" \t\n"); string::size_type begIdx, endIdx; begIdx = str.find_first_not_of(delims); while(begIdx != string::npos) { endIdx = str.find_first_of(delims, begIdx); if(endIdx == string:...
false
false
false
false
false
0
XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, unsigned short ModeIdIndex, struct vb_device_info *pVBInfo) { unsigned short index, modeflag; unsigned char tempal; /* si+Ext_ResInfo */ modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag; if ((pVBInfo->SetFlag & ProgrammingCRT2) && (!(pVBInfo->L...
false
false
false
false
false
0
update_vector_to_shot_target_for_friend(enemy * ThisRobot) { float aggression_distance = Druidmap[ThisRobot->type].aggression_distance; float squared_aggression_distance = aggression_distance * aggression_distance; float squared_best_dist; /* if ( ThisRobot->pure_wait > 0 ) { // Target was not reachable...
false
false
false
false
false
0
print_all_uri_handlers (void) { GList *plugins, *p, *features, *f; plugins = gst_default_registry_get_plugin_list (); for (p = plugins; p; p = p->next) { GstPlugin *plugin = (GstPlugin *) (p->data); features = gst_registry_get_feature_list_by_plugin (gst_registry_get_default (), plugin-...
false
false
false
false
false
0
fake_host(u8* name, u32 addr) { struct dns_entry *d = dns, *prev = dns; while (d && d->next) { prev = d ; d = d->next;} if (!dns) d = dns = ck_alloc(sizeof(struct dns_entry)); else d = prev->next = ck_alloc(sizeof(struct dns_entry)); d->name = ck_strdup(name); d->addr = addr; }
false
false
false
false
false
0
f_tagfiles(argvars, rettv) typval_T *argvars; typval_T *rettv; { char_u fname[MAXPATHL + 1]; tagname_T tn; int first; if (rettv_list_alloc(rettv) == FAIL) { rettv->vval.v_number = 0; return; } for (first = TRUE; ; first = FALSE) if (get_tagfname(&tn, first, fname) == FAIL || ...
false
false
false
false
false
0
add_item_to_menu (GtkWidget *m, const char *name, const char *what, gpointer data, GHashTable *itemhash) { GtkWidget *w = gtk_menu_item_new_with_label (name); gtk_menu_shell_append (GTK_MENU_SHELL (m), w); g_object_set_data (G_OBJECT (w), what, data); if (itemhash && !g_hash_table_lookup (itemhash, data)) ...
false
false
false
false
false
0
main(void) { char *llwidthArgs[] = { "I64", "l64", "l", "L", "q", "ll", NULL }; char *s = malloc(128); char **currentArg = NULL; LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576; for (currentArg = llwidthArgs; *currentArg != NULL; currentArg++) { char formatString[64]; sprintf(formatString, "%%%sd"...
false
false
false
false
false
0
glade_app_show_properties (gboolean raise) { GladeApp *app = glade_app_get (); if (GLADE_APP_GET_CLASS (app)->show_properties) GLADE_APP_GET_CLASS (app)->show_properties (app, raise); else g_critical ("%s not implemented\n", G_STRFUNC); }
false
false
false
false
false
0
folder_item_get_identifier(FolderItem *item) { gchar *id = NULL; gchar *folder_id = NULL; cm_return_val_if_fail(item != NULL, NULL); if (item->path == NULL) return NULL; folder_id = folder_get_identifier(item->folder); id = g_strconcat(folder_id, "/", item->path, NULL); g_free(folder_id); return id; }
false
false
false
false
false
0