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 |
|---|---|---|---|---|---|---|
referrersFileFor(const Path & path)
{
string baseName = baseNameOf(path);
return (format("%1%/referrer/%2%") % nixDBPath % baseName).str();
} | false | false | false | false | false | 0 |
reiserfs_async_progress_wait(struct super_block *s)
{
struct reiserfs_journal *j = SB_JOURNAL(s);
if (atomic_read(&j->j_async_throttle)) {
int depth;
depth = reiserfs_write_unlock_nested(s);
congestion_wait(BLK_RW_ASYNC, HZ / 10);
reiserfs_write_lock_nested(s, depth);
}
return 0;
} | false | false | false | false | false | 0 |
infix_decode_PC(infix_location *dest, offset thisPC)
{
infix_sequence *n = infix_search_linerefs(thisPC);
if(!n) { /* No sequence point found - return a function */
unsigned i;
if(!infix_routines)
return FALSE;
for(i = 0; i < infix_routinescount; i++) {
if(thisPC >= infix_routines[i].... | false | false | false | false | false | 0 |
printIntListList(list<list<int> > const &l)
{
for(list<list<int> >::const_iterator i=l.begin();i!=l.end();i++)
printIntList(*i);
} | false | false | false | false | false | 0 |
fc_seq_send_ack(struct fc_seq *sp, const struct fc_frame *rx_fp)
{
struct fc_frame *fp;
struct fc_frame_header *rx_fh;
struct fc_frame_header *fh;
struct fc_exch *ep = fc_seq_exch(sp);
struct fc_lport *lport = ep->lp;
unsigned int f_ctl;
/*
* Don't send ACKs for class 3.
*/
if (fc_sof_needs_ack(fr_sof(rx_f... | false | false | false | false | false | 0 |
ecasv_output_init(void)
{
#ifdef ECASV_USE_CURSES
initscr();
erase();
int r=0; // jkc: added r for row indexing here and below
mvprintw(r++, 0, "ecasignalview v%s (%s) -- (C) K.Vehmanen, J.Cunningham", ecatools_signalview_version.c_str(), VERSION);
//mvprintw(r++, 0, "* (C) 1999-2005 Kai Vehmanen, J... | false | false | false | false | false | 0 |
her_set_pdv_according_to_children (struct node *node)
{
short x, children = 0;
for (x = 0; x < BOARDX; x++)
if (node->stack[x] < BOARDY)
children++;
if (children == 0)
fatal_error ("Father without children but of value unknown");
switch (node->type) {
case AND_TYPE:
node->proof = childre... | false | false | false | false | false | 0 |
ContainsOnlyValidKeys(Handle<FixedArray> array) {
int len = array->length();
for (int i = 0; i < len; i++) {
Object* e = array->get(i);
if (!(e->IsString() || e->IsNumber())) return false;
}
return true;
} | false | false | false | false | false | 0 |
skiptoident(OutBuffer *buf, size_t i)
{
while (i < buf->offset)
{ dchar_t c;
size_t oi = i;
if (utf_decodeChar((utf8_t *)buf->data, buf->offset, &i, &c))
/* Ignore UTF errors, but still consume input
*/
break;
if (c >= 0x80)
{
i... | false | false | false | false | false | 0 |
ExtractWarpPositions()
{
if ( !file_loaded )
{
for ( int i = 0; i < num_warp_positions; ++i )
{
jdks_safe_delete_object ( warp_positions[i] );
}
num_warp_positions = 0;
return;
}
Stop();
// delete all our current warp positions
for ( int i =... | false | false | false | false | false | 0 |
vlv_sideband_rw(struct drm_i915_private *dev_priv, u32 devfn,
u32 port, u32 opcode, u32 addr, u32 *val)
{
u32 cmd, be = 0xf, bar = 0;
bool is_read = (opcode == SB_MRD_NP || opcode == SB_CRRDDA_NP);
cmd = (devfn << IOSF_DEVFN_SHIFT) | (opcode << IOSF_OPCODE_SHIFT) |
(port << IOSF_PORT_SHIFT) | (be << IOSF_BY... | false | false | false | false | false | 0 |
launch_location_from_file (NemoFile *file)
{
LaunchLocation *location;
location = g_new (LaunchLocation, 1);
location->file = nemo_file_ref (file);
location->uri = nemo_file_get_uri (file);
return location;
} | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__sys__DualPipe_Tell(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct __ecereNameSpace__ecere__sys__DualPipe * __ecerePointer___ecereNameSpace__ecere__sys__DualPipe = (struct __ecereNameSpace__ecere__sys__DualPipe *)(this ? (((char *)this) + __ecereClass___ecereNameSpa... | false | false | false | true | false | 1 |
kmod_config_add_alias(struct kmod_config *config,
const char *name, const char *modname)
{
struct kmod_alias *alias;
struct kmod_list *list;
size_t namelen = strlen(name) + 1, modnamelen = strlen(modname) + 1;
DBG(config->ctx, "name=%s modname=%s\n", name, modname);
alias = malloc(sizeof(*alias) + namelen +... | false | false | false | false | false | 0 |
xaccAccountStagedTransactionTraversal (const Account *acc,
unsigned int stage,
TransactionCallback thunk,
void *cb_data)
{
AccountPrivate *priv;
GList *split_p;
GList *next;
Transaction *... | false | false | false | false | false | 0 |
appendRange(uint32_t CUOffset, uint64_t LowPC,
uint64_t HighPC) {
if (LowPC >= HighPC)
return;
Endpoints.emplace_back(LowPC, CUOffset, true);
Endpoints.emplace_back(HighPC, CUOffset, false);
} | false | false | false | false | false | 0 |
canon_list_insert (rtx dest ATTRIBUTE_UNUSED, rtx unused1 ATTRIBUTE_UNUSED,
void * v_insn)
{
rtx dest_addr, insn;
int bb;
while (GET_CODE (dest) == SUBREG
|| GET_CODE (dest) == ZERO_EXTRACT
|| GET_CODE (dest) == SIGN_EXTRACT
|| GET_CODE (dest) == STRICT_LOW_PART)
dest = XEXP (dest, 0);... | false | false | false | false | false | 0 |
timestamp_abstime(PG_FUNCTION_ARGS)
{
Timestamp timestamp = PG_GETARG_TIMESTAMP(0);
AbsoluteTime result;
fsec_t fsec;
int tz;
struct pg_tm tt,
*tm = &tt;
if (TIMESTAMP_IS_NOBEGIN(timestamp))
result = NOSTART_ABSTIME;
else if (TIMESTAMP_IS_NOEND(timestamp))
result = NOEND_ABSTIME;
else if (timestam... | false | false | false | false | false | 0 |
writeText( ByteStream & str_out,
const GUTF8String &textUTF8,
const DjVuTXT::Zone &zone,
const int WindowHeight )
{
// DEBUG_MSG( "--zonetype=" << zone.ztype << "\n" );
const GUTF8String xindent(indent( 2 * zone.ztype + 2 ));
GPosition pos=zone.children;
// Build attribute st... | false | false | false | false | false | 0 |
AuXtHandleAudioEvents(XtPointer closure, int *pfd, XtInputId *pinputid)
{
AuServer *aud = (AuServer *) closure;
if (setjmp(AuXtErrorJump))
return;
AuHandleEvents(aud);
} | false | false | false | false | false | 0 |
GetSystemAddress_Old ( __UDPSOCKET__ s, SystemAddress *systemAddressOut )
{
#if defined(__native_client__)
*systemAddressOut = UNASSIGNED_SYSTEM_ADDRESS;
#else
sockaddr_in sa;
memset(&sa,0,sizeof(sockaddr_in));
socklen_t len = sizeof(sa);
if (getsockname__(s, (sockaddr*)&sa, &len)!=0)
{
#if defined(_WIN... | false | false | false | false | false | 0 |
count_alphas (const gchar *str)
{
guint n = 0;
while (g_ascii_isalpha (str[n]))
n++;
return n;
} | false | false | false | false | false | 0 |
csio_do_hello(struct csio_hw *hw, enum csio_dev_state *state)
{
struct csio_mb *mbp;
int rv = 0;
enum fw_retval retval;
uint8_t mpfn;
char state_str[16];
int retries = FW_CMD_HELLO_RETRIES;
memset(state_str, 0, sizeof(state_str));
mbp = mempool_alloc(hw->mb_mempool, GFP_ATOMIC);
if (!mbp) {
rv = -ENOMEM;
... | false | false | false | false | false | 0 |
rebuild_directories(GtkMenuItem * root)
{
static GtkMenuItem *menu_item;
DirtyGtkMenu *menu;
GNode *tree, *child;
gchar *prefix, *old_name;
tree_item *item;
REBUILD_START(_("Directories"), rebuild_directories, directories_timestamp);
add_current_dir_entry(menu);
/* Build the menu. */
... | false | false | false | false | false | 0 |
async_set_pht_entry_from_index(volatile page_hash_table db,
size_t index)
{
while (AO_test_and_set_acquire(&GC_fault_handler_lock) == AO_TS_SET) {
/* empty */
}
/* Could also revert to set_pht_entry_from_index_safe if initial */
/* GC_test_and_set ... | false | false | false | false | false | 0 |
close_all_files (void)
{
register int i, fd_table_size;
fd_table_size = getdtablesize ();
if (fd_table_size > 256)/* clamp to a reasonable value */
fd_table_size = 256;
for (i = 3; i < fd_table_size; i++)
close (i);
} | false | false | false | false | false | 0 |
ipvlan_init_secret(void)
{
net_get_random_once(&ipvlan_jhash_secret, sizeof(ipvlan_jhash_secret));
} | false | false | false | false | false | 0 |
validate_exec_list(struct drm_device *dev,
struct drm_i915_gem_exec_object2 *exec,
int count)
{
unsigned relocs_total = 0;
unsigned relocs_max = UINT_MAX / sizeof(struct drm_i915_gem_relocation_entry);
unsigned invalid_flags;
int i;
invalid_flags = __EXEC_OBJECT_UNKNOWN_FLAGS;
if (USES_FULL_PPGTT(dev))... | false | false | false | false | false | 0 |
startExecution()
{
bool ok = true;
Operation operation = evaluateListElement<Operation>(ok, operations, "operation");
bool force = evaluateBoolean(ok, "force");
if(!ok)
return;
SystemSession systemSession;
switch(operation)
{
case Logout:
if(!systemSession.logout(force))
{
emit executi... | false | false | false | false | false | 0 |
make_random_changes_to_split (Split *split)
{
Transaction *trans;
Timespec *ts;
g_return_if_fail (split);
trans = xaccSplitGetParent (split);
xaccTransBeginEdit (trans);
set_split_random_string (split, xaccSplitSetMemo);
set_split_random_string (split, xaccSplitSetAction);
xaccSplit... | false | false | false | false | false | 0 |
verify_ace_flags(char *flagstr, uint8_t *flagval)
{
char *invalflag;
if (!strcmp(flagstr, "0") || !strcmp(flagstr, "0x0"))
return 0;
if (strstr(flagstr, "0x")) { /* hex flag value */
*flagval = strtol(flagstr, &invalflag, 16);
if (strlen(invalflag)) {
printf("%s: Invalid flags: %s\n", __func__, flagstr);
... | false | false | false | false | false | 0 |
selinux_kernel_create_files_as(struct cred *new, struct inode *inode)
{
struct inode_security_struct *isec = inode->i_security;
struct task_security_struct *tsec = new->security;
u32 sid = current_sid();
int ret;
ret = avc_has_perm(sid, isec->sid,
SECCLASS_KERNEL_SERVICE,
KERNEL_SERVICE__CREATE_FILES_... | false | false | false | false | false | 0 |
setColorBarEnabled( bool on )
{
if ( on != d_data->colorBar.isEnabled )
{
d_data->colorBar.isEnabled = on;
layoutScale();
}
} | false | false | false | false | false | 0 |
cast_change_map_lightlevel(object *op, object *caster, object *spell) {
int success;
if (!op->map)
return 0; /* shouldnt happen */
success = change_map_light(op->map, spell->stats.dam);
if (!success) {
if (spell->stats.dam < 0)
draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_SPE... | false | false | false | false | false | 0 |
display_as_hex(const char *segname,int data_len)
{
if(af_display_as_hex(segname)) return true;
if(data_len==16 && strstr(segname,"md5")) return true;
if(data_len==20 && strstr(segname,"sha1")) return true;
if(opt_x) return true;
if(opt_preview_md5) return true;
return false;
} | false | false | false | false | false | 0 |
init_apm_port(mca_btl_openib_device_t *device, int port, uint16_t lid)
{
int index;
struct mca_btl_openib_module_t *btl;
for(index = 0; index < device->btls; index++) {
btl = (mca_btl_openib_module_t *) opal_pointer_array_get_item(device->device_btls, index);
/* Ok, we already have btl for t... | false | false | false | false | false | 0 |
adummy_open(struct atm_vcc *vcc)
{
short vpi = vcc->vpi;
int vci = vcc->vci;
if (vci == ATM_VCI_UNSPEC || vpi == ATM_VPI_UNSPEC)
return 0;
set_bit(ATM_VF_ADDR, &vcc->flags);
set_bit(ATM_VF_READY, &vcc->flags);
return 0;
} | false | false | false | false | false | 0 |
connman_service_init(void)
{
if (connman == NULL)
return -EINVAL;
if (service_if != NULL)
return 0;
service_if = g_try_malloc0(sizeof(struct connman_service_interface));
if (service_if == NULL)
return -ENOMEM;
service_if->services = g_hash_table_new_full(g_str_hash, g_str_equal,
NULL, service_free)... | false | false | false | false | false | 0 |
albw_2_track(bgav_demuxer_context_t* ctx,
bgav_albw_t * albw,
gavl_metadata_t * global_metadata)
{
int i;
const char * end_pos;
bgav_track_table_t * ret;
bgav_stream_t * s;
gavl_metadata_t track_metadata;
memset(&track_meta... | false | false | false | false | false | 0 |
_vp_tonemask(vorbis_look_psy *p,
float *logfft,
float *logmask,
float global_specmax,
float local_specmax){
int i,n=p->n;
float *seed=alloca(sizeof(*seed)*p->total_octave_lines);
float att=local_specmax+p->vi->ath_adjatt;
for(i=0;i<p->total_octave_lines;i++)seed[i]=NEGINF;
/* set the ATH ... | false | false | false | false | false | 0 |
answer_exec_run(struct ast_dial *dial, struct ast_dial_channel *dial_channel, char *app, char *args)
{
struct ast_channel *chan = dial_channel->owner;
struct ast_app *ast_app = pbx_findapp(app);
/* If the application was not found, return immediately */
if (!ast_app)
return;
/* All is well... execute the appli... | false | false | false | false | false | 0 |
closeEvent(QCloseEvent*e)
{
if (d->shortcuts)
resetKeyboardVars();
Q3PopupMenu::closeEvent(e);
} | false | false | false | false | false | 0 |
fillin_correctly(sasl_interact_t *tlist)
{
while (tlist->id!=SASL_CB_LIST_END)
{
interaction(tlist->id, tlist->prompt,
(void *) &(tlist->result),
&(tlist->len));
tlist++;
}
} | false | false | false | false | false | 0 |
find_init_module(char *buf)
{
const size_t save_len = strlen(buf);
size_t i = save_len;
char *pname; /* pointer to start of __init__ */
struct stat statbuf;
/* For calling case_ok(buf, len, namelen, name):
* /a/b/c/d/e/f/g/h/i/j/k/some_long_module_name.py\0
* ^ ^ ... | false | false | false | false | false | 0 |
u132_roothub_clearportfeature(struct u132 *u132, u16 wValue,
u16 wIndex)
{
if (wIndex == 0 || wIndex > u132->num_ports) {
return -EINVAL;
} else {
int port_index = wIndex - 1;
u32 temp;
struct u132_port *port = &u132->port[port_index];
port->Status &= ~(1 << wValue);
switch (wValue) {
case USB_PORT_FEA... | false | false | false | false | false | 0 |
pv_get_reason(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
{
if(msg==NULL)
return -1;
if(msg->first_line.type != SIP_REPLY)
return pv_get_null(msg, param, res);
return pv_get_strval(msg, param, res, &msg->first_line.u.reply.reason);
} | false | false | false | false | false | 0 |
isInHdrFtr(PT_DocPosition pos) const
{
fl_BlockLayout * pBL = _findBlockAtPosition(pos);
if(pBL == NULL)
{
return false;
}
fl_ContainerLayout * pCL = pBL->myContainingLayout();
while(pCL && ((pCL->getContainerType() != FL_CONTAINER_DOCSECTION)
&& (pCL->getContainerType() != FL_CONTAINER_HDRFTR)
&& (... | false | false | false | false | false | 0 |
sscop_cc_exp(void *user)
{
SSCOP_DSC *dsc = user;
diag(COMPONENT,DIAG_DEBUG,"Timer CC has expired");
dsc->timer_cc = NULL;
switch (dsc->state) {
case sscop_outconn: /* 20.9 */
if (dsc->vt_cc < dsc->cf_max_cc) {
dsc->vt_cc++;
resend_pdu(dsc,dsc->last_bgn);
START_TIMER(cc);
return;
}
... | false | false | false | false | false | 0 |
qpdf_next_warning(qpdf_data qpdf)
{
if (qpdf_more_warnings(qpdf))
{
qpdf->tmp_error.exc = new QPDFExc(qpdf->warnings.front());
qpdf->warnings.pop_front();
QTC::TC("qpdf", "qpdf-c qpdf_next_warning returned warning");
return &qpdf->tmp_error;
}
else
{
return 0;
}
} | false | false | false | false | false | 0 |
ast_cdr_noanswer(struct ast_cdr *cdr)
{
while (cdr) {
if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) {
check_post(cdr);
cdr->disposition = AST_CDR_NOANSWER;
}
cdr = cdr->next;
}
} | false | false | false | false | false | 0 |
ioctl_callback(CURL * handle, int cmd, void *clientp)
{
(void)clientp;
if (cmd == CURLIOCMD_RESTARTREAD ) {
printf("APPLICATION: recieved a CURLIOCMD_RESTARTREAD request\n");
printf("APPLICATION: ** REWINDING! **\n");
current_offset = 0;
return CURLIOE_OK;
}
(void)handle;
return CURLIOE_UNKNOW... | false | false | false | false | false | 0 |
stealarm()
{
register struct monst *mtmp;
register struct obj *otmp;
for(otmp = invent; otmp; otmp = otmp->nobj) {
if(otmp->o_id == stealoid) {
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
if(mtmp->m_id == stealmid) {
if(DEADMONSTER(mtmp)) impossible("stealarm(): dead monster stealing");
if(!dmgt... | false | false | false | false | false | 0 |
init_prng(void) {
int db = 0, bytes, ubytes, fd;
char file[MSZ], dtmp[100];
unsigned int sr;
RAND_file_name(file, MSZ);
rfbLog("RAND_file_name: %s\n", file);
bytes = RAND_load_file(file, -1);
if (db) fprintf(stderr, "bytes read: %d\n", bytes);
ubytes = RAND_load_file("/dev/urandom", 64);
bytes += ubytes;
... | false | false | false | false | false | 0 |
gwy_expr_rectify_token_list(GwyExpr *expr)
{
GwyExprToken *t, *prev;
for (t = expr->tokens; t; ) {
prev = t->prev;
switch (t->token) {
/* convert unary - to negate operation */
case '-':
if (!prev || (prev->token != G_TOKEN_FLOAT
&&... | false | false | false | false | false | 0 |
onPaint(FXObject*,FXSelector,void* ptr){
FXEvent *ev=(FXEvent*)ptr;
FXDCWindow dc(this,ev);
// Draw frame
drawFrame(dc,0,0,width,height);
// Gray background if disabled
if(isEnabled())
dc.setForeground(backColor);
else
dc.setForeground(baseColor);
// Draw background
dc.fillRectangle(border,... | false | false | false | false | false | 0 |
structure_get_new_tree_view (Structure* self, gint pixbuf_col, gint text_col, gint tooltip_col) {
GtkTreeView* result = NULL;
GtkTreeView* tree_view = NULL;
GtkTreeView* _tmp0_ = NULL;
GtkTreeViewColumn* column = NULL;
GtkTreeViewColumn* _tmp1_ = NULL;
GtkCellRendererPixbuf* pixbuf_renderer = NULL;
GtkCellRender... | false | false | false | false | false | 0 |
dblayer_close(struct ldbminfo *li, int dbmode)
{
backend *be = NULL;
ldbm_instance *inst;
Object *inst_obj;
int return_value = 0;
dblayer_pre_close(li);
/*
* dblayer_close_indexes and pDB->close used to be located above loop:
* while(priv->dblayer_thread_count > 0) in pre_close.
... | false | false | false | false | false | 0 |
gnm_func_add (GnmFuncGroup *fn_group,
GnmFuncDescriptor const *desc,
const char *textdomain)
{
static char const valid_tokens[] = "fsbraAES?|";
GnmFunc *func;
char const *ptr;
g_return_val_if_fail (fn_group != NULL, NULL);
g_return_val_if_fail (desc != NULL, NULL);
func = g_new (GnmFunc, 1);
if ... | false | false | false | false | false | 0 |
sb16_audio_output_block(int dev, unsigned long buf, int count,
int intrflag)
{
unsigned long flags, cnt;
sb_devc *devc = audio_devs[dev]->devc;
unsigned long bits;
if (!devc->fullduplex || devc->bits == AFMT_S16_LE)
{
devc->irq_mode = IMODE_OUTPUT;
devc->intr_active = 1;
}
else
{
devc->irq_... | false | false | false | false | false | 0 |
spanmte_destroy(SpanEnum *self)
{
SpanMultiTermEnum *mte = SpMTEn(self);
int i;
if (mte->tpew_pq) pq_destroy(mte->tpew_pq);
for (i = 0; i < mte->tpew_cnt; i++) {
tpew_destroy(mte->tpews[i]);
}
free(mte->tpews);
free(self);
} | false | false | false | false | false | 0 |
Write()
{
this->SetErrorCode(vtkErrorCode::NoError);
// Error checking
if ( this->GetInput() == NULL )
{
vtkErrorMacro(<<"Write:Please specify an input!");
return;
}
if (!this->WriteToMemory && !this->FileName && !this->FilePattern)
{
vtkErrorMacro(<<"Write:Please specify either a FileN... | false | false | false | false | false | 0 |
zmod_mat_col_to_zmod_poly_shifted(zmod_poly_t poly, zmod_mat_t mat, ulong col, ulong * shift)
{
ulong rows = mat->rows;
ulong * ptr;
zmod_poly_fit_length(poly, rows);
for (ulong i = 0, j = 0; j < rows; j++)
{
if (shift[j]) poly->coeffs[j] = 0L;
else
{
ptr = mat->arr[i];
... | false | false | false | false | false | 0 |
ufshcd_clk_scaling_update_busy(struct ufs_hba *hba)
{
struct ufs_clk_scaling *scaling = &hba->clk_scaling;
if (!ufshcd_is_clkscaling_enabled(hba))
return;
if (!hba->outstanding_reqs && scaling->is_busy_started) {
scaling->tot_busy_t += ktime_to_us(ktime_sub(ktime_get(),
scaling->busy_start_t));
scaling-... | false | false | false | false | false | 0 |
GetEMail( bool raw )
{
m_Mutex.Lock();
CString s = sEMail;
if ( (raw == false) && bAntiSpam )
{
s = s.Replace( '@', " [at] " );
s = s.Replace( '.', " [dot] " );
}
m_Mutex.UnLock();
return s;
} | false | false | false | false | false | 0 |
tdb_close(struct tdb_context *tdb)
{
struct tdb_context **i;
int ret = 0;
if (tdb->transaction) {
tdb_transaction_cancel(tdb);
}
tdb_trace(tdb, "tdb_close");
if (tdb->map_ptr) {
if (tdb->flags & TDB_INTERNAL)
SAFE_FREE(tdb->map_ptr);
else
tdb_munmap(tdb);
}
SAFE_FREE(tdb->name);
if (tdb->fd != -1... | false | false | false | false | false | 0 |
list_user(char* userdir, char* udir)
{
int got;
char* at;
struct dirent* de;
DIR* dir;
dir = opendir(userdir);
if (!dir) {
perror("opendir for /var/zxid/idpuid/USER userdir (or other if configured)");
D("failed path(%s)", userdir);
return 4;
}
printf("User dir: %s\n", userdir);
... | false | false | false | false | false | 0 |
vnic_dev_init(struct vnic_dev *vdev, int arg)
{
u64 a0 = (u32)arg, a1 = 0;
int wait = 1000;
int r = 0;
if (vnic_dev_capable(vdev, CMD_INIT))
r = vnic_dev_cmd(vdev, CMD_INIT, &a0, &a1, wait);
else {
vnic_dev_cmd(vdev, CMD_INIT_v1, &a0, &a1, wait);
if (a0 & CMD_INITF_DEFAULT_MAC) {
/* Emulate these for old... | false | false | false | false | false | 0 |
add_signed_terms(__isl_take isl_ast_expr *expr,
__isl_keep isl_aff *aff, int sign, __isl_keep isl_ast_build *build)
{
int i, j;
isl_int v;
enum isl_dim_type t[] = { isl_dim_param, isl_dim_in, isl_dim_div };
enum isl_dim_type l[] = { isl_dim_param, isl_dim_set, isl_dim_div };
isl_local_space *ls;
isl_int_init(v)... | false | false | false | false | false | 0 |
iio_trigger_notify_done(struct iio_trigger *trig)
{
if (atomic_dec_and_test(&trig->use_count) && trig->ops &&
trig->ops->try_reenable)
if (trig->ops->try_reenable(trig))
/* Missed an interrupt so launch new poll now */
iio_trigger_poll(trig);
} | false | false | false | false | false | 0 |
VerifyMeasurementPromise(double *this,struct Promise *pp)
{ struct Attributes a = {{0}};
if (pp->done)
{
if (pp->ref)
{
CfOut(cf_verbose,"","Skipping static observation %s (%s), already done",pp->promiser,pp->ref);
}
else
{
CfOut(cf_verbose,"","Skipping static observation %s, al... | false | false | false | false | false | 0 |
HandleNewLine(const wxString& doc, wxString& output,
const wxString& replaceWith)
{
if ( SkipDecorations(doc) )
{
output += replaceWith;
return true;
}
return false;
} | false | false | false | false | false | 0 |
network_list_callback(GtkTreeSelection *select, gpointer data)
{
GtkTreeModel *model;
GtkTreeIter it;
const char *host;
int port;
char portstr[32];
const struct server *pserver = NULL;
if (!gtk_tree_selection_get_selected(select, &model, &it)) {
return;
}
if (select == meta_selection) {
GtkT... | false | false | false | false | false | 0 |
ARTgetmsgid(qp, id)
register QIOSTATE *qp;
char *id;
{
register char *p;
register char *q;
for (*id = '\0'; (p = QIOread(qp)) != NULL && *p != '\0'; ) {
if (*p != 'M' && *p != 'm')
continue;
if ((q = strchr(p, ' ')) == NULL)
continue;
*q++ = '\0';
if (caseEQ(p, "Message-ID:")) {
... | false | false | false | false | false | 0 |
make_wedge_median(patch_fill_state_t *pfs, wedge_vertex_list_t *l,
wedge_vertex_list_t *l0, bool forth,
const gs_fixed_point *p0, const gs_fixed_point *p1, const gs_fixed_point *pm)
{
int code;
l->last_side = l0->last_side;
if (!l->last_side ^ !forth) {
code = open_wedge_median(pfs,... | false | false | false | false | false | 0 |
_xdr_cp_result (XDR *xdrs, cp_result *objp)
{
bool_t res = xdr_nis_error (xdrs, &objp->cp_status);
if (__builtin_expect (res, TRUE))
{
res = xdr_uint32_t (xdrs, &objp->cp_zticks);
if (__builtin_expect (res, TRUE))
res = xdr_uint32_t (xdrs, &objp->cp_dticks);
}
return res;
} | false | false | false | false | false | 0 |
discard_model_data_item (MODEL *pmod, const char *key,
int free_data)
{
model_data_item *junk = NULL;
int i, targ = 0;
int err = 0;
for (i=0; i<pmod->n_data_items; i++) {
if (!strcmp(key, pmod->data_items[i]->key)) {
junk = pmod->data_items[i];
targ = i;
break;
}
}
if ... | false | false | false | false | false | 0 |
ReplicationSlotRelease(void)
{
ReplicationSlot *slot = MyReplicationSlot;
Assert(slot != NULL && slot->active_pid != 0);
if (slot->data.persistency == RS_EPHEMERAL)
{
/*
* Delete the slot. There is no !PANIC case where this is allowed to
* fail, all that may happen is an incomplete cleanup of the on-disk
... | false | false | false | false | false | 0 |
append_build_string(Clp_BuildString *bs, const char *s, int l)
{
if (l < 0)
l = strlen(s);
if (ENSURE_BUILD_STRING(bs, l)) {
memcpy(bs->pos, s, l);
bs->pos += l;
}
} | false | false | false | false | false | 0 |
uuencode(in, num, out)
unsigned char *in;
int num;
unsigned char *out;
{
int j,i,n,tot=0;
DES_LONG l;
register unsigned char *p;
p=out;
for (j=0; j<num; j+=45)
{
if (j+45 > num)
i=(num-j);
else i=45;
*(p++)=i+' ';
for (n=0; n<i; n+=3)
{
ccc2l(in,l);
*(p++)=((l>>18)&0x3f)+' ';
*(p++)=((l>... | false | false | false | false | false | 0 |
save_arg(argv_buf *abp, char *arg)
{
if (abp->size <= abp->argc) {
if (!abp->argv)
abp->argv = emalloc(sizeof(char *)*(abp->size = 100));
else
abp->argv = erealloc(abp->argv, sizeof(char *)*(abp->size += 100));
}
abp->argv[abp->argc++] = arg;
} | false | false | false | false | false | 0 |
xmmsv_build_dict (const char *firstkey, ...)
{
va_list ap;
const char *key;
xmmsv_t *val, *res;
res = xmmsv_new_dict ();
if (!res)
return NULL;
va_start (ap, firstkey);
key = firstkey;
do {
val = va_arg (ap, xmmsv_t *);
if (!xmmsv_dict_set (res, key, val)) {
xmmsv_unref (res);
res = NULL;
bre... | false | false | false | false | false | 0 |
fixup_uint(void** param)
{
unsigned int ui;
str s;
s.s = (char*)*param;
s.len = strlen(s.s);
if(str2int(&s, &ui)==0)
{
pkg_free(*param);
*param=(void *)(unsigned long)ui;
return 0;
}
LM_ERR("bad number <%s>\n", (char *)(*param));
return E_CFG;
} | false | false | false | false | false | 0 |
dlm_query_nodeinfo_handler(struct o2net_msg *msg, u32 len,
void *data, void **ret_data)
{
struct dlm_query_nodeinfo *qn;
struct dlm_ctxt *dlm = NULL;
int locked = 0, status = -EINVAL;
qn = (struct dlm_query_nodeinfo *) msg->buf;
mlog(0, "Node %u queries nodes on domain %s\n", qn->qn_nodenum,
qn->... | false | false | false | false | false | 0 |
sco_connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
{
int sk;
struct audio_device *dev = user_data;
struct headset *hs = dev->headset;
struct headset_slc *slc = hs->slc;
struct pending_connect *p = hs->pending;
if (err) {
error("%s", err->message);
if (p != NULL) {
p->err = -errno;
if (p... | false | false | false | false | false | 0 |
get_free_logfile(char *logfile){
int suffix=-1;
int len = strlen(logfile)+LOG_OF_MAX_LOG_FILE_NEMBER_PLUS_1;
char *str = (char*) calloc(len,sizeof(char));
if (str == NULL){
fprintf(stderr,"Out of memory allocating free log file name\n");
exit(1);
}
do {
suffix++;
memset(str,0,len);
snprintf(str,... | false | false | false | false | false | 0 |
user_handle_show_list(struct ietadm_req *req)
{
int i, err, retry;
size_t buf_sz = 0;
char *buf;
req->u.acnt.auth_dir = AUTH_DIR_INCOMING;
req->rcmnd = C_ACCT_LIST;
do {
retry = 0;
buf_sz = buf_sz ? buf_sz : ISCSI_NAME_LEN;
buf = calloc(buf_sz, sizeof(char *));
if (!buf) {
fprintf(stderr, "Memory a... | false | false | false | false | false | 0 |
kv_get_vce_boot_level(struct radeon_device *rdev, u32 evclk)
{
u8 i;
struct radeon_vce_clock_voltage_dependency_table *table =
&rdev->pm.dpm.dyn_state.vce_clock_voltage_dependency_table;
for (i = 0; i < table->count; i++) {
if (table->entries[i].evclk >= evclk)
break;
}
return i;
} | false | false | false | false | false | 0 |
get_toggle
(
char *name
)
{
GtkWidget *btn = glade_xml_get_widget(app_xml, name);
return btn ? gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(btn)) : -1;
} | false | false | false | false | false | 0 |
active_packet(p, len)
unsigned char *p;
int len;
{
int proto, i;
struct protent *protp;
if (len < PPP_HDRLEN)
return 0;
proto = PPP_PROTOCOL(p);
#ifdef PPP_FILTER
if (active_filter.bf_len != 0
&& bpf_filter(active_filter.bf_insns, frame, len, len) == 0)
return 0;
#endif
for (i = 0; (... | false | false | false | false | false | 0 |
constRHSGrayShadow(const Rational& c,
const Rational& b,
const Rational& a) {
DebugAssert(c.isInteger() &&
b.isInteger() &&
a.isInteger() &&
b != 0,
"ArithTheoremProducer::constRHSGrayShadow: a, b, c must be ints");
if (b > 0)
return mod(c+b, a);
else
return mod... | false | false | false | false | false | 0 |
vcc_Stv_Wildcard(struct vcc *tl, const struct token *t,
const struct symbol *wcsym)
{
const char *p, *q;
struct var *v = NULL;
struct symbol *sym;
struct stvars *sv;
char stv[1024];
char buf[1024];
(void)wcsym;
assert((t->e - t->b) > strlen(PFX));
assert(!memcmp(t->b, PFX, strlen(PFX)));
p = t->b + strl... | false | false | false | true | false | 1 |
cb_range_destroyed (GtkWidget *w, SheetWidgetAdjustment *swa)
{
GObject *accessible = G_OBJECT (gtk_widget_get_accessible (w));
if (accessible)
g_signal_handlers_disconnect_by_data (swa->adjustment, accessible);
} | false | false | false | false | false | 0 |
vfSize (aso, exp)
Af_key *aso;
Expr exp;
{
int s;
s = af_retnumattr (aso, AF_ATTSIZE) / BLKSIZE;
if (af_retnumattr (aso, AF_ATTSIZE) % BLKSIZE) s++;
return (s == (int) exp->left);
} | false | false | false | false | false | 0 |
Guess()
{
clock_t start, finish;
start = clock();
if (mLevel > STRENGTH_LOW && mGuessCnt == 0 && mRestartCnt == 0)
{
return Row2Ix(FirstGuess());
}
int level = mLevel;
if (level == STRENGTH_HIGH && mPosCnt > 10000)
{
level = STRENGTH_MEDIUM;
}
int i, j;
i... | false | false | false | false | false | 0 |
execute_dwarf2_frame (void)
{
/* The first time we're called, compute the incoming frame state. */
if (cie_cfi_vec == NULL)
create_cie_data ();
dwarf2out_alloc_current_fde ();
create_pseudo_cfg ();
/* Do the work. */
create_cfi_notes ();
connect_traces ();
add_cfis_to_fde ();
/* Free all the... | false | false | false | false | false | 0 |
dragContinue(int xCursor)
{
// clip to histogram extent, which is less than screen extent because of padding
double xScreen = xCursor - m_xScreenOffset;
if (xScreen < ChooserPadding)
xScreen = ChooserPadding;
if (ChooserWidth + ChooserPadding - 1 < xScreen)
xScreen = ChooserWidth + ChooserPadding - 1;
... | false | false | false | false | false | 0 |
_q_mediaStatusChanged(QMediaImageViewer::MediaStatus status)
{
switch (status) {
case QMediaImageViewer::NoMedia:
case QMediaImageViewer::LoadingMedia:
emit q_func()->mediaStatusChanged(status);
break;
case QMediaImageViewer::LoadedMedia:
if (state == QMediaImageViewer::PlayingSt... | false | false | false | false | false | 0 |
UpdateAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
{
return;
}
// Meteor or Plague
if (m_uiSpell1Timer < uiDiff)
{
DoCastSpellIfCan(m_creature->getVictim(), m_uiSpell1);
m_u... | false | false | false | false | false | 0 |
process(const float *const *inputBuffers,
RealTime timestamp)
{
if (m_inputStepSize == 0) {
std::cerr << "PluginBufferingAdapter::process: ERROR: Plugin has not been initialised" << std::endl;
return FeatureSet();
}
FeatureSet allFeatureSets;
if (m... | false | false | false | false | false | 0 |
remove_full(struct kmem_cache *s, struct kmem_cache_node *n, struct page *page)
{
if (!(s->flags & SLAB_STORE_USER))
return;
lockdep_assert_held(&n->list_lock);
list_del(&page->lru);
} | false | false | false | false | false | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.