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 |
|---|---|---|---|---|---|---|
hdump_count(C_word key, int n, int t)
{
HDUMP_BUCKET **bp = hdump_table + hdump_hash(key);
HDUMP_BUCKET *b = *bp;
while(b != NULL) {
if(b->key == key) {
b->count += n;
b->total += t;
return;
}
else b = b->next;
}
b = (HDUMP_BUCKET *)C_malloc(sizeof(HDUMP_BUCKET));
if(b == ... | false | false | false | false | false | 0 |
XPathLookup(const std::string& xpathExpr, const NS& nsList) {
std::list<XMLNode> retlist;
if (node_ == NULL) return retlist;
if (node_->type != XML_ELEMENT_NODE) return retlist;
xmlDocPtr doc = node_->doc;
if (doc == NULL) return retlist;
xmlXPathContextPtr xpathCtx = xmlXPathNewContext(doc);
... | false | false | false | false | false | 0 |
DSDPDataMatGetRowNonzeros(DSDPDataMat A, int nrow, int nmax, int *nz, int *nnz){
int i,info;
DSDPFunctionBegin;
if (A.dsdpops->matrownz){
info=(A.dsdpops->matrownz)(A.matdata,nrow,nz,nnz,nmax); DSDPChkDataError(A,info);
} else {
*nnz=nmax;
for (i=0;i<nmax;i++){
nz[i]++;
}
}
DSDPFunctio... | false | false | false | false | false | 0 |
efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
unsigned int new_mode)
{
if ((enable_wanted != efx->ptp_data->enabled) ||
(enable_wanted && (efx->ptp_data->mode != new_mode))) {
int rc = 0;
if (enable_wanted) {
/* Change of mode requires disable */
if (efx->ptp_data->enabled &&
(... | false | false | false | false | false | 0 |
start_announce(void *datanotused)
{
if (0 == Config.onoff.announce)
return;
if (theOutIcpConnection < 0)
return;
ipcache_nbgethostbyname(Config.Announce.host, send_announce, NULL);
eventAdd("send_announce", start_announce, NULL, (double) Config.Announce.period, 1);
} | false | false | false | false | false | 0 |
f(gint i,gint l,gint m,gdouble A,gdouble B)
{
gint j,jmin,jmax;
gdouble sum=0.0;
jmin = 0;
if(jmin<i-m) jmin =i-m;
jmax = i;
if(jmax>l) jmax = l;
for( j=jmin;j<=jmax;j++)
{
sum += binomial(l,j)*binomial(m,i-j)*
dpn(-A,l-j)*dpn(-B,m-i+j);
}
return sum;
} | false | false | false | false | false | 0 |
equal(const SecAttr &b) const {
try {
const ARexSecAttr& a = (const ARexSecAttr&)b;
return ((id_ == a.id_) && (action_ == a.action_));
} catch(std::exception&) { };
return false;
} | false | false | false | false | false | 0 |
gpk_task_simulate_question (PkTask *task, guint request, PkResults *results)
{
gboolean ret;
GPtrArray *array = NULL;
GpkTaskPrivate *priv = GPK_TASK(task)->priv;
PkRoleEnum role;
PkPackageSack *sack = NULL;
guint inputs;
const gchar *title;
const gchar *message = NULL;
GtkNotebook *tabbed_widget = NULL;
PkBi... | false | false | false | false | false | 0 |
FilterUp(float Imp[], float ImpD[],
int Nwing, boolean Interp,
float *Xp, double Ph, int Inc)
{
float *Hp, *Hdp = NULL, *End;
fast_float a = 0;
fast_float v, t;
double exact_index = Ph * Npc;
long index = (long) exact_index; /* convert fraction to filter in... | false | false | false | false | false | 0 |
OnUnderlineChanged (unsigned underline)
{
switch (underline) {
default:
m_Underline = gccv::TextDecorationNone;
break;
case 1:
m_Underline = gccv::TextDecorationDefault;
break;
case 2:
m_Underline = gccv::TextDecorationDouble;
break;
case 3:
m_Underline = gccv::TextDecorationLow;
break;
}
BuildTa... | false | false | false | false | false | 0 |
ConvertToInterpolationCoefficients(double *c, long DataLength, double *z, long NbPoles, double Tolerance) {
double Lambda = 1;
long n, k;
// special case required by mirror boundaries
if(DataLength == 1L) {
return;
}
// compute the overall gain
for(k = 0L; k < NbPoles; k++) {
Lambda = Lambda * (1.0 - z[k]) ... | false | false | false | false | false | 0 |
mwa_setn_note(request_rec *r,
const char *prefix,
const char *name,
const char *valfmt,
...)
{
const char *note;
char *val;
va_list ap;
request_rec *top = get_top(r);
note = name ? apr_pstrcat(top->pool, prefix, name, NULL) : prefix;
va_s... | false | false | false | false | false | 0 |
creat64(const char * a, mode_t mode)
{
int fd;
if (initialize_functions())
{
errno=ENOMEM;
return -1;
}
if(!getenv("COWDANCER_IGNORE"))
{
debug_cowdancer_2 ("creat64", a);
if (check_inode_and_copy(a,1))
{
errno=ENOMEM;
return -1;
}
}
fd = origlibc_... | false | false | false | false | true | 1 |
getCell(char *name)
{
chain_list* chain;
cell_list* cell;
for (chain=CELLS; chain; chain=chain->NEXT) {
for (cell=(cell_list*) chain->DATA; cell; cell=cell->NEXT) {
if (cell->NAME==name) return cell;
}
}
return NULL;
} | false | false | false | false | false | 0 |
unicsv_adjust_time(const time_t time, time_t *date)
{
time_t res = time;
if (date) {
res += *date;
}
if (opt_utc) {
res += atoi(opt_utc) * SECONDS_PER_HOUR;
} else {
struct tm tm = *gmtime(&res);
res = mklocaltime(&tm);
}
return res;
} | false | false | false | false | false | 0 |
run()
{
bool silent = false;
while ( (!isDone()) && (!SrvTransMgr().isDone()) ) {
if (serviceShutdown)
SrvTransMgr().shutdown();
SrvTransMgr().doDuties();
unsigned int timeout = SrvTransMgr().getTimeout();
if (timeout == 0) timeout = 1;
if (serviceShutdown) timeout = 0;
if (!silen... | false | false | false | false | false | 0 |
TCSP_PhysicalEnable_Internal(TCS_CONTEXT_HANDLE hContext) /* in */
{
UINT64 offset = 0;
TSS_RESULT result;
UINT32 paramSize;
BYTE txBlob[TSS_TPM_TXBLOB_SIZE];
LogDebug("Entering Physical Enable");
if ((result = ctx_verify_context(hContext)))
return result;
if ((result = tpm_rqu_build(TPM_ORD_PhysicalEnable, ... | false | false | false | false | false | 0 |
AppendSQLTextField(std::string &Dest, const char* source)
{
const char* start (source);
const long length( strlen(source) );
ESCAPE_STRING(mysql, start, length);
} | false | false | false | false | false | 0 |
selectionChangedX (const QItemSelection &sel, const QItemSelection &desel)
{
int k=0;
foreach (QStandardItem*w, wptList) {
QModelIndex idx = model->indexFromItem(w);
if (desel.contains(idx))
mapWidget->setWaypointColorBlue(k);
if (sel.contains(idx))
mapWidget->setWaypointColorRed(k);
k+... | false | false | false | false | false | 0 |
gf_svg_get_attribute_name(GF_Node *node, u32 tag)
{
u32 i, count, ns;
//ns = gf_sg_get_namespace_code(node->sgprivate->scenegraph, NULL);
ns = gf_xml_get_element_namespace(node);
count = sizeof(xml_attributes) / sizeof(struct xml_att_def);
for (i=0; i<count; i++) {
if (xml_attributes[i].tag==tag) {
char *xml... | false | false | false | false | false | 0 |
hashvalue(char seed, attrib1_t * attrib, char * fingerprint)
{
MM_VSTRING upper;
attrib1_t * a;
PK11Context *context;
unsigned int fgLen;
context = PK11_CreateDigestContext(SEC_OID_MD5);
if (context != NULL) {
PK11_DigestBegin(context);
PK11_DigestOp(context, (unsigned char *)&seed, 1);
... | false | false | false | false | false | 0 |
getPlayerStrength( GameMap* gamemap )
{
ASCString message;
for ( int i = 0; i< gamemap->getPlayerCount(); ++i ) {
double strength = 0;
Resources r;
Resources total;
for ( Player::VehicleList::iterator j = gamemap->player[i].vehicleList.begin(); j != gamemap->player[i].vehicleList.end(); ++... | false | false | false | false | false | 0 |
utest_Serialize(ESL_RANDOMNESS *rng, int ntrials, int N)
{
char msg[] = "utest_Serialize failed";
P7_ALIDISPLAY *ad = NULL;
P7_ALIDISPLAY *ad2 = NULL;
int trial;
for (trial = 0; trial < ntrials; trial++)
{
if ( create_faux_alidisplay(rng, N, &ad) != eslOK) esl_fatal(msg);
if ( (... | false | false | false | false | false | 0 |
notice_special_calls (gimple call)
{
int flags = gimple_call_flags (call);
if (flags & ECF_MAY_BE_ALLOCA)
cfun->calls_alloca = true;
if (flags & ECF_RETURNS_TWICE)
cfun->calls_setjmp = true;
} | false | false | false | false | false | 0 |
mode_add_sorted(IRC_SERVER_REC *server, GString *str,
char mode, const char *arg, int user)
{
char *p;
int updating, argpos = 0;
/* check that mode isn't already set */
if ((!user && !HAS_MODE_ARG_SET(server, mode)) &&
mode_is_set(str->str, mode))
return;
updating = FALSE;
for (p = str->str; *p !=... | false | false | false | false | false | 0 |
acceptHandler(Widget w, GLXConfigurator *obj, XtPointer callData) {
// Check if a renderer was selected, if not, don't accept
if(!obj->mRenderer)
return;
obj->accept = true;
obj->Exit();
} | false | false | false | false | false | 0 |
gfs_cell_copy (const FttCell * from,
FttCell * to,
GfsDomain * domain)
{
GfsSolidVector * solid;
GfsStateVector * froms, * tos;
g_return_if_fail (from != NULL);
g_return_if_fail (to != NULL);
g_return_if_fail (from != to);
g_return_if_fail (domain != NULL);
froms = GFS_STATE (from);
tos... | false | true | false | false | false | 1 |
set_delimiter(char **slot, const char *string)
{
if (*slot)
free_str(*slot);
if (*string == '\0')
*slot = 0;
else
*slot = str_dup(string);
} | false | false | false | false | false | 0 |
main(int argc, char* argv[])
{
int return_value = 0;
int i;
int runs = 0;
char* filename = "test.txt";
int timeout = 15;
int todo = 0;
struct timeval now;
struct timeval last_time;
int do_stop = 0;
int beat_val;
int only_write = 0;
DENTER_MAIN(TOP_LAYER, "test_sge_qmaster_heartbe... | false | false | false | false | false | 0 |
hash_ipv4(struct sockaddr *saddr, int bits)
{
struct sockaddr_in *addr = (struct sockaddr_in *) saddr;
if(bits != 0)
{
unsigned long av = ntohl(addr->sin_addr.s_addr) & ~((1 << (32 - bits)) - 1);
return (av ^ (av >> 12) ^ (av >> 24)) & (ATABLE_SIZE - 1);
}
return 0;
} | false | false | false | false | false | 0 |
gst_base_src_prepare_allocation (GstBaseSrc * basesrc, GstCaps * caps)
{
GstBaseSrcClass *bclass;
gboolean result = TRUE;
GstQuery *query;
GstBufferPool *pool = NULL;
GstAllocator *allocator = NULL;
GstAllocationParams params;
bclass = GST_BASE_SRC_GET_CLASS (basesrc);
/* make query and let peer pad a... | false | false | false | false | false | 0 |
resetDisplay(void) {
int retval = 0;
if (duplicate_action[ActionZoom]) {
for (connectionIterator i = otherimview.begin() ; i != otherimview.end() ; ++i) {
*((*i)->stream) << "reset" << endl;
retval = getresponse((*i)->stream);
}
} else
retval = 1;
return... | false | false | false | false | false | 0 |
read(dimeInput * const file)
{
int32 groupcode;
dimeRecord *record = NULL;
bool ok = true;
dimeMemHandler *memh = file->getMemHandler();
do {
if (!file->readGroupCode(groupcode)) {ok = false; break;}
if (groupcode == 70) {
if (!file->readInt16(this->maxEntries)) {ok = false; break;}
}
... | false | false | false | false | false | 0 |
readps2(int fd)
{
char ch;
while(read(fd,&ch,1) && (ch==(char)0xfa || ch==(char)0xaa))
{
fprintf(stderr,"<%02X>",ch&0xff);
fflush(stdout);
}
return(ch);
} | false | false | false | false | false | 0 |
bf_init()))()
{
int i;
/*
* Initialize lists.
*/
bfhp = ah_init(BFNEV, sizeof(struct bfevent), NOTEVENT, 0);
/*
* Initialize limits, filters and flags.
*/
maxspace = BFDEFSPACE;
nspace = 0;
filter = DLCTL;
if (maxspace >= MAXNMSGLEN) {
filter = 0;
}
seqcurr = 0;
seqlen = BFSEQLEN;
seqmax = BFSEQLEN ... | false | true | false | false | true | 1 |
mca_coll_tuned_alltoall_intra_basic_inplace(void *rbuf, int rcount,
struct ompi_datatype_t *rdtype,
struct ompi_communicator_t *comm,
mca_coll_base_module_t *module)
{
mca_coll_tuned_m... | false | false | false | false | false | 0 |
Despawn1Object(MapPersistentState& mapState, uint32 guid)
{
if (CreatureData const* data = sObjectMgr.GetCreatureData(guid))
{
// for non-instanceable maps pool spawn can be at different map from provided mapState
if (MapPersistentState* dataMapState = mapState.GetMapId() == data->mapid ? &mapSt... | false | false | false | false | false | 0 |
nouveau_abi16_get(struct drm_file *file_priv)
{
struct nouveau_cli *cli = nouveau_cli(file_priv);
mutex_lock(&cli->mutex);
if (nouveau_abi16(file_priv))
return cli->abi16;
mutex_unlock(&cli->mutex);
return NULL;
} | false | false | false | false | false | 0 |
_handle_uint16(s_p_values_t *v,
const char *value, const char *line, char **leftover)
{
if (v->data_count != 0) {
error("%s specified more than once, latest value used",
v->key);
xfree(v->data);
v->data_count = 0;
}
if (v->handler != NULL) {
/* call the handler function */
int rc;
rc = v->h... | false | false | false | false | false | 0 |
get_directive_list_dir(Directive *dir_head, Directive_id id)
{
List *head = NULL;
Directive *dir;
for (dir = dir_head; dir != NULL; dir = dir->next) {
if (dir->func->id == id) {
head = list_append(head, dir);
}
}
return head;
} | false | false | false | false | false | 0 |
UNLYOKOSync(void) {
setmirror((mode & 1) ^ 1);
setchr2(0x0000, reg[3]);
setchr2(0x0800, reg[4]);
setchr2(0x1000, reg[5]);
setchr2(0x1800, reg[6]);
if (mode & 0x10) {
uint32 base = (bank & 8) << 1;
setprg8(0x8000, (reg[0] & 0x0f) | base);
setprg8(0xA000, (reg[1] & 0x0f) | base);
setprg8(0xC000, (... | false | false | false | false | false | 0 |
sbe_calloc( unsigned nelem, unsigned elsize )
{
switch( out_lang_tag ){
case LANG_FORTRAN:
return fsbe_calloc( nelem, elsize );
case LANG_C:
return csbe_calloc( nelem, elsize );
default:
break;
}
return NULL;
} | false | false | false | false | false | 0 |
city_dialog_update_improvement_list(struct city_dialog *pdialog)
{
int total, item, targets_used;
struct universal targets[MAX_NUM_PRODUCTION_TARGETS];
struct item items[MAX_NUM_PRODUCTION_TARGETS];
GtkTreeModel *model;
GtkListStore *store;
model =
gtk_tree_view_get_model(GTK_TREE_VIEW(pdialog->overvie... | false | false | false | false | false | 0 |
PointInRect(RECT *prc, POINT pt)
{
if (pt.x < prc->left)
return 0;
if (pt.x > prc->right)
return 0;
if (pt.y < prc->top)
return 0;
if (pt.y > prc->bottom)
return 0;
return 1;
} | false | false | false | false | false | 0 |
grow_dirent_delete( struct grow_dirent *d )
{
struct grow_dirent *n;
while(d) {
if(d->name) free(d->name);
if(d->linkname) free(d->linkname);
grow_dirent_delete(d->children);
n = d->next;
free(d);
d = n;
}
} | false | false | false | false | false | 0 |
get_one_option(op_key* lkey, GLEPcode& pcode, int plen) throw(ParserError) {
// switches int placed in directly, 1 present, 0 not present
// expressions LONG* pointed to, 0 if not present.
// color/fill LONG* Pointer to exp 0 if not present.
// marker LONG* Pointer to exp 0 if not present.
// lstyle LONG* Pointer... | false | false | false | false | false | 0 |
inf_adopted_user_set_vector(InfAdoptedUser* user,
InfAdoptedStateVector* vec)
{
InfAdoptedUserPrivate* priv;
g_return_if_fail(INF_ADOPTED_IS_USER(user));
g_return_if_fail(vec != NULL);
priv = INF_ADOPTED_USER_PRIVATE(user);
inf_adopted_state_vector_free(priv->vector);
priv->ve... | false | false | false | false | false | 0 |
write_binary_amount(std::ostream& out, const amount_t& amt)
{
if (amt.commodity_)
write_binary_long(out, amt.commodity_->ident);
else
write_binary_long<commodity_t::ident_t>(out, 0xffffffff);
amt.write_quantity(out);
} | false | false | false | false | false | 0 |
openDatabaseFile(QString fname, bool utf8)
{
QFileInfo fi = QFileInfo(fname);
fname = fi.canonicalFilePath();
/* Check if the database isn't already open */
for(int i = 0; i < m_databases.count(); i++)
{
if(m_databases[i]->database()->filename() == fname)
{
if(m_database... | false | false | false | false | false | 0 |
fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
unsigned int fmt, int fsl_dir)
{
struct fsl_sai *sai = snd_soc_dai_get_drvdata(cpu_dai);
bool tx = fsl_dir == FSL_FMT_TRANSMITTER;
u32 val_cr2 = 0, val_cr4 = 0;
if (!sai->is_lsb_first)
val_cr4 |= FSL_SAI_CR4_MF;
/* DAI mode */
switch (fmt & SND_SOC_DAIFM... | false | false | false | false | false | 0 |
recvtimeout (int wp)
{
int oldrtmo = rep->rtmo;
rep->rtmo = (wp < 0) ? -1: wp;
return oldrtmo;
} | false | false | false | false | false | 0 |
parsemouse(char *tline)
{
struct mousefunc *f = NULL;
int len;
int n;
int b;
char *ptr,*start,*end,*tmp;
f = (struct mousefunc *)safemalloc(sizeof(struct mousefunc));
memset(f, 0, sizeof(struct mousefunc));
/* skip spaces */
while(isspace((unsigned char)*tline)&&(*tline != '\n')&&(*tline != 0))
... | false | true | false | false | false | 1 |
ucs4_str_width(UCS *ucsstr)
{
unsigned width = 0;
int w;
if(ucsstr)
while(*ucsstr){
w = wcellwidth(*ucsstr++);
if(w != U4W_CTLSRGT)
width += (w < 0 ? 1 : w);
}
return width;
} | false | false | false | false | false | 0 |
FindNextLevel(void)
{
lump_t *cur;
if (wad.current_level)
cur = wad.current_level->next;
else
cur = wad.dir_head;
while (cur && ! (cur->lev_info && ! (cur->lev_info->flags & LEVEL_IS_GL)))
cur=cur->next;
wad.current_level = cur;
return (cur != NULL);
} | false | false | false | false | false | 0 |
CylinderLocalSupportX(const btVector3& halfExtents,const btVector3& v)
{
const int cylinderUpAxis = 0;
const int XX = 1;
const int YY = 0;
const int ZZ = 2;
//mapping depends on how cylinder local orientation is
// extents of the cylinder is: X,Y is for radius, and Z for height
btScalar radius = halfExtents[XX];... | false | false | false | false | false | 0 |
init (char *aout) {
char *s1, *s2, c;
int k;
#ifdef FEATURE_WIN32
extern HANDLE hinstance;
char buf[260];
#endif
#ifdef LEFTYDATADIR
char *leftdatadir = LEFTYDATADIR;
#else
char *leftdatadir = NULL;
#endif
c = 0;
if (getenv ("INNETSCAPE"))
innetscape = TRUE, nswin = gete... | false | false | false | false | false | 0 |
addAssociatedWidget(QWidget * widget)
{
if (!d->associatedWidgets.contains(widget)) {
widget->addActions(actions());
d->associatedWidgets.append(widget);
connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(_k_associatedWidgetDestroyed(QObject*)));
}
} | false | false | false | false | false | 0 |
plog_question(int level, char *module, char *msg, dns_msg_question_t *q, int category)
{
char *catstr = "";
if (category >= DNS_CACHE_IZL_BASE)
catstr = "(internal/zonelocal)";
plog(level, "%s: %s: \"%s\" %s %s %s",
module, msg,
q->mq_name,
dns_proto_class_string(q->mq_c... | false | false | false | false | false | 0 |
Destroy(Widget w)
#else
static void Destroy(w)
Widget w;
#endif
{
XmtLayoutBoxGadget lb = (XmtLayoutBoxGadget)w;
Widget child;
if (lb->layout_box.gc) XtReleaseGC(w, lb->layout_box.gc);
/*
* we destroy anything within this box. This seems as reasonable
* a thing to do as moving those widgets... | false | false | false | false | false | 0 |
staticSolve(int iterations)
{
for(int isolve=0;isolve<iterations;++isolve)
{
for(int iseq=0;iseq<m_cfg.m_psequence.size();++iseq)
{
getSolver(m_cfg.m_psequence[iseq])(this,1,0);
}
}
} | false | false | false | false | false | 0 |
showed_message_cb (GtrTab * tab, GtrMsg * msg, GtrWindow * window)
{
const gchar *msgid;
GRegex *regex;
GMatchInfo *match_info;
gchar *word;
gint i;
g_slist_free_full (params, g_free);
params = NULL;
g_slist_free_full (tags, g_free);
tags = NULL;
/*
* If we show another message we have to resta... | false | false | false | false | false | 0 |
fd_set_listeners(const struct Listener_head *listeners, fd_set *fds, int max) {
struct Listener *iter;
SLIST_FOREACH(iter, listeners, entries) {
if (iter->sockfd > (int)FD_SETSIZE) {
syslog(LOG_WARNING, "File descriptor > than FD_SETSIZE\n");
break;
}
FD_SET(ite... | false | false | false | false | false | 0 |
cram(const char *challenge_64, const char *user, const char *pass)
{
int i, resp_len, encoded_len, decoded_len;
HMAC_CTX hmac;
unsigned char hash[16];
char hex[33];
char *response, *response_64, *challenge;
/*
* length of challenge_64 (i.e. base-64 encoded string) is a good
* enough upper bound for challenge... | false | false | false | false | false | 0 |
page_move_anon_rmap(struct page *page,
struct vm_area_struct *vma, unsigned long address)
{
struct anon_vma *anon_vma = vma->anon_vma;
VM_BUG_ON_PAGE(!PageLocked(page), page);
VM_BUG_ON_VMA(!anon_vma, vma);
VM_BUG_ON_PAGE(page->index != linear_page_index(vma, address), page);
anon_vma = (void *) anon_vma + PAGE... | false | false | false | false | false | 0 |
iscsit_access_np(struct iscsi_np *np, struct iscsi_portal_group *tpg)
{
int ret;
/*
* Determine if the network portal is accepting storage traffic.
*/
spin_lock_bh(&np->np_thread_lock);
if (np->np_thread_state != ISCSI_NP_THREAD_ACTIVE) {
spin_unlock_bh(&np->np_thread_lock);
return -1;
}
spin_unlock_bh(&n... | false | false | false | false | false | 0 |
gli_stream_open_pathname(char *pathname, int textmode,
glui32 rock) {
frefid_t fileref;
strid_t stream;
glui32 fmode = filemode_Read;
fileref = glk_fileref_create_by_name(fileusage_Data | fileusage_BinaryMode, pathname, rock);
if (!fileref) {
printf("DEBUG: Couldn't cre... | false | false | false | false | false | 0 |
clutter_rect_inset (ClutterRect *rect,
float d_x,
float d_y)
{
g_return_if_fail (rect != NULL);
clutter_rect_normalize_internal (rect);
rect->origin.x += d_x;
rect->origin.y += d_y;
if (d_x >= 0.f)
rect->size.width -= (d_x * 2.f);
else
rect->s... | false | false | false | false | false | 0 |
arrayCopy(l_uint8 *datas,
size_t size)
{
l_uint8 *datad;
PROCNAME("arrayCopy");
if (!datas)
return (l_uint8 *)ERROR_PTR("datas not defined", procName, NULL);
if ((datad = (l_uint8 *)CALLOC(size, sizeof(l_uint8))) == NULL)
return (l_uint8 *)ERROR_PTR("datad not made", procNa... | false | true | false | false | false | 1 |
_frogr_picture_dispose (GObject* object)
{
FrogrPicturePrivate *priv = FROGR_PICTURE_GET_PRIVATE (object);
g_clear_object (&priv->pixbuf);
g_clear_object (&priv->location);
if (priv->photosets)
{
g_slist_foreach (priv->photosets, (GFunc) g_object_unref, NULL);
g_slist_free (priv->photosets);
... | false | false | false | false | false | 0 |
SetMode(Player* player, const char* targetName, bool moderator, bool set)
{
ObjectGuid guid = player->GetObjectGuid();
if (!IsOn(guid))
{
WorldPacket data;
MakeNotMember(&data);
SendToOne(&data, guid);
return;
}
if (!m_players[guid].IsModerator() && player->GetSessi... | false | false | false | false | false | 0 |
menuEvent(XAP_Menu_Id id)
{
// user selected something from the menu.
// invoke the appropriate function.
// return true if handled.
const EV_Menu_ActionSet * pMenuActionSet = m_pUnixApp->getMenuActionSet();
UT_return_val_if_fail(pMenuActionSet, false);
const EV_Menu_Action * pAction = pMenuActionSet->getAction... | false | false | false | false | false | 0 |
fsl_qspi_prep(struct spi_nor *nor, enum spi_nor_ops ops)
{
struct fsl_qspi *q = nor->priv;
int ret;
mutex_lock(&q->lock);
ret = fsl_qspi_clk_prep_enable(q);
if (ret)
goto err_mutex;
fsl_qspi_set_base_addr(q, nor);
return 0;
err_mutex:
mutex_unlock(&q->lock);
return ret;
} | false | false | false | false | false | 0 |
terminate_current_pipeline ()
{
if (pipeline_pgrp && pipeline_pgrp != shell_pgrp)
{
killpg (pipeline_pgrp, SIGTERM);
killpg (pipeline_pgrp, SIGCONT);
}
} | false | false | false | false | false | 0 |
EmitAtomNonLetter(RegExpCompiler* compiler,
uc16 c,
Label* on_failure,
int cp_offset,
bool check,
bool preloaded) {
RegExpMacroAssemb... | false | false | false | false | false | 0 |
Backtrack(std::vector<Type> &atomTypes, std::vector<Type> &bondTypes, std::vector<Level> &levels, int &numHydrogens)
{
OBAtom *lastAtom = levels.back().assigned;
#ifdef DEBUG
std::cout << " Backtrack... " << lastAtom->GetIndex() << std::endl;
#endif
atomTypes[lastAtom->GetIndex()] = Unassigned;
... | false | false | false | false | false | 0 |
fl_set_gamma( double r,
double g,
double b )
{
FLI_IMAP *fm;
static double rgamma = 1.0,
ggamma = 1.0,
bgamma = 1.0;
if ( fli_imap[ 4 ].grayval )
{
/* Too lazy to shuffle colormap around */
M_err( "fl_set_gamma",
... | false | false | false | false | false | 0 |
ssl3_ServerHandleSigAlgsXtn(sslSocket * ss, PRUint16 ex_type, SECItem *data)
{
SECStatus rv;
SECItem algorithms;
const unsigned char *b;
unsigned int numAlgorithms, i;
/* Ignore this extension if we aren't doing TLS 1.2 or greater. */
if (ss->version < SSL_LIBRARY_VERSION_TLS_1_2) {
ret... | false | false | false | false | false | 0 |
pci_pri_tlp_required(struct pci_dev *pdev)
{
u16 status;
int pos;
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
if (!pos)
return false;
pci_read_config_word(pdev, pos + PCI_PRI_STATUS, &status);
return (status & PCI_PRI_TLP_OFF) ? true : false;
} | false | false | false | false | false | 0 |
Perl_ck_entersub_args_proto_or_list(pTHX_ OP *entersubop,
GV *namegv, SV *protosv)
{
PERL_ARGS_ASSERT_CK_ENTERSUB_ARGS_PROTO_OR_LIST;
if (SvTYPE(protosv) == SVt_PVCV ? SvPOK(protosv) : SvOK(protosv))
return ck_entersub_args_proto(entersubop, namegv, protosv);
else
return ck_entersub_args_list(entersubop)... | false | false | false | false | false | 0 |
gen6_update_ring_freq(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
if (!HAS_CORE_RING_FREQ(dev))
return;
mutex_lock(&dev_priv->rps.hw_lock);
__gen6_update_ring_freq(dev);
mutex_unlock(&dev_priv->rps.hw_lock);
} | false | false | false | false | false | 0 |
getMixHeloXMLAsString(UINT32& a_len)
{
XERCES_CPP_NAMESPACE::DOMDocument* docMixInfo = NULL;
XERCES_CPP_NAMESPACE::DOMElement* mixInfoRoot = NULL;
if( (pglobalOptions->getMixXml(docMixInfo) != E_SUCCESS) ||
(docMixInfo == NULL) )
{
return NULL;
}
if(m_serial != 0)
{
mixInfoRoot = docMixInfo->getDocumen... | false | false | false | false | false | 0 |
is_two_handed(player *u)
{
if (is_gun() && (dynamic_cast<it_gun*>(type))->skill_used != sk_pistol)
return true;
return (volume() > 10 || weight() > u->str_cur * 4);
} | false | false | false | false | false | 0 |
doExtDtPg()
{
struct ExtDtPg *edpp;
int dedp_rc = 0;
int *buf;
pxd_t a_pxd;
while ((DtPgList != NULL) && (dedp_rc == 0)) {
edpp = DtPgList;
PXDaddress(&a_pxd, edpp->pg_off);
PXDlength(&a_pxd, vopen[edpp->pg_vol].lbperpage);
dedp_rc = bread(edpp->pg_vol, a_pxd, (void **) &buf, PB_UPDATE);
if (dedp_rc) {... | false | false | false | false | false | 0 |
cc_log_read(FILE *file)
{
struct cc_flightraw *f;
char line[8192];
double ground_pres;
int ground_pres_count;
f = calloc(1, sizeof (struct cc_flightraw));
if (!f)
return NULL;
while (fgets(line, sizeof (line), file)) {
if (read_eeprom(line, f, &ground_pres, &ground_pres_count))
continue;
if (read... | false | false | false | false | false | 0 |
showFilter(QListWidgetItem* filter)
{
if (!filter) {
return;
}
m_model->setFilter(m_groups->currentIndex(), filter->data(Qt::UserRole).toInt());
m_view->setCurrentIndex(m_model->index(0, 0));
} | false | false | false | false | false | 0 |
ur_string_map_init(ur_string_map* map) {
if(map) {
ns_bzero(map,sizeof(ur_string_map));
map->magic=MAGIC_HASH;
TURN_MUTEX_INIT_RECURSIVE(&(map->mutex));
return 0;
}
return -1;
} | false | false | false | false | false | 0 |
_SEMICOLON(CTX ctx, kStmtExpr *stmt, tkitr_t *itr)
{
if(ITR_is(itr, TT_SEMICOLON)) {
ITR_next(itr);
}
else if(STT_(stmt) != STT_ERR) {
WARN_Semicolon(ctx);
}
} | false | false | false | false | false | 0 |
c_wrap_maybe_const (tree expr, bool non_const)
{
bool nowarning = TREE_NO_WARNING (expr);
location_t loc = EXPR_LOCATION (expr);
/* This should never be called for C++. */
if (c_dialect_cxx ())
gcc_unreachable ();
/* The result of folding may have a NOP_EXPR to set TREE_NO_WARNING. */
STRIP_TYPE_NOP... | false | false | false | false | false | 0 |
renderHints(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QPainter, renderHints);
return QScriptValue(eng, static_cast<int>(self->renderHints()));
} | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
AdvancedConnector *_t = static_cast<AdvancedConnector *>(_o);
switch (_id) {
case 0: _t->srvLookup((*reinterpret_cast< const QSt... | false | false | false | false | false | 0 |
__remove_pin_from_irq(struct mp_chip_data *data, int apic, int pin)
{
struct irq_pin_list *tmp, *entry;
list_for_each_entry_safe(entry, tmp, &data->irq_2_pin, list)
if (entry->apic == apic && entry->pin == pin) {
list_del(&entry->list);
kfree(entry);
return;
}
} | false | false | false | false | false | 0 |
qos_out_err_filter(ap_filter_t *f, apr_bucket_brigade *bb) {
request_rec *r = f->r;
qos_srv_config *sconf = (qos_srv_config*)ap_get_module_config(r->server->module_config, &qos_module);
if(sconf) {
qos_dir_config *dconf = ap_get_module_config(r->per_dir_config, &qos_module);
qos_setenvstatus(r, sconf, dc... | false | false | false | false | false | 0 |
newnode(const char *base, const char *name, int curroffset)
{
struct filenode *node;
int len;
char *str;
node = malloc(sizeof (*node));
if (!node) {
fprintf(stderr,"out of memory\n");
exit(1);
}
len = strlen(name);
str = malloc(len+1);
if (!str) {
fprintf(stderr,"out of memory\n");
exit(1);
}
strcp... | false | false | false | false | false | 0 |
pk_backend_repo_enable (PkBackend *backend, PkBackendJob *job, const gchar *rid, gboolean enabled)
{
if (enabled == TRUE) {
pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "repo-enable", rid, "true", NULL);
} else {
pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "repo-enable", rid, "false", NULL);
}
} | false | false | false | false | false | 0 |
object_resolve(object_string)
char object_string[];
{
int index;
if (!strcmp(object_string, "noun1"))
return (noun[0]);
else if (!strcmp(object_string, "noun2"))
return (noun[1]);
else if (!strcmp(object_string, "noun3"))
return (noun[2]);
else if (!strcmp(object_string, "noun4"))
... | false | false | true | true | false | 1 |
FS2NetD_ValidateTableList(bool do_send)
{
int buffer_size, buffer_offset;
bool my_packet = false;
char buffer[4096];
ushort num_tables = 0;
if (do_send) {
// create and send the request packet
INIT_PACKET( PCKT_TABLES_RQST );
num_tables = (ushort)Table_valid_status.size();
PXO_ADD_USHORT( num_tables );
... | false | false | false | false | true | 1 |
allocatable_size_p (tree gnu_size, bool static_p)
{
/* We can allocate a fixed size if it is a valid for the middle-end. */
if (TREE_CODE (gnu_size) == INTEGER_CST)
return valid_constant_size_p (gnu_size);
/* We can allocate a variable size if this isn't a static allocation. */
else
return !static_p;... | false | false | false | false | false | 0 |
nv44_mpeg_chan_new(struct nvkm_fifo_chan *fifoch,
const struct nvkm_oclass *oclass,
struct nvkm_object **pobject)
{
struct nv44_mpeg *mpeg = nv44_mpeg(oclass->engine);
struct nv44_mpeg_chan *chan;
unsigned long flags;
if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
return -ENOMEM;
nvkm_object_ctor(&... | false | false | false | false | false | 0 |
_mesa_update_array_object_max_element(struct gl_context *ctx,
struct gl_array_object *arrayObj)
{
GLbitfield64 enabled;
if (!ctx->VertexProgram._Current ||
ctx->VertexProgram._Current == ctx->VertexProgram._TnlProgram) {
enabled = _mesa_array_object_get_enabled_... | false | false | false | false | false | 0 |
snd_hda_bus_reset_codecs(struct hda_bus *bus)
{
struct hda_codec *codec;
list_for_each_codec(codec, bus) {
/* FIXME: maybe a better way needed for forced reset */
cancel_delayed_work_sync(&codec->jackpoll_work);
#ifdef CONFIG_PM
if (hda_codec_is_power_on(codec)) {
hda_call_codec_suspend(codec);
hda_call_... | 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.