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
cookies_free(struct cookie *c, int vals) { struct cookie *o; while(c){ o = c->next; if(vals){ free(c->nam); free(c->val); free(c->host); } free(c); c = o; } }
false
false
false
false
false
0
temp_kvs_init(void) { uint16_t cmd; uint32_t nodeid, num_children, size; Buf buf = NULL; xfree(temp_kvs_buf); temp_kvs_cnt = 0; temp_kvs_size = TEMP_KVS_SIZE_INC; temp_kvs_buf = xmalloc(temp_kvs_size); /* put the tree cmd here to simplify message sending */ if (in_stepd()) { cmd = TREE_CMD_KVS_FENCE; } e...
false
false
false
false
false
0
free_strdup(char ** s, const char * str) { if (*s != NULL) { free(*s); } if (str != NULL) { *s = strdup(str); } else { *s = NULL; } }
false
false
false
false
false
0
getUserDefinedUsages(string &key,string &query, string &msg) { VS_map::iterator cur; if( (cur = VSM_UserDefinedUsages.find(key)) == VSM_UserDefinedUsages.end() ) // not found { return 0; } else { msg = (cur->second)[rand() % (cur->second).size()]; key.insert( 0,"{" ); key.append( "}" ); replaceString(ms...
false
false
false
false
false
0
pm_clk_runtime_resume(struct device *dev) { int ret; dev_dbg(dev, "%s\n", __func__); ret = pm_clk_resume(dev); if (ret) { dev_err(dev, "failed to resume clock\n"); return ret; } return pm_generic_runtime_resume(dev); }
false
false
false
false
false
0
find_includefile(HSCPRC *hp, EXPSTR * dest, STRPTR filename) { BOOL found = FALSE; /* reset filename */ set_estr(dest, filename); if (!fexists(filename)) { DLNODE *nd = dll_first(hp->include_dirs); /* process all include-directories.. */ while (nd && !found) { /* c...
false
false
false
false
false
0
multimaster_bepostop_delete (Slapi_PBlock *pb) { Slapi_Operation *op; slapi_pblock_get(pb, SLAPI_OPERATION, &op); if ( ! operation_is_flag_set (op, OP_FLAG_REPL_FIXUP) ) { urp_post_delete_operation (pb); } return SLAPI_PLUGIN_SUCCESS; }
false
false
false
false
false
0
default_hash(void *a) { size_t len = blength((bstring)a); char *key = bdata((bstring)a); uint32_t hash = 0; uint32_t i = 0; for(hash = i = 0; i < len; ++i) { hash += key[i]; hash += (hash << 10); hash ^= (hash >> 6); } hash += (hash << 3); hash ^= (hash >> 1...
false
false
false
false
false
0
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); auth_tcp_client *_t = static_cast<auth_tcp_client *>(_o); switch (_id) { case 0: _t->emit_tcp_state((*reinterpret_cast< int(*)>(...
false
false
false
false
false
0
artec48u_scanner_stop_scan (Artec48U_Scanner * s) { XDBG ((1, "artec48u_scanner_stop_scan begin: \n")); artec48u_line_reader_free (s->reader); s->reader = NULL; return artec48u_stop_scan (s->dev); }
false
false
false
false
false
0
c_tmap_scanline_lin_nolight() { ubyte *dest; uint c; int x, index = fx_xleft + (bytes_per_row * fx_y ); fix u,v,dudx, dvdx; u = fx_u; v = fx_v*64; dudx = fx_du_dx; dvdx = fx_dv_dx*64; dest = (ubyte *)(write_buffer + fx_xleft + (bytes_per_row * fx_y) ); if (!Transparency_on) { for (x= fx_xright-fx_xlef...
false
false
false
false
false
0
init_equiv_class (vec<state_t> states, vec<state_t> *classes) { size_t i; state_t prev = 0; int class_num = 1; classes->create (150); for (i = 0; i < states.length (); i++) { state_t state = states[i]; if (prev) { if (compare_states_for_equiv (&prev, &state) != 0) { cla...
false
false
false
false
false
0
DSDPAddFixedVariable( DSDPSchurMat M, int vari, double val){ int i,t,*iinew,info,nvars; double *ddnew,*vvnew; FixedVariables *fv=&M.schur->fv; DSDPFunctionBegin; nvars=fv->nvars; if (nvars>=fv->nmaxvars){ t=2*nvars + 2; DSDPCALLOC2(&iinew,int,t,&info); DSDPCALLOC2(&ddnew,double,t,&info); DSD...
false
false
false
true
false
1
stonith_check_fence_tolerance(int tolerance, const char *target, const char *action) { GHashTableIter iter; time_t now = time(NULL); remote_fencing_op_t *rop = NULL; crm_trace("tolerance=%d, remote_op_list=%p", tolerance, remote_op_list); if (tolerance <= 0 || !remote_op_list || target == NULL || ...
false
false
false
false
false
0
bbox_image_begin(const gs_imager_state * pis, const gs_matrix * pmat, const gs_image_common_t * pic, const gs_int_rect * prect, const gx_clip_path * pcpath, gs_memory_t * memory, bbox_image_enum ** ppbe) { int code; gs_matrix mat; bbox_image_enum *pbe; ...
false
false
false
false
false
0
getp_prepend(VMG_ vm_obj_id_t self, vm_val_t *retval, uint *argc) { vm_val_t val; size_t cnt; size_t i; static CVmNativeCodeDesc desc(1); /* check arguments */ if (get_prop_check_argc(retval, argc, &desc)) return TRUE; /* get the old size ...
false
false
false
false
false
0
_SSL_check_subject_altname (X509 *cert, const char *host) { STACK_OF(GENERAL_NAME) *altname_stack = NULL; GInetAddress *addr; GSocketFamily family; int type = GEN_DNS; int count, i; int rv = -1; altname_stack = X509_get_ext_d2i (cert, NID_subject_alt_name, NULL, NULL); if (altname_stack == NULL) return -1; ...
false
false
false
false
false
0
log_tree_diff_flush(struct rev_info *opt) { diffcore_std(&opt->diffopt); if (diff_queue_is_empty()) { int saved_fmt = opt->diffopt.output_format; opt->diffopt.output_format = DIFF_FORMAT_NO_OUTPUT; diff_flush(&opt->diffopt); opt->diffopt.output_format = saved_fmt; return 0; } if (opt->loginfo && !opt->n...
false
false
false
false
false
0
pages_map(void *addr, size_t size) { void *ret; assert(size != 0); #ifdef _WIN32 /* * If VirtualAlloc can't allocate at the given address when one is * given, it fails and returns NULL. */ ret = VirtualAlloc(addr, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); #else /* * We don't use MAP_FIXED her...
false
false
false
false
false
0
CPLRecode( const char *pszSource, const char *pszSrcEncoding, const char *pszDstEncoding ) { /* -------------------------------------------------------------------- */ /* Handle a few common short cuts. */ /* -----------------------...
false
false
false
false
false
0
computeIntersects(Edge *e0, Edge *e1, SegmentIntersector *si) { const CoordinateSequence *pts0=e0->getCoordinates(); const CoordinateSequence *pts1=e1->getCoordinates(); size_t npts0=pts0->getSize(); size_t npts1=pts1->getSize(); for(size_t i0=0; i0<npts0-1; ++i0) { for(size_t i1=0; i1<npts1-1; ++i1) { ...
false
false
false
false
false
0
DoOpenFile(const wxString& filename, bool addToHistory) { cbEditor* ed = Manager::Get()->GetEditorManager()->Open(filename); if (ed) { // Cryogen 24/3/10 Activate the editor after opening. Partial fix for bug #14087. ed->Activate(); if (addToHistory) m_filesHistory.AddToH...
false
false
false
false
false
0
emitUADD(const Instruction *i) { const int neg0 = i->src(0).mod.neg(); const int neg1 = i->src(1).mod.neg() ^ ((i->op == OP_SUB) ? 1 : 0); code[0] = 0x20008000; if (i->src(1).getFile() == FILE_IMMEDIATE) { code[1] = 0; emitForm_IMM(i); } else if (i->encSize == 8) { code[0] = 0x2000...
false
false
false
false
false
0
glade_gtk_combo_box_set_property (GladeWidgetAdaptor * adaptor, GObject * object, const gchar * id, const GValue * value) { if (!strcmp (id, "entry-text-column")) { /* Avoid warnings */ if (g_value_get_int (value) >= 0) GWA_GE...
false
false
false
false
false
0
ParseSimpleFacet( void *theEnv, char *readSource, char *specbits, char *facetName, int testBit, char *clearRelation, char *setRelation, char *alternateRelation, char *varRelation, SYMBOL_HN **facetSymbolicValue) { int rtnCode; if (TestBitMap(specbits,testBit)) { PrintErrorID(theE...
false
false
false
false
false
0
merge_space_tree(struct btrfs_free_space_ctl *ctl) { struct btrfs_free_space *e, *prev = NULL; struct rb_node *n; again: spin_lock(&ctl->tree_lock); for (n = rb_first(&ctl->free_space_offset); n; n = rb_next(n)) { e = rb_entry(n, struct btrfs_free_space, offset_index); if (!prev) goto next; if (e->bitmap ...
false
false
false
false
false
0
cbf_new_column (cbf_handle handle, const char *columnname) { cbf_node *node; int errorcode; unsigned int rows; if (!handle) return CBF_ARGUMENT; /* Find the category node */ cbf_failnez (cbf_find_parent (&node, handle->node, CBF_CATEGORY)) /* How many rows does this category have? */ c...
false
false
false
false
false
0
sf_readrow_hsbin(SpiceStream *sf, double *ivar, double *dvars) { int i; int rc; if(!sf->read_sweepparam) { /* first row of table */ if(sf_readsweep_hsbin(sf, NULL) <= 0) /* discard sweep parameters, if any */ return -1; } rc = sf_getval_hsbin(sf, ivar); if(rc == 0) /* file EOF */ return 0; if(rc < 0)...
false
false
false
false
false
0
send_set_info(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, u64 volatile_fid, u32 pid, int info_class, unsigned int num, void **data, unsigned int *size) { struct smb2_set_info_req *req; struct smb2_set_info_rsp *rsp = NULL; struct kvec *iov; struct kvec rsp_iov; int rc = 0; ...
false
false
false
false
false
0
count_nondeletable_pages(Relation onerel, LVRelStats *vacrelstats) { BlockNumber blkno; /* Strange coding of loop control is needed because blkno is unsigned */ blkno = vacrelstats->rel_pages; while (blkno > vacrelstats->nonempty_pages) { Buffer buf; Page page; OffsetNumber offnum, maxoff; bool ha...
false
false
false
false
false
0
account_get_logged_in_init_socket(const char *name) { int i; for (i=0; i < socket_info.allocated_sockets; i++) { if (init_sockets[i].status == Ns_Add && init_sockets[i].account_name && !strcasecmp(init_sockets[i].account_name, name)) return(&init_sockets[i]); } return NU...
false
false
false
false
false
0
gwy_statusbar_update_markup(GtkStatusbar *statusbar, G_GNUC_UNUSED guint context_id, const gchar *text) { g_return_if_fail(GTK_IS_STATUSBAR(statusbar)); if (!text) text = ""; /* FIXME: this causes size allocation request */ gtk_label_set_...
false
false
false
false
false
0
ArgusEncode64 (const char *ptr, int len, char *str, int slen) { int retn = 0; const unsigned char *in = (const unsigned char *)ptr; unsigned char *buf = (unsigned char *) str; unsigned char oval; unsigned newlen; if (ptr && ((newlen = (len + 2) / 3 * 4) < slen)) { while (len >= 3) { *...
false
false
false
false
false
0
nv4e_i2c_bus_new(struct nvkm_i2c_pad *pad, int id, u8 drive, struct nvkm_i2c_bus **pbus) { struct nv4e_i2c_bus *bus; if (!(bus = kzalloc(sizeof(*bus), GFP_KERNEL))) return -ENOMEM; *pbus = &bus->base; nvkm_i2c_bus_ctor(&nv4e_i2c_bus_func, pad, id, &bus->base); bus->addr = 0x600800 + drive; return 0; }
false
false
false
false
false
0
ajGraphNewpage(AjPGraph thys, AjBool resetdefaults) { ajint old; ajint cold; float fold; ajDebug("ajGraphNewPage reset:%B\n", resetdefaults); if(graphData) { GraphDatafileNext(); return; } GraphSubPage(0); if(resetdefaults) { ajGraphicsSetFgcolour(BLACK); ajGraphicsSetCh...
false
false
false
false
false
0
folder_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { switch (property_id) { case PROP_DESCRIPTION: camel_folder_set_description ( CAMEL_FOLDER (object), g_value_get_string (value)); return; c...
false
false
false
false
false
0
__Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_4294967295 = PyInt_FromString((char *)"4294967295", 0, 0); if (unlikely(!__pyx_int_4294967295)) {__pyx_filename = __pyx_f[0]; __pyx_lineno...
false
false
false
false
false
0
setRepetitions(int repetitions) { _rtt.clear(); _rtt.resize(repetitions, 0); _errors.assign(repetitions, ""); }
false
false
false
false
false
0
_ocfs2_free_clusters(handle_t *handle, struct inode *bitmap_inode, struct buffer_head *bitmap_bh, u64 start_blk, unsigned int num_clusters, void (*undo_fn)(unsigned int bit, unsigned long *bitmap)) { int status; u16 bg_start_bit; u64 bg_blkno; struct ocfs2_dinode *fe; /* You can't ever h...
false
false
false
false
false
0
movePoint(int index, const QPointF &point, bool emitUpdate) { m_points[index] = bound_point(point, boundingRect(), m_locks.at(index)); if (emitUpdate) { firePointChange(); } }
false
false
false
false
false
0
eeprom_93xx46_bin_write(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { struct eeprom_93xx46_dev *edev; struct device *dev; int i, ret, step = 1; dev = container_of(kobj, struct device, kobj); edev = dev_get_drvdata(dev); /* only write even n...
false
false
false
false
false
0
unix_slashes(char *buf) { /* * Convert "~/" into "HOME>>". */ if(strncmp(buf, "~/", 2) == 0) { strdel(buf, 2); strins(buf, "HOME" FM_DEREF_TOKEN, 0); } #if defined(WIN32) int len = strlen(buf); for(int i = 0; i < len; ++i) if(buf[i] == '\\') buf[i] = '/'; #elif defined(MACOS) int start = 0; int le...
false
false
false
false
false
0
do_find_free_inode(int argc, char *argv[]) { ext2_ino_t free_inode, dir; int mode; int retval; char *tmp; if (argc > 3 || (argc>1 && *argv[1] == '?')) { com_err(argv[0], 0, "Usage: find_free_inode [dir] [mode]"); return; } if (check_fs_open(argv[0])) return; if (argc > 1) { dir = strtol(argv[1], &t...
false
false
false
false
false
0
e_util_slist_to_strv (const GSList *strings) { const GSList *iter; GPtrArray *array; array = g_ptr_array_sized_new (g_slist_length ((GSList *) strings) + 1); for (iter = strings; iter; iter = iter->next) { const gchar *str = iter->data; if (str) g_ptr_array_add (array, g_strdup (str)); } /* NULL-termin...
false
false
false
false
false
0
inf_gtk_certificate_dialog_new(GtkWindow* parent, GtkDialogFlags dialog_flags, InfGtkCertificateDialogFlags certificate_flags, const gchar* hostname, InfCertificateChain* certificate_chain) { GO...
false
false
false
false
false
0
span_log_init(logging_state_t *s, int level, const char *tag) { if (s == NULL) { if ((s = (logging_state_t *) malloc(sizeof(*s))) == NULL) return NULL; } s->span_error = __span_error; s->span_message = __span_message; s->level = level; s->tag = tag; s->protocol = NULL...
false
false
false
false
false
0
ParseTransportableItem(AString *token) { int r = -1; for (int i=0; i<NITEMS; i++) { if(ItemDefs[i].flags & ItemType::DISABLED) continue; if(ItemDefs[i].flags & ItemType::NOTRANSPORT) continue; if(ItemDefs[i].flags & ItemType::CANTGIVE) continue; if (ItemDefs[i].type & IT_ILLUSION) { if ((*token == (AString...
false
false
false
false
false
0
add_conflict_symbol(int state_no, int symbol) { struct node *p; p = Allocate_node(); p -> value = symbol; if (conflict_symbols[state_no] == NULL) p -> next = p; else { p -> next = conflict_symbols[state_no] -> next; conflict_symbols[state_no] -> next = p; } confl...
false
false
false
false
false
0
cp_real10(const String &str, int frac_digits, int32_t *result) { DecimalFixedPointArg dfpa(frac_digits); if (!dfpa.parse_saturating(str, *result)) { cp_errno = CPE_FORMAT; return false; } else if (dfpa.status == dfpa.status_range) cp_errno = CPE_OVERFLOW; else cp_errno = CPE_OK; return true; }
false
false
false
false
false
0
tapeConfigLoadCbk (void *data) { int rval = 1 ; long iv ; int bv ; FILE *fp = (FILE *) data ; char *dir ; if (getString (topScope,"backlog-directory",&dir,NO_INHERIT)) { if (tapeDirectory != NULL && strcmp (tapeDirectory,dir) != 0) { syslog (LOG_ERR,NO_CHANGE_BACKLOG) ; ...
false
false
false
false
false
0
force_reg (enum machine_mode mode, rtx x) { rtx temp, insn, set; if (REG_P (x)) return x; if (general_operand (x, mode)) { temp = gen_reg_rtx (mode); insn = emit_move_insn (temp, x); } else { temp = force_operand (x, NULL_RTX); if (REG_P (temp)) insn = get_last_insn ()...
false
false
false
false
false
0
lua_copytagmethods (int tagto, int tagfrom) { int e; checktag(tagto); checktag(tagfrom); for (e=0; e<IM_N; e++) { if (validevent(tagto, e)) *luaT_getim(tagto, e) = *luaT_getim(tagfrom, e); } return tagto; }
false
false
false
false
false
0
quote_string (dst, src) char *dst, *src; { U_CHAR c; *dst++ = '\"'; for (;;) switch ((c = *src++)) { default: if (isprint (c)) *dst++ = c; else { sprintf (dst, "\\%03o", c); dst += 4; } break; case '\"': case '\\': *dst++ = '\\'; *dst++ = c; break...
false
false
false
false
false
0
combo_set_list(void *_object, GB_ARRAY array) { int i; QString text = COMBOBOX->currentText(); COMBOBOX->blockSignals(true); COMBOBOX->clear(); if (array) { for (i = 0; i < GB.Array.Count(array); i++) { COMBOBOX->insertItem(TO_QSTRING(*((char **)GB.Array.Get(array, i)))); } } COMBOBOX->setDirty(); ...
false
false
false
false
false
0
parse_htpl_switch_rnd___fwd(stack, untag) int untag; STR stack; { TOKEN token; static done = 0; STR buff; int code; static int nesting = 0; static int refcount = 0; refcount++; makepersist(stack); pushscope(scope_random_switch, 0); printcode("{\n"); code = 1; kl...
false
false
false
false
false
0
shadeBoundedIfThenElse1(GLERectangle* bounds, double p, double step1) { // if x1+p*s > y1 then if (bounds->getXMax()+p*step1 > bounds->getYMax()) { // aline y1-p*s y1 cairo_line_to(m_cr, bounds->getYMax()-p*step1, bounds->getYMax()); } else { // aline x1 x1+p*s cairo_line_to(m_cr, bounds->getXMax(), bounds->...
false
false
false
false
false
0
print_packet(uint8_t *pack) { struct ethhdr *ethhdr = (struct ethhdr *)pack; struct pppoe_hdr *hdr = (struct pppoe_hdr *)(pack + ETH_HLEN); struct pppoe_tag *tag; int n; log_info2("[PPPoE "); switch (hdr->code) { case CODE_PADI: log_info2("PADI"); break; case CODE_PADO: log_info2("PADO"); break;...
false
false
false
false
false
0
gtab_get_preedit(char *str, GCIN_PREEDIT_ATTR attr[], int *pcursor, int *sub_comp_len) { int i=0; int strN=0; int attrN=0; int ch_N=0; // dbg("gtab_get_preedit\n"); str[0]=0; *pcursor=0; #if WIN32 || 1 *sub_comp_len = ggg.ci > 0; #if 1 if (ggg.gbufN && !gcin_edit_display_ap_only()) *sub_comp_len|=4;...
true
true
false
false
false
1
appendLinearRingTaggedText(const LinearRing* linearRing, int level, Writer *writer) { writer->write("LINEARRING "); if( outputDimension == 3 && !old3D && !linearRing->isEmpty() ) writer->write( "Z " ); appendLineStringText((LineString*)linearRing, level, false, writer); }
false
false
false
false
false
0
FillInReductionPop(WiggleIterator * wi) { if (wi->done) return; WiggleReducerData * data = (WiggleReducerData *) wi->data; Multiplexer * multi = data->multi; if (multi->done) { wi->done = true; return; } wi->chrom = multi->chrom; wi->start = multi->start; wi->finish = multi->finish; if (multi->inplay[...
false
false
false
false
false
0
operator- (void) { switch (this->type_) { case ACE_ETCL_DOUBLE: return ETCL_Literal_Constraint (- this->op_.double_); case ACE_ETCL_INTEGER: case ACE_ETCL_SIGNED: return ETCL_Literal_Constraint (- this->op_.integer_); case ACE_ETCL_UNSIGNED: return ETCL_Literal_Constraint (- (ACE_C...
false
false
false
false
false
0
octeon_get_tx_qsize(struct octeon_device *oct, u32 q_no) { if (oct && (q_no < MAX_OCTEON_INSTR_QUEUES) && (oct->io_qmask.iq & (1UL << q_no))) return oct->instr_queue[q_no]->max_count; return -1; }
false
false
false
false
false
0
gsb_data_partial_balance_init_from_liste_cptes ( gint partial_balance_number, GtkWidget *parent ) { struct_partial_balance *partial_balance; gchar **tab; gint i; gint account_nb; gint currency_nb = 0; kind_account kind = -1; kind_account kind_nb = -1; gchar *tmp_s...
false
false
false
false
false
0
evas_object_image_render_post(Evas_Object *obj) { Evas_Object_Image *o; Eina_Rectangle *r; /* this moves the current data to the previous state parts of the object */ /* in whatever way is safest for the object. also if we don't need object */ /* data anymore we can free it if the object deems this is a...
false
false
false
false
false
0
_nss_dns_getnetbyname_r (const char *name, struct netent *result, char *buffer, size_t buflen, int *errnop, int *herrnop) { /* Return entry for network with NAME. */ union { querybuf *buf; u_char *ptr; } net_buffer; querybuf *orig_net_buffer; int anslen; char *qbuf; enum nss_status stat...
false
false
false
false
false
0
rsvg_handle_has_sub (RsvgHandle * handle, const char *id) { g_return_val_if_fail (handle, FALSE); if (G_UNLIKELY (!id || !id[0])) return FALSE; return rsvg_defs_lookup (handle->priv->defs, id) != NULL; }
false
false
false
false
false
0
NumberValue() const { i::Isolate* isolate = i::Isolate::Current(); if (IsDeadCheck(isolate, "v8::NumberObject::NumberValue()")) return 0; LOG_API(isolate, "NumberObject::NumberValue"); i::Handle<i::Object> obj = Utils::OpenHandle(this); i::Handle<i::JSValue> jsvalue = i::Handle<i::JSValue>::cast(obj); retur...
false
false
false
false
false
0
EXTRACTOR_IPC_shared_memory_create_ (size_t size) { struct EXTRACTOR_SharedMemory *shm; const char *tpath; if (NULL == (shm = malloc (sizeof (struct EXTRACTOR_SharedMemory)))) { LOG_STRERROR ("malloc"); return NULL; } #if SOMEBSD /* this works on FreeBSD, not sure about others... */ tpath...
false
false
false
false
false
0
OnTestCaseStart(const TestCase& test_case) { test_case_name_ = test_case.name(); const internal::String counts = FormatCountableNoun(test_case.test_to_run_count(), "test", "tests"); ColoredPrintf(COLOR_GREEN, "[----------] "); printf("%s from %s", counts.c_str(), test_case_name_.c_str()); if (test_case....
false
false
false
false
false
0
NC3_new_nc(NC** ncpp) { NC *ncp; #if _CRAYMPP && defined(LOCKNUMREC) ncp = (NC *) shmalloc(sizeof(NC)); #else ncp = (NC *) malloc(sizeof(NC)); #endif /* _CRAYMPP && LOCKNUMREC */ if(ncp == NULL) return NC_ENOMEM; (void) memset(ncp, 0, sizeof(NC)); ncp->x...
false
false
false
false
false
0
ConnectCB(int status) { ostringstream osstr; if (status != 0) { if (reconnect_attempt < 0) { globalreg->messagebus->InjectMessage("Could not connect to GPSD server", MSGFLAG_ERROR); globalreg->messagebus->InjectMessage("GPSD reconnection not enabled, " "disabling GPSD", MSGFLAG_ERR...
false
false
false
false
false
0
validateForm(formTree* ft) { static bool guard = false; if(ft == NULL) return true; if(ft->path_selector == EXISTS || ft->path_selector == ALWAYS) { //nonparametric modal //check if all listed actions are ok string actname; for(int i = 0; i < (ft->elements)->elements; ++i) { ...
false
false
false
false
false
0
get_config_for_overwrite_prevention_cb (SyncevoSession *session, SyncevoConfig *config, GError *error, save_config_data *data) { static int index = 0; char *name; if (error) { ind...
false
false
false
false
false
0
ast_update_use_count(void) { /* Notify any module monitors that the use count for a resource has changed */ struct loadupdate *m; AST_LIST_LOCK(&updaters); AST_LIST_TRAVERSE(&updaters, m, entry) m->updater(); AST_LIST_UNLOCK(&updaters); }
false
false
false
false
false
0
writeAnimation(TiXmlElement* animsNode, const Animation* anim) { TiXmlElement* animNode = animsNode->InsertEndChild(TiXmlElement("animation"))->ToElement(); animNode->SetAttribute("name", anim->getName()); animNode->SetAttribute("length", StringConverter::toString(anim...
false
false
false
false
false
0
at76_load_internal_fw(struct usb_device *udev, struct fwentry *fwe) { int ret; int need_remap = !at76_is_505a(fwe->board_type); ret = at76_usbdfu_download(udev, fwe->intfw, fwe->intfw_size, need_remap ? 0 : 2 * HZ); if (ret < 0) { dev_err(&udev->dev, "downloading internal fw failed with %d\n", ret); ...
false
false
false
false
false
0
destroy_async(struct usb_dev_state *ps, struct list_head *list) { struct urb *urb; struct async *as; unsigned long flags; spin_lock_irqsave(&ps->lock, flags); while (!list_empty(list)) { as = list_entry(list->next, struct async, asynclist); list_del_init(&as->asynclist); urb = as->urb; usb_get_urb(urb); ...
false
false
false
false
false
0
update_glbl_clist(GtkWidget *calling_widget __unused, GtkWidget *edit_win_to_destroy) { int column; for (column = 0; column < COOKIE_COLUMNS; column++) { gtk_clist_set_text(GTK_CLIST(glbl_clist), glbl_clist_selected_row, column, glbl_selected_cookie[column] ); } ...
false
false
false
false
false
0
print_import_ok (PKT_public_key *pk, PKT_secret_key *sk, unsigned int reason) { byte array[MAX_FINGERPRINT_LEN], *s; char buf[MAX_FINGERPRINT_LEN*2+30], *p; size_t i, n; sprintf (buf, "%u ", reason); p = buf + strlen (buf); if (pk) fingerprint_from_pk (pk, array, &n); else fingerprint_from_sk (s...
false
false
false
false
false
0
test_upload_default_album (UploadData *data, gconstpointer service) { GDataUploadStream *upload_stream; const gchar * const *tags, * const *tags2; gssize transfer_size; GError *error = NULL; gdata_test_mock_server_start_trace (mock_server, "upload-default-album"); /* Prepare the upload stream */ /* TODO right ...
false
false
false
false
false
0
addEdgePoint (Agedge_t* ep, Dt_t* alist, agxbuf* xb) { gmlattr* ap; char* x = "0"; char* y = "0"; for (ap = dtfirst(alist); ap; ap = dtnext (alist, ap)) { if (ap->sort == XVAL) { x = ap->u.value; } else if (ap->sort == YVAL) { y = ap->u.value; } else { fprintf (stderr, "non-X...
false
false
false
false
false
0
nemo_view_factory_create (const char *id, NemoWindowSlot *slot) { const NemoViewInfo *view_info; NemoView *view; view_info = nemo_view_factory_lookup (id); if (view_info == NULL) { return NULL; } view = view_info->create (slot); if (g_object_is_floating (view)) { g_object_ref_sink (view); } retu...
false
false
false
false
false
0
find_entry(HashTable *ht,const void *key,size_t klen,const void *val) { HashEntry **hep, *he; unsigned int hash; hash = ht->Hash(key, &klen); /* scan linked list */ for (hep = &ht->array[hash & ht->max], he = *hep; he; hep = &he->next, he = *hep) { if (he->hash == hash ...
false
false
false
false
false
0
flush() { CursesContainer *p=getParent(); if (p) p->flush(); }
false
false
false
false
false
0
crmf_generic_encoder_callback(void *arg, const char* buf, unsigned long len, int depth, SEC_ASN1EncodingPart data_kind) { struct crmfEncoderArg *encoderArg = (struct crmfEncoderArg*)arg; unsigned char *cursor; if (encoderArg->buffer->len + len > encoderArg->allocatedLen) { int newSize =...
false
false
false
false
false
0
xps_rels_for_part(char *buf, char *name, int buflen) { char *p, *basename; p = strrchr(name, '/'); basename = p ? p + 1 : name; fz_strlcpy(buf, name, buflen); p = strrchr(buf, '/'); if (p) *p = 0; fz_strlcat(buf, "/_rels/", buflen); fz_strlcat(buf, basename, buflen); fz_strlcat(buf, ".rels", buflen); }
false
false
false
false
false
0
detail_send(rad_listen_t *listener, REQUEST *request) { int rtt; struct timeval now; listen_detail_t *data = listener->data; rad_assert(request->listener == listener); rad_assert(listener->send == detail_send); /* * This request timed out. Remember that, and tell the * caller it's OK to read more "detail" ...
false
false
false
false
false
0
zero_stats(void) { int i; cgtime(&total_tv_start); copy_time(&tv_hashmeter, &total_tv_start); total_rolling = 0; rolling1 = 0; rolling5 = 0; rolling15 = 0; total_mhashes_done = 0; for(i = 0; i < CG_LOCAL_MHASHES_MAX_NUM; i++) { g_local_mhashes_dones[i] = 0; } g_local_mhashes_index = 0; g_max_fan = 0; g...
false
false
false
false
false
0
vPrintFMT(FILE *pFile, const char *szString, size_t tStringLength, USHORT usFontstyle) { const UCHAR *pucByte, *pucStart, *pucLast, *pucNonSpace; fail(szString == NULL); if (szString == NULL || szString[0] == '\0' || tStringLength == 0) { return; } if (eEncoding == encoding_utf_8) { fprintf(pFile, "%.*s", ...
false
false
false
false
false
0
makeConfigurationDependencies(HeapTuple tuple, bool removeOld, Relation mapRel) { Form_pg_ts_config cfg = (Form_pg_ts_config) GETSTRUCT(tuple); ObjectAddresses *addrs; ObjectAddress myself, referenced; myself.classId = TSConfigRelationId; myself.objectId = HeapTupleGetOid(tuple); myself.objectSubId ...
false
false
false
false
false
0
Bop_a8_set_alphapixel_Aop_alut44( GenefxState *gfxs ) { int w = gfxs->length; u8 *S = gfxs->Bop[0]; u8 *D = gfxs->Aop[0]; u32 Cop = gfxs->Cop; DFBColor color = gfxs->color; DFBColor *entries = gfxs->Alut->entries; #define SET_PIXEL(d,alpha) \ switch (alpha) {\ ...
false
false
false
false
false
0
find_tm_replacement_function (tree fndecl) { if (tm_wrap_map) { struct tree_map *h, in; in.base.from = fndecl; in.hash = htab_hash_pointer (fndecl); h = (struct tree_map *) htab_find_with_hash (tm_wrap_map, &in, in.hash); if (h) return h->to; } /* ??? We may well want TM ver...
false
false
false
false
false
0
dump_rt(struct lib_context *lc, struct asr_raidtable *rt) { unsigned i; DP("ridcode:\t\t\t0x%X", rt, rt->ridcode); DP("rversion:\t\t%d", rt, rt->rversion); DP("max configs:\t\t%d", rt, rt->maxelm); DP("configs:\t\t\t%d", rt, rt->elmcnt); DP("config sz:\t\t%d", rt, rt->elmsize); DP("checksum:\t\t\t0x%X", rt, rt-...
false
false
false
false
false
0
qla8044_read_flash_data(scsi_qla_host_t *vha, uint8_t *p_data, uint32_t flash_addr, int u32_word_count) { int i, ret_val = QLA_SUCCESS; uint32_t u32_word; if (qla8044_flash_lock(vha) != QLA_SUCCESS) { ret_val = QLA_FUNCTION_FAILED; goto exit_lock_error; } if (flash_addr & 0x03) { ql_log(ql_log_warn, vha,...
false
false
false
false
false
0
read_auth_reply(fde_t *fd, void *data) { struct AuthRequest *auth = data; char *s = NULL; char *t = NULL; int len; int count; char buf[AUTH_BUFSIZ + 1]; /* buffer to read auth reply into */ /* Why? * Well, recv() on many POSIX systems is a per-packet operation, * and we do not necessarily want this...
true
true
false
false
true
1
ml_gdome_mevnt_compare(value v1, value v2) { CAMLparam2(v1,v2); GdomeMutationEvent* obj1_ = MutationEvent_val(v1); GdomeMutationEvent* obj2_ = MutationEvent_val(v2); CAMLreturn((int) (obj1_ - obj2_)); }
false
false
false
false
false
0
nfs_cache_unregister_net(struct net *net, struct cache_detail *cd) { struct super_block *pipefs_sb; pipefs_sb = rpc_get_sb_net(net); if (pipefs_sb) { nfs_cache_unregister_sb(pipefs_sb, cd); rpc_put_sb_net(net); } sunrpc_destroy_cache_detail(cd); }
false
false
false
false
false
0
cgetustr(char *buf, const char *cap, char **str) { u_int m_room; const char *bp; char *mp; int len; char *mem; /* * Find string capability cap */ if ((bp = cgetcap(buf, cap, '=')) == NULL) return (-1); /* * Conversion / storage allocation loop ... Allocate memory in ...
false
false
false
false
false
0
references( CMCIClient * mb, CMPIObjectPath * cop, const char * resultClass, const char * role , CMPIFlags flags, char ** properties, CMPIStatus * rc) { ClientEnc *cl = (ClientEnc*)mb; CMCIConnection *con = cl->connection; UtilStringBuffer *sb = UtilFactory->newStringBuffer(2048); char *error; ...
false
false
false
false
false
0
shared_unlock(int idx) /* unlock given segment, assumes seg is locked !! */ { int r, r2, mode; if (SHARED_OK != (r = shared_check_locked_index(idx))) return(r); if (shared_lt[idx].lkcnt > 0) { shared_lt[idx].lkcnt--; /* unlock read lock */ mode = SHARED_RDONLY; ...
false
false
false
false
false
0