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 |
|---|---|---|---|---|---|---|
vprintf(const char* const format, va_list ap) {
char buf2[BUFSIZE];
int n, k;
k = vsnprintf(buf2, BUFSIZE, format, ap);
if (k<=-1 || k>=BUFSIZE) {
fprintf(stderr, "ERROR: buffer too small in MFILE::vprintf()\n");
fprintf(stderr, "ERROR: format: %s\n", format);
fprintf(stderr, "E... | false | false | false | false | false | 0 |
GetMetaIndex(
const uint32_t* const image, int xsize, int bits, int x, int y) {
if (bits == 0) return 0;
return image[xsize * (y >> bits) + (x >> bits)];
} | false | false | false | false | false | 0 |
ath10k_dbg_sta_write_aggr_mode(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct ieee80211_sta *sta = file->private_data;
struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
struct ath10k *ar = arsta->arvif->ar;
u32 aggr_mode;
int ret;
if (kstrt... | false | false | false | false | false | 0 |
___device_cleanup
___P((___device *self),
(self)
___device *self;)
{
___SCMOBJ e;
___device *devs[1];
if (self->group == NULL)
return ___FIX(___UNKNOWN_ERR);
___device_remove_from_group (self);
for (;;)
{
e = ___device_close (self, ___DIRECTION_RD);
if (e == ___FIX(___NO_ERR)... | false | false | false | false | false | 0 |
_ger_get_entry_rights (
Slapi_PBlock *gerpb,
Slapi_Entry *e,
const char *subjectndn,
char **gerstr,
size_t *gerstrsize,
size_t *gerstrcap,
char **errbuf
)
{
unsigned long entryrights = 0;
Slapi_RDN *rdn = NULL;
char *rdntype = NULL;
char *rdnvalue = NULL;
_append_gerstr(gerstr, gerstrsize, gerstrcap, "ent... | false | false | false | false | false | 0 |
is_blacklisted(unsigned int cpu)
{
struct cpuinfo_x86 *c = &cpu_data(cpu);
/*
* Late loading on model 79 with microcode revision less than 0x0b000021
* and LLC size per core bigger than 2.5MB may result in a system hang.
* This behavior is documented in item BDF90, #334165 (Intel Xeon
* Processor E7-8800/480... | false | false | false | false | false | 0 |
ignore_print(int index, IGNORE_REC *rec)
{
GString *options;
char *key, *levels;
key = ignore_get_key(rec);
levels = bits2level(rec->level);
options = g_string_new(NULL);
if (rec->exception) g_string_append(options, "-except ");
if (rec->regexp) {
g_string_append(options, "-regexp ");
#ifdef HAVE_REGEX_H
i... | false | false | false | false | false | 0 |
pci200_set_iface(port_t *port)
{
card_t *card = port->card;
u16 msci = get_msci(port);
u8 rxs = port->rxs & CLK_BRG_MASK;
u8 txs = port->txs & CLK_BRG_MASK;
sca_out(EXS_TES1, (port->chan ? MSCI1_OFFSET : MSCI0_OFFSET) + EXS,
port->card);
switch(port->settings.clock_type) {
case CLOCK_INT:
rxs |= CLK_BRG; /*... | false | false | false | false | false | 0 |
bitsreq() const {
if (v.i & 1)
return 31 ;
return v.p[0] * 31 ;
} | false | false | false | false | false | 0 |
is_trivial(struct isl_sched_node *node, __isl_keep isl_vec *sol)
{
int i;
int pos;
int len;
pos = 1 + node->start + 1 + 2 * (node->nparam + node->rank);
len = 2 * (node->nvar - node->rank);
if (len == 0)
return 0;
for (i = 0; i < len; i += 2)
if (isl_int_ne(sol->el[pos + i], sol->el[pos + i + 1]))
retu... | false | false | false | false | false | 0 |
object_effect(const object_type *o_ptr)
{
if (o_ptr->name1)
return a_info[o_ptr->name1].effect;
else
return k_info[o_ptr->k_idx].effect;
} | false | false | false | false | false | 0 |
zend_hash_index_find(const HashTable *ht, ulong h, void **pData)
{
uint nIndex;
Bucket *p;
IS_CONSISTENT(ht);
nIndex = h & ht->nTableMask;
p = ht->arBuckets[nIndex];
while (p != NULL) {
if ((p->h == h) && (p->nKeyLength == 0)) {
*pData = p->pData;
return SUCCESS;
}
p = p->pNext;
}
return FAILURE;... | false | false | false | false | false | 0 |
get_label_motions( const int id )
{
std::string motion = CONTROL::get_str_motions( id );
return CONTROL::get_label( id ) + ( motion.empty() ? "" : " " ) + motion;
} | false | false | false | false | false | 0 |
connection_vpn_state_changed (NMVPNConnection *connection,
NMVPNConnectionState new_state,
NMVPNConnectionState old_state,
NMVPNConnectionStateReason reason,
gpointer user_data)
{
NMVPNServicePrivate... | false | false | false | false | false | 0 |
__ecereMethod_ProjectView_AddNode(struct __ecereNameSpace__ecere__com__Instance * this, struct ProjectNode * node, struct __ecereNameSpace__ecere__com__Instance * addTo)
{
struct ProjectView * __ecerePointer_ProjectView = (struct ProjectView *)(this ? (((char *)this) + __ecereClass_ProjectView->offset) : 0);
struct __e... | false | false | false | true | false | 1 |
ns__inc(struct soap *soap, enum t__status &status)
{ Factory *factory = (Factory*)soap->user; // get factory from gSOAP environment
if (soap->header)
{ t__counter *counter = factory->counter(soap->header->h__handle);
if (counter)
{ counter->inc();
status = FACTORY_OK;
}
else
status = FAC... | false | false | false | false | false | 0 |
clone(bool /*copyData*/) const
{
//assert (copyData);
OsiSolverLink * newModel = new OsiSolverLink(*this);
return newModel;
} | false | false | false | false | false | 0 |
hpsa_wait_for_mode_change_ack(struct ctlr_info *h)
{
int i;
u32 doorbell_value;
unsigned long flags;
/* under certain very rare conditions, this can take awhile.
* (e.g.: hot replace a failed 144GB drive in a RAID 5 set right
* as we enter this code.)
*/
for (i = 0; i < MAX_MODE_CHANGE_WAIT; i++) {
if (h-... | false | false | false | false | false | 0 |
dump(const void *data_original, const unsigned int*data_processed,unsigned int lng)
{
unsigned int i,j;
unsigned int nbr_line;
unsigned char car;
nbr_line=(lng+0x10-1)/0x10;
for (i=0; (i<nbr_line); i++)
{
printf("%03X: ",i*0x10);
for(j=0; j< 0x10;j++)
{
if(i*0x10+j<lng)
{
car=*((con... | false | false | false | false | false | 0 |
advance (char const **str, gboolean utf8)
{
if (utf8) {
gunichar c;
c = g_utf8_get_char(*str);
*str = g_utf8_next_char(*str);
return unichar_isprint(c) ? mk_wcwidth(c) : 1;
} else {
*str += 1;
return 1;
}
} | true | true | false | false | false | 1 |
SetTrialPrimalVariablesFromStep(Number alpha,
const Vector& delta_x,
const Vector& delta_s)
{
DBG_ASSERT(have_prototypes_);
if (IsNull(trial_)) {
trial_ = iterates_space_->MakeNewIteratesVector(false);
}
SmartPtr<IteratesVector> newvec = trial_->MakeNewContainer();
newvec->crea... | false | false | false | false | false | 0 |
rebuildSSA() {
SSAUpdater Updater;
for (auto *BB : ParentRegion->blocks())
for (BasicBlock::iterator II = BB->begin(), IE = BB->end();
II != IE; ++II) {
bool Initialized = false;
for (auto I = II->use_begin(), E = II->use_end(); I != E;) {
Use &U = *I++;
Instruction *User =... | false | false | false | false | false | 0 |
sn_scalar(void *state, char *token, JsonTokenType tokentype)
{
StripnullState *_state = (StripnullState *) state;
if (_state->skip_next_null)
{
Assert(tokentype == JSON_TOKEN_NULL);
_state->skip_next_null = false;
return;
}
if (tokentype == JSON_TOKEN_STRING)
escape_json(_state->strval, token);
else
a... | false | false | false | false | false | 0 |
eval_exec(const char* path, struct args_t* args, struct args_t* env, struct hexec_buf* buf, struct hexec_expr* e, int* last_exec_status)
{
char* exec_path;
struct args_t exec_args;
struct args_t exec_env;
//hexec_log("eval_exec\n");
hexec_args_init(&exec_args);
hexec_args_init(&exec_env);
for(... | false | false | false | false | false | 0 |
tuplesort_heap_siftup(Tuplesortstate *state, bool checkIndex)
{
SortTuple *memtuples = state->memtuples;
SortTuple *tuple;
int i,
n;
if (--state->memtupcount <= 0)
return;
n = state->memtupcount;
tuple = &memtuples[n]; /* tuple that must be reinserted */
i = 0; /* i is where the "hole" is */
fo... | false | false | false | false | false | 0 |
EvaluateProcActions(
void *theEnv,
struct defmodule *theModule,
EXPRESSION *actions,
int lvarcnt,
DATA_OBJECT *result,
void (*crtproc)(void *))
{
DATA_OBJECT *oldLocalVarArray;
register int i;
struct defmodule *oldModule;
EXPRESSION *oldActions;
oldLocalVarArray = ProceduralPrimitiveData(t... | false | false | false | false | false | 0 |
lhParseOneCell(lhpage *pPage,const unsigned char *zRaw,const unsigned char *zEnd,lhcell **ppOut)
{
sxu16 iNext,iOfft;
sxu32 iHash,nKey;
lhcell *pCell;
sxu64 nData;
int rc;
/* Offset this cell is stored */
iOfft = (sxu16)(zRaw - (const unsigned char *)pPage->pRaw->zData);
/* 4 byte hash number */
SyBigEndianUnp... | false | false | false | false | false | 0 |
inf_user_status_from_string(const gchar* string,
InfUserStatus* status,
GError** error)
{
InfUserStatus tmp_status;
if(strcmp(string, "active") == 0)
tmp_status = INF_USER_ACTIVE;
else if(strcmp(string, "inactive") == 0)
tmp_status = INF_USER_INACTI... | false | false | false | false | false | 0 |
MovePointPower(Real *lim,int points,Real *coords,
Real x,Real y,Real *dx,Real *dy)
{
static int i=0;
Real c,d;
if(y > lim[0] && y < lim[2]) {
if(x <= coords[0]) {
d = coords[1];
}
else if(x >= coords[points-2]) {
d = coords[points-1];
}
else {
i = 1;
while(x ... | false | false | false | false | false | 0 |
write_to_disk(const char *dev, off_t offset, size_t blksz, void *mem,
size_t bytes)
{
unsigned char *mem_buf = NULL;
ssize_t w;
size_t sz;
off_t internal_off;
int fd;
/* Align to block sizes */
internal_off = offset % blksz;
#ifdef DEBUG
printf("offset: %"PRIu64", internal offset: %"PRIu64"\n",
(uint6... | false | true | false | false | true | 1 |
cddb_disc_add_track(cddb_disc_t *disc, cddb_track_t *track)
{
cddb_log_debug("cddb_disc_add_track()");
if (!disc->tracks) {
/* first track on disc */
disc->tracks = track;
} else {
/* next track on disc */
cddb_track_t *t;
t = disc->tracks;
while (t->next) {
... | false | false | false | false | false | 0 |
ipmi_fru_picmg_ext_edit(uint8_t * fru_data,
int off,int len,
struct fru_multirec_header *h,
struct fru_multirec_oem_header *oh)
{
int hasChanged = FALSE;
int start = off;
int offset = start;
int length = len;
offset += sizeof(struct fru_multirec_oem_header);
if(oh->record_id =... | false | false | false | false | false | 0 |
ECCurveParams_dup(const ECCurveParams * params)
{
int res = 1;
ECCurveParams *ret = NULL;
CHECK(ret = (ECCurveParams *) calloc(1, sizeof(ECCurveParams)));
if (params->text != NULL) {
CHECK(ret->text = strdup(params->text));
}
ret->field = params->field;
ret->size = params->size;
if (params->irr != NULL) {
... | false | false | false | false | false | 0 |
setColor(const char * pszColor)
{
if(pszColor)
{
if(strcmp(pszColor,"transparent") == 0)
{
if(!m_bTransColorSet)
{
m_FillType = FG_FILL_TRANSPARENT;
}
m_bColorSet = false;
}
else
{
m_FillType = FG_FILL_COLOR;
m_bColorSet = true;
DELETEP(m_pImage);
DELETEP(m_pGraphic);
}
m_col... | false | false | false | false | false | 0 |
gst_ogm_parse_plugin_init (GstPlugin * plugin)
{
gst_riff_init ();
GST_DEBUG_CATEGORY_INIT (gst_ogm_parse_debug, "ogmparse", 0, "ogm parser");
return gst_element_register (plugin, "ogmaudioparse", GST_RANK_PRIMARY,
GST_TYPE_OGM_AUDIO_PARSE) &&
gst_element_register (plugin, "ogmvideoparse", GST_RANK_... | false | false | false | false | false | 0 |
do_vbackup_init(JCR *jcr)
{
if (!get_or_create_fileset_record(jcr)) {
Dmsg1(dbglevel, "JobId=%d no FileSet\n", (int)jcr->JobId);
return false;
}
apply_pool_overrides(jcr);
if (!allow_duplicate_job(jcr)) {
return false;
}
jcr->jr.PoolId = get_or_create_pool_record(jcr, jcr->pool->... | false | false | false | false | false | 0 |
_get_info(bool clear_old)
{
partition_info_msg_t *partition_msg = NULL;
node_info_msg_t *node_msg = NULL;
block_info_msg_t *block_msg = NULL;
reserve_info_msg_t *reserv_msg = NULL;
List sinfo_list = NULL;
int rc = 0;
if (_query_server(&partition_msg, &node_msg, &block_msg, &reserv_msg,
clear_old))
rc = 1... | false | false | false | false | false | 0 |
scheck(const char *string, const char *format)
{
char *fbuf;
const char *fp;
char *tp;
int c;
const char *result;
char dummy;
result = "";
if (string == NULL || format == NULL)
return result;
fbuf = imalloc((int) (2 * strlen(format) + 4));
if (fbuf == NULL)
return result;
fp = format;
tp = fbu... | false | false | false | false | false | 0 |
pirq_needs_eoi_flag(unsigned irq)
{
struct irq_info *info = info_for_irq(irq);
BUG_ON(info->type != IRQT_PIRQ);
return info->u.pirq.flags & PIRQ_NEEDS_EOI;
} | false | false | false | false | false | 0 |
put_utf16(wchar_t *s, unsigned c, enum utf16_endian endian)
{
switch (endian) {
default:
*s = (wchar_t) c;
break;
case UTF16_LITTLE_ENDIAN:
*s = __cpu_to_le16(c);
break;
case UTF16_BIG_ENDIAN:
*s = __cpu_to_be16(c);
break;
}
} | false | false | false | false | false | 0 |
HandleModifyRageCommand(char* args)
{
if (!*args)
return false;
int32 rage = atoi(args) * 10;
int32 ragem = atoi(args) * 10;
if (rage <= 0 || ragem <= 0 || ragem < rage)
{
SendSysMessage(LANG_BAD_VALUE);
SetSentErrorMessage(true);
return false;
}
Player* ch... | false | false | false | false | false | 0 |
bb_smscconn_sent(SMSCConn *conn, Msg *sms, Octstr *reply)
{
if (sms->sms.split_parts != NULL) {
handle_split(conn, sms, SMSCCONN_SUCCESS);
octstr_destroy(reply);
return;
}
counter_increase(outgoing_sms_counter);
load_increase(outgoing_sms_load);
if (conn) counter_increas... | false | false | false | true | false | 1 |
asm_alloc(WsCompiler *compiler, WsUInt16 type, WsUInt32 line)
{
WsAsmIns *ins = ws_f_calloc(compiler->pool_asm, 1, sizeof(*ins));
if (ins == NULL)
ws_error_memory(compiler);
else {
ins->type = type;
ins->line = line;
}
return ins;
} | false | false | false | false | false | 0 |
check_unsigned(char *tocheck,int which)
{
int i,n;
char ok=1;
n=strlen(tocheck);
for (i=0;i<n;i++)
if (!isdigit((unsigned int)tocheck[i]))
ok=0;
if (!ok) {
fprintf(stderr,"Wrong type of parameter for flag -%c. Has to be an "
"unsigned integer\n",which);
exit(CHECK_OPTION_NOT_UNSIGNED)... | false | false | false | false | false | 0 |
__db_dl_pct(env, msg, value, pct, tag)
ENV *env;
const char *msg, *tag;
u_long value;
int pct;
{
DB_MSGBUF mb;
DB_MSGBUF_INIT(&mb);
/*
* Two formats: if less than 10 million, display as the number, if
* greater than 10 million, round it off and display as ###M.
*/
if (value < 10000000)
__db_msgadd(env... | false | false | false | false | false | 0 |
LI31__ABREAK_POINTSA__debug(V267,V268)
object V267;object V268;
{ VMB29 VMS29 VMV29
goto TTL;
TTL:;
{object V269;
V269= (VFUN_NARGS=4,(*(LnkLI151))((V267),symbol_value(((object)VV[53])),((object)VV[63]),((object)VV[64])));
base[0]= Ct;
base[1]= ((object)VV[65]);
base[2]= (V269);
vs_top=(vs_base=base+0)+3;
Lfo... | false | false | false | false | false | 0 |
getPinLabels(bool & hasLocal) {
hasLocal = false;
QStringList labels;
QList<Connector *> sortedConnectors = sortConnectors();
if (sortedConnectors.count() == 0) return labels;
foreach (Connector * connector, sortedConnectors) {
labels.append(connector->connectorSharedName());
if (!connector->connectorLocalNam... | false | false | false | false | false | 0 |
RequestMatchContent(mp, c1, c2)
MemPool mp;
char *c1, *c2;
{
char *cp;
char *p1, *p2;
bool error;
c1 = MPStrDup(mp, c1);
c2 = MPStrDup(mp, c2);
error = true;
for (cp = c1; *cp != '\0'; cp++)
{
if (*cp == '/')
{
p1 = cp + 1;
*cp = '\0';
error = false;
break;
}
}
... | false | false | false | false | false | 0 |
ccp_alloc_struct(struct device *dev)
{
struct ccp_device *ccp;
ccp = devm_kzalloc(dev, sizeof(*ccp), GFP_KERNEL);
if (!ccp)
return NULL;
ccp->dev = dev;
INIT_LIST_HEAD(&ccp->cmd);
INIT_LIST_HEAD(&ccp->backlog);
spin_lock_init(&ccp->cmd_lock);
mutex_init(&ccp->req_mutex);
mutex_init(&ccp->ksb_mutex);
ccp-... | false | false | false | false | false | 0 |
prompter_method_perform_prompt (GcrSystemPrompter *self,
GDBusMethodInvocation *invocation,
GVariant *parameters)
{
GcrSecretExchange *exchange;
GError *error = NULL;
ActivePrompt *active;
Callback lookup;
const gchar *type;
GVariantIter *iter;
cons... | false | false | false | false | false | 0 |
traverseNextNode(NodeImpl *stayWithin) const
{
if (firstChild() || stayWithin == this)
return firstChild();
else if (nextSibling())
return nextSibling();
else {
const NodeImpl *n = this;
while (n && !n->nextSibling() && (!stayWithin || n->parentNode() != stayWithin))
n = n->parentNode();
if (n)
... | false | false | false | false | false | 0 |
start_update(void) {
isc_result_t result;
dns_rdataset_t *rdataset = NULL;
dns_name_t *name = NULL;
dns_request_t *request = NULL;
dns_message_t *soaquery = NULL;
dns_name_t *firstname;
dns_section_t section = DNS_SECTION_UPDATE;
ddebug("start_update()");
if (answer != NULL)
dns_message_destroy(&answer);
... | false | false | false | false | false | 0 |
ScaDoCheckpoint(
DB_STATS * pDbStats,
F_SuperFileHdl * pSFileHdl,
FFILE * pFile,
FLMBOOL bTruncateRollBackLog,
FLMBOOL bForceCheckpoint,
FLMINT iForceReason,
FLMUINT uiCPFileNum,
FLMUINT uiCPOffset)
{
RCODE rc = FERR_OK;
CP_INFO * pCPInfo = pFile->pCPInfo;
FLMBOOL bWroteAll;
FLM... | false | false | false | false | false | 0 |
initMD(metdata * pmd)
{
int i;
pmd->mi.szName = NULL;
pmd->mi.szFileName = NULL;
pmd->mi.szDescription = NULL;
initMP(&pmd->mpPreCrawford);
for (i = 0; i < 2; i++)
initMP(&pmd->ampPostCrawford[i]);
} | false | false | false | false | false | 0 |
RNG_GetFlagStatus(uint8_t RNG_FLAG)
{
FlagStatus bitstatus = RESET;
/* Check the parameters */
assert_param(IS_RNG_GET_FLAG(RNG_FLAG));
/* Check the status of the specified RNG flag */
if ((RNG->SR & RNG_FLAG) != (uint8_t)RESET)
{
/* RNG_FLAG is set */
bitstatus = SET;
}
else
{
... | false | false | false | false | false | 0 |
book_backend_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
switch (property_id) {
case PROP_CACHE_DIR:
g_value_take_string (
value, e_book_backend_dup_cache_dir (
E_BOOK_BACKEND (object... | false | false | false | false | false | 0 |
simo_combo_box_size_request( GtkWidget *widget, GtkRequisition *req )
{
SimoComboBox *combo_box = SIMO_COMBO_BOX(widget);
//gint width = req->width;
//gint height = req->height;
GtkRequisition breq, ereq, lreq, areq;
// g_print( "ENTER: simo_combo_box_size_request\n" );
// g_print( "before entry width: %... | false | false | false | false | false | 0 |
mark_vtable_entries (tree decl)
{
tree entries = CONSTRUCTOR_ELTS (DECL_INITIAL (decl));
for (; entries; entries = TREE_CHAIN (entries))
{
tree fnaddr = TREE_VALUE (entries);
tree fn;
STRIP_NOPS (fnaddr);
if (TREE_CODE (fnaddr) != ADDR_EXPR
&& TREE_CODE (fnaddr) != FDESC_EXPR)
/* ... | false | false | false | false | false | 0 |
ergo_CSR_destroy(csr_matrix_struct* csr)
{
delete [] csr->rowList;
delete [] csr->elementList;
delete [] csr->columnIndexList;
memset(csr, 0, sizeof(csr_matrix_struct));
return 0;
} | false | false | false | false | false | 0 |
fluid_voice_kill_excl(fluid_voice_t* voice)
{
unsigned int at_tick;
if (!_PLAYING(voice)) {
return FLUID_OK;
}
/* Turn off the exclusive class information for this voice,
so that it doesn't get killed twice
*/
fluid_voice_gen_set(voice, GEN_EXCLUSIVECLASS, 0);
/* Speed up the volume envelope */
/* The... | false | false | false | false | false | 0 |
sfree(STATEQ *sq)
{
STATEQ_ARC *sac, *atmp;
sac=sq->ac;
while(sac) {
atmp = sac->next;
free(sac);
sac = atmp;
}
free(sq->s);
free(sq);
} | false | false | false | false | false | 0 |
clear (void)
{
for (MEMBERS_ITERATOR i (this->members_); !i.done (); i.advance ())
{
Monitor_Base **member = 0;
i.next (member);
(*member)->clear ();
}
} | false | false | false | false | false | 0 |
utest_FetchToken(ESL_BUFFER *bf, int nlines_expected)
{
char msg[] = "utest_FetchToken() failed";
const char sep[] = " \t";
int nlines = 0;
char *tok;
int which;
int nc;
esl_pos_t n;
int status;
while ((status = esl_buffer_FetchToken(bf, sep, &tok, &n)) ==... | false | false | false | true | false | 1 |
check_stats(H5B2_t *bt2, const H5B2_stat_t *expected)
{
H5B2_stat_t actual; /* Actual stats retrieved about v2 B-tree */
/* Get current stats */
if(H5B2_stat_info(bt2, &actual) < 0)
FAIL_STACK_ERROR
if(actual.depth != expected->depth)
TEST_ERROR
if(actual.nrecords != expecte... | false | false | false | false | false | 0 |
mca_sharedfp_sm_get_position(mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE * offset)
{
int ret = OMPI_SUCCESS;
struct mca_sharedfp_base_data_t *sh = NULL;
mca_sharedfp_base_module_t * shared_fp_base_module = NULL;
if(fh->f_sharedfp_data==NULL){
opal_output(1,"share... | false | false | false | false | false | 0 |
print_task(hwloc_topology_t topology,
long pid_number, const char *name, hwloc_bitmap_t cpuset,
char *pidoutput,
int thread)
{
printf("%s%ld\t", thread ? " " : "", pid_number);
if (show_cpuset) {
char *cpuset_str = NULL;
hwloc_bitmap_asprintf(&cpuset_str, cpuset);
printf("%s"... | false | false | false | false | false | 0 |
advance_one_cycle (fence_t fence)
{
unsigned i;
int cycle;
rtx insn;
advance_state (FENCE_STATE (fence));
cycle = ++FENCE_CYCLE (fence);
FENCE_ISSUED_INSNS (fence) = 0;
FENCE_STARTS_CYCLE_P (fence) = 1;
can_issue_more = issue_rate;
FENCE_ISSUE_MORE (fence) = can_issue_more;
for (i = 0; VEC_iterate... | false | false | false | false | false | 0 |
getFinal (const unsigned int n) {
unsigned int d = n, sqsum = 0;
do {
sqsum += (d % 10) * (d % 10);
d /= 10;
} while (d > 0);
if (n > calcmax) {
return calcArr[sqsum];
}
calcArr[n] = (Unknown == calcArr[sqsum])
? getFinal(sqsum)
: c... | false | false | false | false | false | 0 |
view_unfold(struct view *view, position_t offset)
{
position_t next, next2;
size_t fbytes;
Unicode_t ch = view_unicode(view, offset, &next);
if (ch < FOLD_START || ch >= FOLD_END)
return -1;
fbytes = FOLDED_BYTES(ch);
if (view_unicode(view, next + fbytes, &next2) !=
FOLD_END + fbytes)
return -1;
view_d... | false | false | false | false | false | 0 |
gf_m2ts_output_ctrl(GF_ESInterface *_self, u32 ctrl_type, void *param)
{
GF_ESIPacket *esi_pck;
GF_M2TS_Mux_Stream *stream = (GF_M2TS_Mux_Stream *)_self->output_udta;
switch (ctrl_type) {
case GF_ESI_OUTPUT_DATA_DISPATCH:
esi_pck = (GF_ESIPacket *)param;
if (stream->force_new || (esi_pck->flags & GF_ESI_DATA_... | false | true | false | true | false | 1 |
test_basic (void)
{
DConfChangeset *changeset;
gboolean result;
GVariant *value;
gint n_items;
changeset = dconf_changeset_new ();
dconf_changeset_ref (changeset);
dconf_changeset_all (changeset, should_not_run, NULL);
n_items = dconf_changeset_describe (changeset, NULL, NULL, NULL);
g_assert_cmpint ... | false | false | false | false | false | 0 |
qfile_abspath(char *buf, size_t bufsize, const char *path) {
if (bufsize == 0)
return NULL;
if (path[0] == '/') {
qstrcpy(buf, bufsize, path);
} else {
if (getcwd(buf, bufsize) == NULL)
return NULL;
strcat(buf, "/");
strcat(buf, path);
}
qfile_cor... | false | false | false | false | false | 0 |
vwarning (msgid, args)
const char *msgid;
va_list args;
{
int i;
FILE_BUF *ip = NULL;
if (inhibit_warnings)
return;
if (warnings_are_errors)
errors++;
print_containing_files ();
for (i = indepth; i >= 0; i--)
if (instack[i].fname != NULL) {
ip = &instack[i];
break;
... | false | false | false | false | false | 0 |
on_color_feature_clicked (GtkButton *button,
gpointer user_data)
{
if(feature_n>=0) {
GtkWidget *csd=create_colorselectiondialog ();
gtk_widget_show(csd);
gtk_object_set_data(GTK_OBJECT (csd),
"GC", &(features_gc[feature_n+2]));
} el... | false | false | false | false | false | 0 |
gmpc_mpddata_treeview_click_fix (GmpcMpdDataTreeview * self, GdkEventButton * event)
{
#line 1127 "gmpc-mpddata-treeview.c"
#define __GOB_FUNCTION__ "Gmpc:MpdData:Treeview::click_fix"
#line 734 "gmpc-mpddata-treeview.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
#line 734 "gmpc-mpddata-treeview.gob"
g_retur... | false | false | false | false | false | 0 |
static_line (int socket,
char *buffer, char *line, int *available)
{
static char *start;
char *end;
int vacant, copied;
/*******************
* initialize line *
*******************/
strcpy (line, "");
vacant = GAMGI_ENGINE_LINE - 1;
do
{
/********************************
* read from socket into buffer *
... | false | false | false | false | false | 0 |
ipmi_chassis_identify(struct ipmi_intf * intf, char * arg)
{
struct ipmi_rq req;
struct ipmi_rs * rsp;
int rc = (-3);
struct {
uint8_t interval;
uint8_t force_on;
} identify_data = { .interval = 0, .force_on = 0 };
memset(&req, 0, sizeof(req));
req.msg.netfn = IPMI_NETFN_CHASSIS;
req.msg.cmd = 0x4;
if (... | false | false | false | false | false | 0 |
sftp_vany_rmdir(struct sftpjob *job) {
char *path;
if(readonly)
return SSH_FX_PERMISSION_DENIED;
pcheck(sftp_parse_path(job, &path));
D(("sftp_vany_rmdir %s", path));
if(rmdir(path) < 0)
if(errno == EEXIST)
return SSH_FX_DIR_NOT_EMPTY;
else
return HANDLER_ERRNO;
else
return SS... | false | false | false | false | false | 0 |
is_handled_by_aud_tr_if(u32 addr)
{
bool retval = false;
if ((DRXDAP_FASI_ADDR2BLOCK(addr) == 4) &&
(DRXDAP_FASI_ADDR2BANK(addr) > 1) &&
(DRXDAP_FASI_ADDR2BANK(addr) < 6)) {
retval = true;
}
return retval;
} | false | false | false | false | false | 0 |
Composite( uint8_t *image, int width, int height, GdkPixbuf *pix )
{
register uint8_t *p_src, *p_dest;
int src_width = gdk_pixbuf_get_width( pix );
int src_height = gdk_pixbuf_get_height( pix );
int stride = gdk_pixbuf_get_rowstride( pix );
int off_x = ( width - src_width ) / 2;
int off_y = ( height - src_heigh... | false | false | false | false | false | 0 |
catch_signals(func_deadly, func_other)
RETSIGTYPE (*func_deadly)();
RETSIGTYPE (*func_other)();
{
int i;
for (i = 0; signal_info[i].sig != -1; i++)
if (signal_info[i].deadly)
{
#if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION)
struct sigaction sa;
/* Setup to use the alternate s... | false | false | false | false | false | 0 |
slotSetFilterTimeout() //SLOT
{
if ( m_timer->isActive() ) m_timer->stop();
m_timer->setSingleShot( true );
m_timer->start( 180 );
} | false | false | false | false | false | 0 |
free_val_data(struct hive *hdesc, int vkofs)
{
struct vk_key *vkkey;
struct db_key *db;
int len,i,blockofs,blocksize,parts,list;
vkkey = (struct vk_key *)(hdesc->buffer + vkofs);
len = vkkey->len_data;
if (!(len & 0x80000000)) { /* Check for inline, if so, skip it, nothing to do */
if (len > VAL_... | false | false | false | false | false | 0 |
fsp_session_exchange_token_finish (FspSession *self,
GAsyncResult *res,
GError **error)
{
FspDataAuthToken *auth_token = NULL;
g_return_if_fail (FSP_IS_SESSION (self));
g_return_if_fail (G_IS_ASYNC_RESULT (res));
... | false | false | false | false | false | 0 |
ips_readwrite_page5(ips_ha_t * ha, int write, int intr)
{
ips_scb_t *scb;
int ret;
METHOD_TRACE("ips_readwrite_page5", 1);
scb = &ha->scbs[ha->max_cmds - 1];
ips_init_scb(ha, scb);
scb->timeout = ips_cmd_timeout;
scb->cdb[0] = IPS_CMD_RW_NVRAM_PAGE;
scb->cmd.nvram.op_code = IPS_CMD_RW_NVRAM_PAGE;
scb->cmd... | false | false | false | false | false | 0 |
DirName ( const jalib::string& str )
{
size_t len = str.length();
if (str == "/" || str == "." || str.empty())
return str;
if (str == "..")
return ".";
// Remove trailing slashes
while (len > 0 && str[len - 1] == '/') {
len--;
}
size_t lastSlash = str.find_last_of('/', len);
if (lastSla... | false | false | false | false | false | 0 |
inf_gtk_browser_view_get_selected(InfGtkBrowserView* view,
GtkTreeIter* iter)
{
GtkTreeSelection* selection;
g_return_val_if_fail(INF_GTK_IS_BROWSER_VIEW(view), FALSE);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
return gtk_tree_selection_get_selected(select... | false | false | false | false | false | 0 |
fc_lun_reset(struct fc_lport *lport, struct fc_fcp_pkt *fsp,
unsigned int id, unsigned int lun)
{
int rc;
fsp->cdb_cmd.fc_dl = htonl(fsp->data_len);
fsp->cdb_cmd.fc_tm_flags = FCP_TMF_LUN_RESET;
int_to_scsilun(lun, &fsp->cdb_cmd.fc_lun);
fsp->wait_for_comp = 1;
init_completion(&fsp->tm_done);
fc_lun_reset_... | false | false | false | false | false | 0 |
do_lower_jumps(exec_list *instructions, bool pull_out_jumps, bool lower_sub_return, bool lower_main_return, bool lower_continue, bool lower_break)
{
ir_lower_jumps_visitor v;
v.pull_out_jumps = pull_out_jumps;
v.lower_continue = lower_continue;
v.lower_break = lower_break;
v.lower_sub_return = lower_sub_... | false | false | false | false | false | 0 |
ParseAtUnwindOrAtExcept(bool &unwind, bool &except) {
StringRef identifier;
if (getLexer().isNot(AsmToken::At))
return TokError("a handler attribute must begin with '@'");
SMLoc startLoc = getLexer().getLoc();
Lex();
if (getParser().parseIdentifier(identifier))
return Error(startLoc, "expected @unwind... | false | false | false | false | false | 0 |
get_current_tag_name(GeanyDocument *doc, gchar **tagname, guint tag_types)
{
gint line;
gint parent;
line = sci_get_current_line(doc->editor->sci);
parent = sci_get_fold_parent(doc->editor->sci, line);
/* if we're inside a fold level and we have up-to-date tags, get the function from TM */
if (parent >= 0 && doc... | false | false | false | false | false | 0 |
intel_csr_load_program(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
u32 *payload = dev_priv->csr.dmc_payload;
uint32_t i, fw_size;
if (!IS_GEN9(dev)) {
DRM_ERROR("No CSR support available for this platform\n");
return;
}
/*
* FIXME: Firmware gets lost on S3/S4, but not w... | false | false | false | false | false | 0 |
canSample(vector<StochasticNode *> const &snodes)
{
if (snodes.empty())
return false;
for (unsigned int i = 0; i < snodes.size(); ++i) {
if (snodes[i]->isDiscreteValued()) {
return false;
}
/* Check that the bounds (if any) of each node are fixed
We rely on parameter transformation... | false | false | false | false | false | 0 |
sqliteTriggerDeleteStep(Token *pTableName, Expr *pWhere){
TriggerStep *pTriggerStep = sqliteMalloc(sizeof(TriggerStep));
if( pTriggerStep==0 ) return 0;
pTriggerStep->op = TK_DELETE;
pTriggerStep->target = *pTableName;
pTriggerStep->pWhere = pWhere;
pTriggerStep->orconf = OE_Default;
sqlitePersistTrigge... | false | false | false | false | false | 0 |
set_sample (const char *line, DATASET *dset)
{
int nf, new_t1 = dset->t1, new_t2 = dset->t2;
int tmin = 0, tmax = 0;
char newstart[64];
char newstop[64];
if (dset == NULL) {
return E_NODATA;
}
gretl_error_clear();
line += strcspn(line, " ");
line += strspn(line, " ");
nf = c... | false | false | false | false | false | 0 |
DrawTextBlob(Surface *surface, ViewStyle &vsDraw, PRectangle rcSegment,
const char *s, ColourDesired textBack, ColourDesired textFore, bool twoPhaseDraw) {
if (!twoPhaseDraw) {
surface->FillRectangle(rcSegment, textBack);
}
Font &ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font;
int normalCharHeight = ... | false | false | false | false | false | 0 |
copy_file(const std::string & from_path, const std::string & to_path)
{
if (!Glib::file_test (from_path, Glib::FILE_TEST_EXISTS)) return false;
int fd_from = -1;
int fd_to = -1;
char buf[4096]; // BUFSIZ ??
ssize_t nread;
fd_from = ::open(from_path.c_str(), O_RDONLY);
if (fd_from < 0) {
goto copy_error;
}
... | false | false | false | false | false | 0 |
rd_stream_exists(REMDATA_S *rd)
{
if(!rd)
return(0);
switch(rd->type){
case RemImap:
return(rd->t.i.stream ? 1 : 0);
default:
q_status_message(SM_ORDER, 3,5, "rd_stream_exists: type not supported");
break;
}
return(0);
} | false | false | false | false | false | 0 |
setscroll(int top, int bottom)
{
if (top_margin == top && bottom_margin == bottom) return; /* optimization */
#ifdef EMXANSI
bufflush();
#else
if (!set_scroll_region) return;
tpgoto(set_scroll_region, (bottom), (top));
cx = cy = -1; /* cursor position is undefined */
#endif
bottom_margin = bot... | false | false | false | false | false | 0 |
dialog_msg(buff, format, fname)
char_u *buff;
char *format;
char_u *fname;
{
if (fname == NULL)
fname = (char_u *)_("Untitled");
vim_snprintf((char *)buff, IOSIZE, format, fname);
} | 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.