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
H5D__efl_construct(H5F_t *f, H5D_t *dset) { size_t dt_size; /* Size of datatype */ hsize_t dim[H5O_LAYOUT_NDIMS]; /* Current size of data in elements */ hsize_t max_dim[H5O_LAYOUT_NDIMS]; /* Maximum size of data in elements */ hssize_t stmp_size; /* Temporary holder ...
false
false
false
false
false
0
Curl_rtsp_parseheader(struct connectdata *conn, char *header) { struct SessionHandle *data = conn->data; long CSeq = 0; if(checkprefix("CSeq:", header)) { /* Store the received CSeq. Match is verified in rtsp_done */ int nc = sscanf(&header[4], ": %ld", &CSeq); if(nc ==...
false
false
false
false
false
0
unique_key_recheck(PG_FUNCTION_ARGS) { TriggerData *trigdata = (TriggerData *) fcinfo->context; const char *funcname = "unique_key_recheck"; HeapTuple new_row; ItemPointerData tmptid; Relation indexRel; IndexInfo *indexInfo; EState *estate; ExprContext *econtext; TupleTableSlot *slot; Datum values[INDEX_...
false
false
false
true
false
1
GetDistance2d(float x, float y) { float dx = GetX() - x; float dy = GetY() - y; float sizefactor = GetObjectSize(); float dist = sqrt((dx*dx) + (dy*dy)) - sizefactor; return ( dist > 0 ? dist : 0); }
false
false
false
false
false
0
write_xyz(gchar *filename, struct model_pak *data) { gdouble x[3]; GSList *list; struct core_pak *core; FILE *fp; /* checks */ g_return_val_if_fail(data != NULL, 1); g_return_val_if_fail(filename != NULL, 2); /* open the file */ fp = fopen(filename,"wt"); if (!fp) return(3); /* print header */ fprintf(fp,"%d\nXYZ\...
false
false
false
false
true
1
create_struct3(void) { misc5_struct3_hndl *str3hndl; /* New 'struct3' created */ herr_t ret; /* For error checking */ str3hndl = HDmalloc(sizeof(misc5_struct3_hndl)); CHECK(str3hndl,NULL,"malloc"); str3hndl->st3h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct3)); ...
false
false
false
false
false
0
matrandperm(MATRIX *m) { VALUE *vp; long s, i; VALUE val; s = m->m_size; for (vp = m->m_table; s > 1; vp++, s--) { i = irand(s); if (i > 0) { val = *vp; *vp = vp[i]; vp[i] = val; } } }
false
false
false
false
true
1
WriteToLogFile() { ASSERT(pos_ <= Log::kMessageBufferSize); const int written = log_->WriteToFile(log_->message_buffer_, pos_); if (written != pos_) { log_->stop(); log_->logger_->LogFailure(); } }
false
false
false
false
false
0
ladish_cqueue_add_command(struct ladish_cqueue * queue_ptr, struct ladish_command * cmd_ptr) { ASSERT(cmd_ptr->run != NULL); if (queue_ptr->cancel) { return false; } ASSERT(cmd_ptr->state == LADISH_COMMAND_STATE_PREPARE); cmd_ptr->state = LADISH_COMMAND_STATE_PENDING; list_add_tail(&cmd_ptr->siblin...
false
false
false
false
false
0
test_gnc_split_init () { Split *split = g_object_new (GNC_TYPE_SPLIT, NULL); g_assert (split->acc == NULL); g_assert (split->orig_acc == NULL); g_assert (split->parent == NULL); g_assert (split->lot == NULL); g_assert_cmpstr (split->action, ==, ""); g_assert_cmpstr (split->memo, ==, ""); ...
false
false
false
false
false
0
AtomGet(Window win, Atom to_get, Atom type, int *size) { unsigned char *retval; Atom type_ret; unsigned long bytes_after, num_ret; int format_ret; long length; void *data; retval = NULL; length = 0x7fffffff; XGetWindowProperty( dpy, win, to_get, 0L, length, False, type, &type_ret, &format_ret, &num_ret, &...
false
false
false
false
false
0
c_dfe(cilist *a) #endif { f__sequential=0; f__formatted=f__external=1; f__elist=a; f__cursor=f__scale=f__recpos=0; f__curunit = &f__units[a->ciunit]; if(a->ciunit>MXUNIT || a->ciunit<0) err(a->cierr,101,"startchk"); if(f__curunit->ufd==NULL && fk_open(DIR,FMT,a->ciunit)) err(a->cierr,104,"dfe"); f__cf=f__cu...
false
false
false
false
false
0
perform_generate_key_pair (GenerateKeyPair *args) { CK_ATTRIBUTE_PTR pub_attrs, priv_attrs; CK_ULONG n_pub_attrs, n_priv_attrs; g_assert (sizeof (CK_MECHANISM) == sizeof (GckMechanism)); pub_attrs = _gck_attributes_commit_out (args->public_attrs, &n_pub_attrs); priv_attrs = _gck_attributes_commit_out (args->priv...
false
false
false
false
false
0
merge_memattrs (rtx x, rtx y) { int i; int j; enum rtx_code code; const char *fmt; if (x == y) return; if (x == 0 || y == 0) return; code = GET_CODE (x); if (code != GET_CODE (y)) return; if (GET_MODE (x) != GET_MODE (y)) return; if (code == MEM && MEM_ATTRS (x) != MEM_ATTRS (y)...
false
false
false
false
false
0
reload(Nodes nodes, NodeObjectMap &map) { DEBUG << "reload: " << nodes << endl; LoadState state; state.requested = nodes; state.map = map; state.loadFlags = LoadState::IgnoreUnknownTypes; collect(state); load(state); map = state.map; ...
false
false
false
false
false
0
testStPinchThread_pinch_randomTests(CuTest *testCase) { for (int64_t test = 0; test < 100; test++) { st_logInfo("Starting random pinch test %" PRIi64 "\n", test); stPinchThreadSet *threadSet = stPinchThreadSet_getRandomEmptyGraph(); stHash *columns = getUnalignedColumns(threadSet); ...
false
false
false
false
false
0
Read(void *Buffer, size_t Count) { if (!Count) return 0; // Employ a circular_buffer to speed-up lots of small readings: if (m_readBuffer.size()>=Count) { // It's enough with the data in the buffer: m_readBuffer.pop_many(reinterpret_cast<uint8_t*>(Buffer),Count); return Count; } else { // More data must...
false
false
false
false
false
0
make_tlv(char *dest, int dest_len, char type, uint16_t length, char *value) { struct tlv *tlv; if (!dest || (length + sizeof(*tlv) > dest_len)) return 0; tlv = (struct tlv *)dest; tlv->type = type; tlv->length_hi = length >> 8; tlv->length_lo = length & 0x00ff; memcpy(tlv->value, value, length); return len...
false
true
false
false
false
1
search_acc_exec_block_stm(Statement *stm_head, List *result_list) { Statement *spt; Directive *dpt; for (spt = stm_head; spt != NULL; spt = spt->next) { for (dpt = spt->dir_pre_head; dpt != NULL; dpt = dpt->next) { if (dpt->func->id == MFOR_ACCELERATOR_TASK) list_append(result_list, spt->p...
false
false
false
false
false
0
gretl_xcf (int k, int t1, int t2, const double *x, const double *y, double xbar, double ybar) { double num = 0, den1 = 0, den2 = 0; double zx, zy; int t; for (t=t1; t<=t2; t++) { if (na(x[t]) || na(y[t])) { return NADBL; } zx = x[t] - xbar; zy = y[t] - ybar; den1 += zx * zx; den2 += zy *...
false
false
false
false
false
0
_gwy_morph_lib_itip_estimate(gint **image, gint im_xsiz, gint im_ysiz, gint tip_xsiz, gint tip_ysiz, gint xc, gint yc, gint **tip0, gint thresh, gboolean use_edges, GwySetFractionFunc set_fraction, ...
false
false
false
false
false
0
activate_activation_uris_ready_callback (GList *files_ignore, gpointer callback_data) { ActivateParameters *parameters = callback_data; GList *l, *next, *files; NautilusFile *file; LaunchLocation *location; parameters->files_handle = NULL; for (l = parameters->locations; l != NULL; l = next) { location...
false
false
false
false
false
0
core_dev_init_initiator_node_lun_acl( struct se_portal_group *tpg, struct se_node_acl *nacl, u64 mapped_lun, int *ret) { struct se_lun_acl *lacl; if (strlen(nacl->initiatorname) >= TRANSPORT_IQN_LEN) { pr_err("%s InitiatorName exceeds maximum size.\n", tpg->se_tpg_tfo->get_fabric_name()); *ret = -EOVERFLO...
false
false
false
false
false
0
glade_gtk_widget_write_widget (GladeWidgetAdaptor * adaptor, GladeWidget * widget, GladeXmlContext * context, GladeXmlNode * node) { GladeProperty *prop; if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) || glade_xml_node_verify_silent (n...
false
false
false
false
false
0
degrees(PG_FUNCTION_ARGS) { float8 arg1 = PG_GETARG_FLOAT8(0); float8 result; result = arg1 * (180.0 / M_PI); CHECKFLOATVAL(result, isinf(arg1), arg1 == 0); PG_RETURN_FLOAT8(result); }
false
false
false
false
false
0
r128_cce_dispatch_flip(struct drm_device *dev) { drm_r128_private_t *dev_priv = dev->dev_private; RING_LOCALS; DRM_DEBUG("page=%d pfCurrentPage=%d\n", dev_priv->current_page, dev_priv->sarea_priv->pfCurrentPage); #if R128_PERFORMANCE_BOXES /* Do some trivial performance monitoring... */ r128_cce_performance...
false
false
false
false
false
0
newSliderValueForX (int x, menuslider_s *s) { float newValue; int newValueInt; FNT_font_t font; int pos; font = FNT_AutoGet( CL_menuFont ); pos = x - (font->width + RCOLUMN_OFFSET + CHASELINK(s->generic.x)) - Menu_GetCtrX(*(s->generic.parent)); newValue = ((float)pos)/((LONGINPUT_SIZE-1)*fo...
false
false
false
false
false
0
updateNotify(callback *callbackArg) { if (!smap && (!hasCapability("IDLE") || noIdle)) { if (callbackArg) callbackArg->success("Ok"); return; } installForegroundTask(smap ? (imapHandler *)new smapIdleHandler(wantIdleMode, callbackArg): new imapIdleHandler(wantIdleMode, callbackArg...
false
false
false
false
false
0
GlyphAttrList(std::vector<Symbol> & vpsym) { for (SymbolTableMap::iterator it = EntriesBegin(); it != EntriesEnd(); ++it) { Symbol psym = it->second; // GetValue(); //Symbol psym = it.GetValue(); if (psym->m_psymtblSubTable) psym->m_psymtblSubTable->GlyphAttrList(vpsym); else if (psym->IsGeneric() &&...
false
false
false
false
false
0
ssd_save_log(struct ssd_device *dev, struct ssd_log *log) { uint32_t off, size; void *internal_log; int ret = 0; mutex_lock(&dev->internal_log_mutex); size = sizeof(struct ssd_log); off = dev->internal_log.nr_log * size; if (off == dev->rom_info.log_sz) { if (dev->internal_log.nr_log == dev->smart.log_info....
false
true
false
false
false
1
vol_rmdir(ventry *ve) { int res; struct volentry *ent = vol_ventry_volentry(ve); res = vol_check_rmdir(ent); if(res < 0) return res; vol_unlink_node(ent); return 0; }
false
false
false
false
false
0
ext2fs_check_desc(ext2_filsys fs) { ext2fs_block_bitmap bmap; errcode_t retval; dgrp_t i; blk_t first_block = fs->super->s_first_data_block; blk_t last_block = fs->super->s_blocks_count-1; blk_t blk, b; int j; EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); retval = ext2fs_allocate_block_bitmap(fs, "check...
false
false
false
false
false
0
fi_gui_file_get_file_url_at_cursor(GtkWidget *unused_widget) { struct fileinfo_data *file; (void) unused_widget; file = fi_gui_get_file_at_cursor(); return file ? fi_gui_file_get_file_url(file) : NULL; }
false
false
false
false
false
0
check_var_entry(Block *bpt, int entry) { if (bpt != NULL) { if(check_var_block(bpt, entry)) return TRUE; if(bpt->inner != NULL) if(check_var_entry(bpt->inner, entry)) return TRUE; if(bpt->next != NULL) if(check_var_entry(bpt->next, entry)) return TRUE; ...
false
false
false
false
false
0
captcha_generate(int showButton){ unsigned int uSeed; const char *zDecoded; char *zCaptcha; if( !captcha_needed() ) return; uSeed = captcha_seed(); zDecoded = captcha_decode(uSeed); zCaptcha = captcha_render(zDecoded); cgi_printf("<div class=\"captcha\"><table class=\"captcha\"><tr><td><pre>\n" ...
false
false
false
false
false
0
Release() { for (current_index = 0; current_index < element_count; current_index++) { data[current_index] = NULL; } if (data) delete [] data; data = NULL; allocated = 0; element_count = 0; current_index = -1; }
false
false
false
false
false
0
insmbkrds( FigureRds, InstanceMbk, Mode, Lynx ) rdsfig_list *FigureRds; phins_list *InstanceMbk; char Mode; char Lynx; { rdsins_list *InstanceRds; rdsrec_list *Rectangle; phfig_list *ModelMbk; long Xins; long Yins; long Xab1; long Xab2; lon...
false
false
false
false
false
0
audit_signal_cb(struct audit_buffer *ab, void *va) { struct common_audit_data *sa = va; if (aad(sa)->request & AA_SIGNAL_PERM_MASK) { audit_log_format(ab, " requested_mask="); audit_signal_mask(ab, aad(sa)->request); if (aad(sa)->denied & AA_SIGNAL_PERM_MASK) { audit_log_format(ab, " denied_mask="); audi...
false
false
false
false
false
0
md5_digest_to_text(guchar digest[16]) { static gchar hex_digits[] = "0123456789abcdef"; gchar *result; gint i; result = g_malloc(33); for (i = 0; i < 16; i++) { result[2*i] = hex_digits[digest[i] >> 4]; result[2*i+1] = hex_digits[digest[i] & 0xf]; } result[32] = '\0'; return result; }
false
false
false
false
false
0
main (int argc, char *argv[]) { tests_start_mpfr (); if (argc > 1) check_large (); check_inexact (); check_special (); test_generic (2, 100, 100); compare_exp2_exp3 (20, 1000); check_worst_cases(); check3("0.0", MPFR_RNDU, "1.0"); check3("-1e-170", MPFR_RNDU, "1.0"); check3("-1e-170", MPFR_R...
false
false
false
false
false
0
cm_pin_read(struct cm_store_entry *entry, enum cm_pin_type pin_type, char **pin) { const char *pinfile, *pinvalue; struct stat st; int fd, l, err; switch (pin_type) { case cm_pin_for_key: pinfile = entry->cm_key_pin_file; pinvalue = entry->cm_key_pin; break; case cm_pin_for_cert: pinfile = entry->cm_key_...
false
true
true
false
true
1
i915_error_state_put(struct i915_error_state_file_priv *error_priv) { if (error_priv->error) kref_put(&error_priv->error->ref, i915_error_state_free); }
false
false
false
false
false
0
init_setSerialNo(void) { oid set_serial_oid[] = { 1, 3, 6, 1, 6, 3, 1, 1, 6, 1 }; /* * If we can't retain the TestAndIncr value across an agent restart, * then it should be initialised to a pseudo-random value. So set it * as such, before registering the config handlers to override this. ...
false
false
false
false
true
1
decode_huff_cw (Huffman h, /*!< pointer to huffman codebook table */ HANDLE_FDK_BITSTREAM hBitBuf, /*!< Handle to Bitbuffer */ int *length) /*!< length of huffman codeword (or NULL) */ { UCHAR bit = 0; SCHAR index = 0; UCHAR bitCount = 0; ...
false
false
false
false
false
0
UI_construct_prompt(UI *ui, const char *object_desc, const char *object_name) { char *prompt = NULL; if (ui->meth->ui_construct_prompt) prompt = ui->meth->ui_construct_prompt(ui, object_desc, object_name); else { char prompt1[] = "Enter "; char prompt2[] = " for "; char prompt3[] = ":"; int len = 0...
false
false
false
false
false
0
parse_smpte_time (const gchar * str, GstRTSPTime * time, GstRTSPTime2 * time2, const gchar * limit) { gint hours, mins, secs; if (str[0] == '\0') { time->type = GST_RTSP_TIME_END; return GST_RTSP_OK; } else { if (sscanf (str, "%2d:%2d:%2d", &hours, &mins, &secs) != 3) return GST_RTSP_EINVAL...
false
false
false
false
false
0
channel_send_autocommands(CHANNEL_REC *channel) { CHANNEL_SETUP_REC *rec; NICK_REC *nick; char **bots, **bot; g_return_if_fail(IS_CHANNEL(channel)); if (channel->session_rejoin) return; rec = channel_setup_find(channel->name, channel->server->connrec->chatnet); if (rec == NULL || rec->autosend...
false
false
false
false
false
0
redisReaderGetReply(redisReader *r, void **reply) { /* Default target pointer to NULL. */ if (reply != NULL) *reply = NULL; /* Return early when this reader is in an erroneous state. */ if (r->err) return REDIS_ERR; /* When the buffer is empty, there will never be a reply. */ i...
false
false
false
false
false
0
test_shift() { List_shift(list, test1); mu_assert(List_first(list) == test1, "Wrong last value."); List_shift(list, test2); mu_assert(List_first(list) == test2, "Wrong last value"); List_shift(list, test3); mu_assert(List_first(list) == test3, "Wrong last value."); mu_assert(List_count(lis...
false
false
false
false
false
0
space_init(gpointer data) { struct space_pak *space=data; g_assert(space != NULL); space->lookup=TRUE; space->spacenum=0; space->lattice=0; space->pointgroup=0; space->cellchoice=0; space->inversion=FALSE; space->order=0; space->spacename=NULL; space->latticename=NULL; space->matrix=NULL; space->offset=NULL; }
false
false
false
false
false
0
do_launch(GAppInfo* appinfo, const char* full_desktop_path, GKeyFile* kf, GList* gfiles, GAppLaunchContext* ctx, GError** err) { gboolean ret = FALSE; char* cmd, *path; char** argv; int argc; gboolean use_terminal; GAppInfoCreateFlags flags; cmd = expand_exec_macros(appinfo, full_desktop_pa...
false
false
false
false
false
0
OpcDoUnicode ( ACPI_PARSE_OBJECT *Op) { ACPI_PARSE_OBJECT *InitializerOp; UINT32 Length; UINT32 Count; UINT32 i; UINT8 *AsciiString; UINT16 *UnicodeString; UINT16 UChar; ...
false
false
false
false
false
0
mktime_from_string (char *date_s, char *time_s) { struct tm tm = {0, }; char **fields; tm.tm_isdst = -1; /* date */ fields = g_strsplit (date_s, "-", 3); if (fields[0] != NULL) { tm.tm_year = atoi (fields[0]) - 1900; tm.tm_mon = atoi (fields[1]) - 1; tm.tm_mday = atoi (fields[2]); } g_strf...
false
false
false
false
true
1
dns_dnssec_keyactive(dst_key_t *key, isc_stdtime_t now) { isc_result_t result; isc_stdtime_t publish, active, revoke, inactive, delete; isc_boolean_t pubset = ISC_FALSE, actset = ISC_FALSE; isc_boolean_t revset = ISC_FALSE, inactset = ISC_FALSE; isc_boolean_t delset = ISC_FALSE; int major, minor; /* Is this an ...
false
false
false
false
false
0
ParseCandidates(SignalingProtocol protocol, const buzz::XmlElement* elem, Candidates* candidates, ParseError* error) { for (const buzz::XmlElement* cand_elem = elem->FirstElement(); cand_elem != NULL; ...
false
false
false
false
false
0
unshare_nsproxy_namespaces(unsigned long unshare_flags, struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs) { struct user_namespace *user_ns; int err = 0; if (!(unshare_flags & (CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC | CLONE_NEWNET | CLONE_NEWPID | CLONE_NEWCGROUP))) return 0;...
false
false
false
false
false
0
ucs2toutf8(buf, ptr, wc) char *buf; int ptr; u_int wc; { if (wc < 0x80) buf[ptr++] = wc; else if (wc < 0x800) { buf[ptr++] = (0xc0 | (wc >> 6)); buf[ptr++] = (0x80 | (wc & 0x3f)); } else { buf[ptr++] = (0xe0 | (wc >> 12)); buf[ptr++] = (0x80 | ((wc >> 6) & 0x3f)); buf[ptr++] = (0x80 | (wc & 0x3f)); } r...
false
false
false
false
false
0
regulator_map_voltage(struct regulator_dev *rdev, int min_uV, int max_uV) { const struct regulator_desc *desc = rdev->desc; if (desc->ops->map_voltage) return desc->ops->map_voltage(rdev, min_uV, max_uV); if (desc->ops->list_voltage == regulator_list_voltage_linear) return regulator_map_voltage_linear(rde...
false
false
false
false
false
0
dvb_manager_real_AddChannelGroup (DVBIDBusManager* base, const gchar* name, gint* channel_group_id, GError** error) { DVBManager * self; gint _vala_channel_group_id = 0; gboolean result = FALSE; DVBdatabaseConfigStore* config = NULL; DVBFactory* _tmp0_ = NULL; DVBFactory* _tmp1_ = NULL; DVBdatabaseConfigStore* _...
false
false
false
false
false
0
charm_snakes(distance) int distance; { register struct monst *mtmp = fmon; int could_see_mon, was_peaceful; while (mtmp) { if (!DEADMONSTER(mtmp) && mtmp->data->mlet == S_SNAKE && mtmp->mcanmove && distu(mtmp->mx, mtmp->my) < distance) { was_peaceful = mtmp->mpeaceful; mtmp->mpeaceful = 1; mtmp->ma...
false
false
false
false
false
0
onUpdShowCurrent(FXObject*sender,FXSelector,void*){ if (GMPlayerManager::instance()->playing() && GMPlayerManager::instance()->getSource()) sender->handle(this,FXSEL(SEL_COMMAND,ID_ENABLE),NULL); else sender->handle(this,FXSEL(SEL_COMMAND,ID_DISABLE),NULL); return 1; }
false
false
false
false
false
0
report_unroll_peel (struct loop *loop, location_t locus) { struct niter_desc *desc; int niters = 0; int report_flags = MSG_OPTIMIZED_LOCATIONS | TDF_RTL | TDF_DETAILS; if (!dump_enabled_p ()) return; /* In the special case where the loop never iterated, emit a different message so that we don't rep...
false
false
false
false
false
0
_win_cancel_cb(void *data __UNUSED__, void *data2 __UNUSED__) { if (win) { e_object_del(E_OBJECT(win)); win = NULL; } }
false
false
false
false
false
0
Clone() { GDALPDFDictionaryRW* poDict = new GDALPDFDictionaryRW(); std::map<CPLString, GDALPDFObject*>& oMap = GetValues(); std::map<CPLString, GDALPDFObject*>::iterator oIter = oMap.begin(); std::map<CPLString, GDALPDFObject*>::iterator oEnd = oMap.end(); for(;oIter != oEnd;++oIter) { c...
false
false
false
false
false
0
testDynamicFactory() { DynamicFactory<Base> dynFactory; dynFactory.registerClass<A>("A"); dynFactory.registerClass<B>("B"); assert (dynFactory.isClass("A")); assert (dynFactory.isClass("B")); assert (!dynFactory.isClass("C")); std::auto_ptr<A> a(dynamic_cast<A*>(dynFactory.createInstance("A"))); std::au...
false
false
false
false
false
0
char2uni(const unsigned char *rawstring, int boundlen, wchar_t *uni) { unsigned char ch, cl; const wchar_t *charset2uni; int n; if (boundlen <= 0) return -ENAMETOOLONG; if (boundlen == 1) { *uni = rawstring[0]; return 1; } ch = rawstring[0]; cl = rawstring[1]; charset2uni = page_charset2uni[ch]; ...
false
false
false
false
false
0
LDLsolve(LDL,b,x) MAT *LDL; VEC *b, *x; { if ( ! LDL || ! b ) error(E_NULL,"LDLsolve"); if ( LDL->m != LDL->n ) error(E_SQUARE,"LDLsolve"); if ( LDL->m != b->dim ) error(E_SIZES,"LDLsolve"); x = v_resize(x,b->dim); Lsolve(LDL,b,x,1.0); Dsolve(LDL,x,x); LTsolve(LDL,x,x,1.0); return x; }
false
false
false
true
false
1
getBasis(ClpSimplex * model) const { int iRow,iColumn; int numberRows = model->numberRows(); int numberColumns = model->numberColumns(); CoinWarmStartBasis basis; basis.setSize(numberColumns,numberRows); if (model->statusExists()) { // Flip slacks int lookupA[]={0,1,3,2,0,2}; for (iRow=0;iRow<nu...
false
false
false
false
false
0
__repmgr_set_incoming_queue_max(dbenv, messages, bulk_messages) DB_ENV *dbenv; u_int32_t messages; u_int32_t bulk_messages; { DB_REP *db_rep; DB_THREAD_INFO *ip; ENV *env; REP *rep; u_int32_t bulkmsgs, msgs; env = dbenv->env; db_rep = env->rep_handle; rep = db_rep->region; ENV_NOT_CONFIGURED( env, db...
false
false
false
false
false
0
apei_resources_sub(struct apei_resources *resources1, struct apei_resources *resources2) { int rc; rc = apei_res_sub(&resources1->iomem, &resources2->iomem); if (rc) return rc; return apei_res_sub(&resources1->ioport, &resources2->ioport); }
false
false
false
false
false
0
getNodeAt(const AbstractNodeList &nodes, int index) { AbstractNodeList::const_iterator i = nodes.begin(); int n = 0; while(i != nodes.end()) { if(n == index) return i; ++i; ++n; } return nodes.end(); }
false
false
false
false
false
0
ntfs_test_inode(struct inode *vi, ntfs_attr *na) { ntfs_inode *ni; if (vi->i_ino != na->mft_no) return 0; ni = NTFS_I(vi); /* If !NInoAttr(ni), @vi is a normal file or directory inode. */ if (likely(!NInoAttr(ni))) { /* If not looking for a normal inode this is a mismatch. */ if (unlikely(na->type != AT_UNU...
false
false
false
false
false
0
__vxge_hw_vpath_mgmt_read( struct __vxge_hw_virtualpath *vpath) { u32 i, mtu = 0, max_pyld = 0; u64 val64; enum vxge_hw_status status = VXGE_HW_OK; for (i = 0; i < VXGE_HW_MAC_MAX_MAC_PORT_ID; i++) { val64 = readq(&vpath->vpmgmt_reg-> rxmac_cfg0_port_vpmgmt_clone[i]); max_pyld = (u32) VXGE_HW_RXMAC...
false
false
false
false
false
0
CQRFreeQuaternion(CQRQuaternionHandle CQR_FAR * quaternion) { if (!quaternion) return CQR_BAD_ARGUMENT; CQR_FREE(*quaternion); *quaternion = NULL; return CQR_SUCCESS; }
false
false
false
false
false
0
CreateEmpty(const sys::Path& FilePath, LLVMContext& C) { Archive* result = new Archive(FilePath, C); return result; }
false
false
false
false
false
0
betterBranch(CbcBranchingObject * thisOne, CbcBranchingObject * /*bestSoFar*/, double changeUp, int numInfUp, double changeDn, int numInfDn) { bool beforeSolution = cbcModel()->getSolutionCount() == ...
false
false
false
false
false
0
on_command_history_size_request(G_GNUC_UNUSED GtkWidget *widget, GtkRequisition *requisition, G_GNUC_UNUSED gpointer gdata) { static gint empty_height; GtkTreeIter iter; if (gtk_tree_model_get_iter_first(command_model, &iter)) requisition->height = empty_height; else empty_height = requisition->height; }
false
false
false
false
false
0
mark_trans (Transaction *trans) { FOR_EACH_SPLIT(trans, mark_split(s)); }
false
false
false
false
false
0
ooh323_digit_end(struct ast_channel *chan, char digit, unsigned int duration) { struct ooh323_pvt *p = (struct ooh323_pvt *) ast_channel_tech_pvt(chan); int res = 0; if (gH323Debug) ast_verb(0, "--- ooh323_digit_end\n"); if (!p) { ast_log(LOG_ERROR, "No private structure for call\n"); return -1; } ast_m...
false
false
false
false
false
0
pcie_pme_handle_request(struct pci_dev *port, u16 req_id) { u8 busnr = req_id >> 8, devfn = req_id & 0xff; struct pci_bus *bus; struct pci_dev *dev; bool found = false; /* First, check if the PME is from the root port itself. */ if (port->devfn == devfn && port->bus->number == busnr) { if (port->pme_poll) p...
false
false
false
false
false
0
filter_activate (GSimpleAction *action, GVariant *parameter, gpointer user_data) { LogviewWindow *logview = user_data; LogviewWindowPrivate *priv = logview->priv; const gchar* action_name, *name; LogviewFilter *filter; GVariant *state_variant; gboolean new_state; state_v...
false
false
false
false
false
0
_rtl8723be_translate_rx_signal_stuff(struct ieee80211_hw *hw, struct sk_buff *skb, struct rtl_stats *pstatus, u8 *pdesc, struct rx_fwinfo_8723be *p_drvinfo) { struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); struct ieee80211_hdr *hdr; u8 *tmp_buf...
false
false
false
false
false
0
lcrt_settings_terminal_on_transparent_value_changed(GtkButton *widget, gpointer user_data) { struct lcrt_settings *lsettings = (struct lcrt_settings *)user_data; struct lcrt_terminal *lterminal; int transparent; transparent = gtk_adjustment_get_value(GTK_ADJUSTMENT(lsettings->t_hl_transparent)); if...
false
false
false
false
false
0
appendChar(char ch, bool canBreakLine) { if (canBreakLine && isInLineBreak) breakLine(); formattedLine.append(1, ch); isImmediatelyPostCommentOnly = false; if (maxCodeLength != string::npos) { updateFormattedLineSplitPoints(ch); testForTimeToSplitFormattedLine(1); } }
false
false
false
false
false
0
build_vfield_ref (tree datum, tree type) { tree vfield, vcontext; if (datum == error_mark_node) return error_mark_node; /* First, convert to the requested type. */ if (!same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (datum), type)) datum = convert_to_base (datum, type, /*check_access=*/false, ...
false
false
false
false
false
0
forceRedraw() { // tell the view to redraw everything if (ride) dataChanged(createIndex(0,0), createIndex(headingsType.count(), ride->dataPoints().count())); }
false
false
false
false
false
0
pkcs11_generate(FILE * outfile, const char *url, gnutls_pk_algorithm_t pk, unsigned int bits, const char *label, int private, int detailed, unsigned int login_flags, common_info_st * info) { int ret; unsigned int flags = 0; gnutls_datum_t pubkey; if (login_flags) flags = login_flags; pkcs11_common(); FIX...
false
false
false
false
false
0
namelist2addrlist(SOCKADDR_LIST *addr_list, NAME_LIST *name_list, char *default_host) { /* recursive implementation to reverse the list */ if(!name_list) return 0; return namelist2addrlist(addr_list, name_list->next, default_host) + name2addrlist(addr_list, name_list->name, default_host); }
false
false
false
false
false
0
vGetNotesInfo(FILE *pFile, const pps_info_type *pPPS, const ULONG *aulBBD, size_t tBBDLen, const ULONG *aulSBD, size_t tSBDLen, const UCHAR *aucHeader, int iWordVersion) { TRACE_MSG("vGetNotesInfo"); fail(pFile == NULL); fail(pPPS == NULL && iWordVersion >= 6); fail(aulBBD == NULL && tBBDLen != 0); fail(aulSBD...
false
false
false
false
false
0
test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl) { hid_t file = -1; /* File ID */ char filename[FILENAME_LEN]; /* Filename to use */ H5F_t *f = NULL; /* Internal file object pointer */ h5_stat_size_t file_size, new_file_size; /* File size */ H5FD_mem_t ty...
false
false
false
false
false
0
blkid_partlist_new_parttable(blkid_partlist ls, const char *type, blkid_loff_t offset) { blkid_parttable tab; tab = calloc(1, sizeof(struct blkid_struct_parttable)); if (!tab) return NULL; tab->type = type; tab->offset = offset; tab->parent = ls->next_parent; INIT_LIST_HEAD(&tab->t_tabs); list_add_tail(...
false
false
false
false
false
0
sober128_export(unsigned char *out, unsigned long *outlen, prng_state *prng) { LTC_ARGCHK(outlen != NULL); LTC_ARGCHK(out != NULL); LTC_ARGCHK(prng != NULL); if (*outlen < 64) { *outlen = 64; return CRYPT_BUFFER_OVERFLOW; } if (sober128_read(out, 64, prng) != 64) { return CRYP...
false
false
false
true
false
1
xprogv(void) { LVAL olddenv,vars,vals,val; /* protect some pointers */ xlstkcheck(2); xlsave(vars); xlsave(vals); /* get the list of variables and the list of values */ vars = xlgetarg(); vars = xleval(vars); vals = xlgetarg(); vals = xleval(vals); /* bind the values to the variab...
false
false
false
false
false
0
LastFirstFunc(unsigned L_idx) { int fIdx(-1); //cerr << "in LastFirstFcn() with L_idx = " << L_idx << endl; unsigned word = m_L->at(L_idx); if((fIdx = F_firstIdx(word)) != -1) { //cerr << "fidx + Rank(" << word << "," << L_idx << ") = " << fIdx << "+" << Rank(word, L_idx) << endl; fIdx += Rank(word, L_i...
false
false
false
false
false
0
copy_nword_const(const char *from, char *to, int len) { char quote; if (!from || !to) return NULL; if ((*from == '\"') || (*from == '\'')) { quote = *(from++); while ((*from != quote) && (*from != 0)) { if ((*from == '\\') && (*(from + 1) != 0)) { ...
false
false
false
false
false
0
gg_svg_parse_circle (struct gg_svg_document *gg_svg_doc, xmlNodePtr node) { /* creating and initializing an SVG Circle struct */ struct gg_svg_circle *circle; struct _xmlAttr *attr; double cx = 0.0; double cy = 0.0; double r = 0.0; attr = node->properties; while (attr) { if (attr->...
false
false
false
false
false
0
lak_result_add( const char *attr, const char *val, LAK_RESULT **ret) { LAK_RESULT *lres; lres = (LAK_RESULT *) malloc(sizeof(LAK_RESULT)); if (lres == NULL) { return LAK_NOMEM; } lres->next = NULL; lres->attribute = strdup(attr); if (lres->attribute == NULL) { lak_result_free(lres); return LAK_NOM...
false
false
false
false
false
0
resource_show(struct device *dev, struct device_attribute *attr, char *buf) { struct resource *res; if (is_namespace_pmem(dev)) { struct nd_namespace_pmem *nspm = to_nd_namespace_pmem(dev); res = &nspm->nsio.res; } else if (is_namespace_io(dev)) { struct nd_namespace_io *nsio = to_nd_namespace_io(dev); ...
false
false
false
false
false
0
af9035_frontend_callback(void *adapter_priv, int component, int cmd, int arg) { struct i2c_adapter *adap = adapter_priv; struct dvb_usb_device *d = i2c_get_adapdata(adap); dev_dbg(&d->udev->dev, "%s: component=%d cmd=%d arg=%d\n", __func__, component, cmd, arg); switch (component) { case DVB_FRONTEND_...
false
false
false
false
false
0
configureSettings() { if (KConfigDialog::showDialog("settings")) { return; } // else it doesn't exist, thus create the dialog KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self()); dialog->setModal(true); di...
false
false
false
false
false
0