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 |
|---|---|---|---|---|---|---|
glfs_init (struct glfs *fs)
{
int ret = -1;
ret = glfs_init_common (fs);
if (ret)
return ret;
ret = glfs_init_wait (fs);
return ret;
} | false | false | false | false | false | 0 |
do_lo_export(const char *loid_arg, const char *filename_arg)
{
int status;
bool own_transaction;
if (!start_lo_xact("\\lo_export", &own_transaction))
return false;
SetCancelConn();
status = lo_export(pset.db, atooid(loid_arg), filename_arg);
ResetCancelConn();
/* of course this status is documented nowhe... | false | false | false | false | false | 0 |
deposit_integers(CELL here, F_ARRAY *array, CELL format)
{
CELL count = array_capacity(array);
CELL i;
for(i = 0; i < count; i++)
{
F_FIXNUM value = to_fixnum(array_nth(array,i));
if(format == 1)
bput(here + i,value);
else if(format == sizeof(unsigned int))
*(unsigned int *)(here + format * i) = value;... | false | false | false | false | false | 0 |
dialpad_button_clicked_cb (EkigaDialpad * /* dialpad */,
const gchar *button_text,
EkigaMainWindow *mw)
{
if (mw->priv->current_call && mw->priv->calling_state == Connected)
mw->priv->current_call->send_dtmf (button_text[0]);
else
ekiga_main_window_append_call_url (mw, button_text);
} | false | false | false | false | false | 0 |
Recv (Datagram& dgram) {
dprintf("%s #%u recvd %ib\n",tintstr(),id_,dgram.size()+4);
dgrams_rcvd_++;
if (last_send_time_ && rtt_avg_==TINT_SEC && dev_avg_==0) {
rtt_avg_ = NOW - last_send_time_;
dev_avg_ = rtt_avg_;
dip_avg_ = rtt_avg_;
dprintf("%s #%u sendctrl rtt init %lli\... | false | false | false | false | false | 0 |
to8Bit(bool unicode) const
{
std::string s;
s.resize(d->data.size());
if(!unicode) {
std::string::iterator targetIt = s.begin();
for(wstring::const_iterator it = d->data.begin(); it != d->data.end(); it++) {
*targetIt = char(*it);
++targetIt;
}
return s;
}
const int outputBufferS... | false | false | false | false | false | 0 |
v17_tx_restart(v17_tx_state_t *s, int bit_rate, int tep, int short_train)
{
switch (bit_rate)
{
case 14400:
s->bits_per_symbol = 6;
s->constellation = v17_14400_constellation;
break;
case 12000:
s->bits_per_symbol = 5;
s->constellation = v17_12000_constellation;
... | false | false | false | false | false | 0 |
mount()
{
QString path = m_device->udi();
const QString ctPath = clearTextPath();
if (isLuksDevice() && !ctPath.isEmpty()) { // mount options for the cleartext volume
path = ctPath;
}
QDBusConnection c = QDBusConnection::systemBus();
QDBusMessage msg = QDBusMessage::createMethodCall(UD... | false | false | false | false | false | 0 |
nfsd4_cld_check(struct nfs4_client *clp)
{
int ret;
struct cld_upcall *cup;
struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);
struct cld_net *cn = nn->cld_net;
/* Don't upcall if one was already stored during this grace pd */
if (test_bit(NFSD4_CLIENT_STABLE, &clp->cl_flags))
return 0;
cup = alloc_cl... | false | false | false | false | false | 0 |
_dbus_write_socket_two (int fd,
const DBusString *buffer1,
int start1,
int len1,
const DBusString *buffer2,
int start2,
... | false | false | false | false | false | 0 |
send (const void *buf,
size_t len,
int flags,
const ACE_Time_Value *timeout) const
{
ACE_TRACE ("ACE_SSL_SOCK_Stream::send");
// If SSL has data in the buffer, i.e. SSL_pending() returns a
// non-zero value, then don't block on sele... | false | false | false | false | false | 0 |
nodeNew(nodeIndex_ index)
{
node_ *r;
ReturnNULLIf(index.row < 0);
ReturnNULLIf(index.col < 0);
r = calloc(1, sizeof(node_));
ReturnNULLIf(r == NULL);
Debug("Creating Node %i:%i %p", index.row, index.col, r);
r->row = index.row;
r->col = index.col;
return r;
} | false | false | false | false | false | 0 |
HistogramToFile(const Image *image,CubeInfo *cube_info,
const NodeInfo *node_info,FILE *file,
ExceptionInfo *exception)
{
#define HistogramToFileImageText "[%s] Compute histogram..."
register unsigned int
id;
/*
Traverse any children.
*/
for (id=0; id < 8; id++)
if ... | false | false | false | false | false | 0 |
command_errf(sed_commands_t *commands, const char *fmt, ...)
{
if (commands->errfn && commands->pool) {
va_list args;
const char* error;
va_start(args, fmt);
error = apr_pvsprintf(commands->pool, fmt, args);
commands->errfn(commands->data, error);
va_end(args);
}
... | false | false | false | false | false | 0 |
gdata_picasaweb_file_set_rotation (GDataPicasaWebFile *self, guint rotation)
{
g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
self->priv->rotation = rotation % 360;
g_object_notify (G_OBJECT (self), "rotation");
} | false | false | false | false | false | 0 |
process_kill(bench_process_t *p, int sig)
{
/* We kill the process group instead of the process, this
* eliminates some nastiness when the child has fork'ed. */
if (kill(-p->pid, sig) == -1) {
perror("Kill failed");
abort();
}
} | false | false | false | false | false | 0 |
fps_free (fps_state *st)
{
if (st->draw_gc) XFreeGC (st->dpy, st->draw_gc);
if (st->erase_gc) XFreeGC (st->dpy, st->erase_gc);
if (st->font) XFreeFont (st->dpy, st->font);
free (st);
} | false | false | false | false | false | 0 |
getMinRowHeight(FXint r) const {
register FXTableItem *item;
register FXint h,c,t;
if(r<0 || r>=nrows){ fxerror("%s::getMinRowHeight: row out of range\n",getClassName()); }
for(c=0,h=0; c<ncols; c++){
item=cells[r*ncols+c];
if(item && (r==0 || cells[(r-1)*ncols+c]!=item) && (r==nrows-1 || cells[(r+1)*nc... | false | false | false | false | false | 0 |
scree_plot_make (ggobid * gg)
{
GGobiData *d = datad_get_from_window (gg->sphere_ui.window);
if (pca_calc (d, gg)) { /*-- spherevars_set is called here --*/
gboolean rval = false;
g_signal_emit_by_name (G_OBJECT (gg->sphere_ui.scree_da),
"expose_event", (gpointer) gg, (gpointer)... | false | false | false | false | false | 0 |
getTangents(QPointF p)
{
QList<QPointF> tangents;
QPointF np;
if (!isInside(p))
{
double angleToCentre = QGLE::angleBetweenTwoPoints(p,getQtPoint(CentrePoint));
double radius = getQtLength(Radius);
// Now we need the tangential ones
double distanceToCentre = QGLE::distance(p, getQtPoint(CentrePoint));
dou... | false | false | false | false | false | 0 |
IsAdmin( const CString & nick )
{
bool res = false;
if ( nick.IsEmpty() )
{
return res;
}
m_Mutex.Lock();
MyInfoMap::const_iterator it = m_MyInfoMap.find(nick);
if ( it != m_MyInfoMap.end() )
{
res = it->second->m_bOperator;
}
m_Mutex.UnLock();
return res;
} | false | false | false | false | false | 0 |
duplhash(htable)
hashlist **htable;
{
CONST hashlist *hp;
hashlist **nextp, **new;
int i;
if (!htable) return(NULL);
new = (hashlist **)Xmalloc(MAXHASH * sizeof(hashlist *));
for (i = 0; i < MAXHASH; i++) {
*(nextp = &(new[i])) = NULL;
for (hp = htable[i]; hp; hp = hp -> next) {
*nextp = newhash(hp -> co... | false | false | false | false | false | 0 |
ZmodF_poly_to_fmpz_poly(fmpz_poly_t poly_fmpz, const ZmodF_poly_t poly_f, const long sign)
{
unsigned long n = poly_f->n;
unsigned long size_m = poly_fmpz->limbs+1;
unsigned long limbs = FLINT_MIN(n, size_m-1);
mp_limb_t * coeffs_m = poly_fmpz->coeffs;
ZmodF_t * coeffs_f = poly_f->coeffs;
... | false | false | false | false | false | 0 |
bnx2x_disable_sriov(struct bnx2x *bp)
{
if (pci_vfs_assigned(bp->pdev)) {
DP(BNX2X_MSG_IOV,
"Unloading driver while VFs are assigned - VFs will not be deallocated\n");
return;
}
pci_disable_sriov(bp->pdev);
} | false | false | false | false | false | 0 |
data( const QModelIndex &index, int role ) const
{
if( !index.isValid() )
return QVariant();
if( role != Qt::DisplayRole )
return QVariant();
GpodderTreeItem *item = static_cast<GpodderTreeItem*>( index.internalPointer() );
if( item == 0 )
{
return QVariant();
}
re... | false | false | false | false | false | 0 |
gnm_dep_style_dependency (Sheet *sheet,
GnmExprTop const *texpr,
GnmRange const *r,
GPtrArray *accum)
{
int row, col;
/*
* FIXME: Maybe do better for an expression that is just an
* absolute ref.
*/
for (row = r->start.row; row <= r->end.row; row++) {
for (col = r->start.col; col <= r->end.c... | false | false | false | false | false | 0 |
get_selection_param(double * x1_pst, double * x2_pst,
double * x3_pst, int * isScience, cpl_frame * cur_frame)
{
cpl_propertylist * plist=NULL;
cpl_errorstate prestate = cpl_errorstate_get();
const char * ft_sensor="";
const char * grat_name="";
int pro_science=1;
plist = cpl_propertylist_load(cpl_frame_ge... | false | false | false | false | false | 0 |
update_econtact (EContact *_econtact)
{
GList *attrs = NULL;
if (E_IS_CONTACT (econtact))
g_object_unref (econtact);
econtact = _econtact;
g_object_ref (econtact);
for (unsigned int ii = 0;
ii < ATTR_NUMBER;
ii++)
attributes[ii] = NULL;
attrs = e_vcard_get_attributes (E_VCARD (econ... | false | false | false | false | false | 0 |
run_game(int game)
{
int err = 1;
begin_resource_tracking();
#ifdef MAME_DEBUG
/* validity checks -- debug build only */
if (validitychecks())
return 1;
#ifdef MESS
if (messvaliditychecks()) return 1;
#endif
#endif
/* first give the machine a good cleaning */
memset(Machine, 0, sizeof(Mach... | false | false | false | false | true | 1 |
sq_getsize(HSQUIRRELVM v, SQInteger idx)
{
SQObjectPtr &o = stack_get(v, idx);
SQObjectType type = type(o);
switch(type) {
case OT_STRING: return _string(o)->_len;
case OT_TABLE: return _table(o)->CountUsed();
case OT_ARRAY: return _array(o)->Size();
case OT_USERDATA: return _userdata(o)->_size;
case OT_INST... | false | false | false | false | false | 0 |
trx_purge_truncate_if_arr_empty(void)
/*=================================*/
{
static ulint count;
#ifdef UNIV_DEBUG
if (purge_sys->arr->n_used == 0) {
purge_sys->done_trx_no = purge_sys->purge_trx_no;
}
#endif /* UNIV_DEBUG */
if (!(++count % TRX_SYS_N_RSEGS) && purge_sys->arr->n_used == 0) {
trx_purge_trunc... | false | false | false | false | false | 0 |
set_error_attr(PyObject *err, char *name, int value)
{
PyObject *v = PyLong_FromLong(value);
if (v == NULL || PyObject_SetAttrString(err, name, v) == -1) {
Py_XDECREF(v);
return 0;
}
Py_DECREF(v);
return 1;
} | false | false | false | false | false | 0 |
_wrap_svn_ra_get_locations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
svn_ra_session_t *arg1 = (svn_ra_session_t *) 0 ;
apr_hash_t **arg2 = (apr_hash_t **) 0 ;
char *arg3 = (char *) 0 ;
svn_revnum_t arg4 ;
apr_array_header_t *arg5 = (apr_array_header_t *) 0 ;
apr_pool_t *ar... | false | false | false | false | false | 0 |
ioasic_output_full(int state)
{
logerror("ioasic_output_full(%d)\n", state);
if (state)
ioasic.sound_irq_state |= 0x0040;
else
ioasic.sound_irq_state &= ~0x0040;
update_ioasic_irq();
} | false | false | false | false | false | 0 |
write_gtkrc(string filename)
{
g_return_if_fail(filename != "");
Exporter* exporter = Exporter::create_exporter(Exporter::Gtkrc);
try
{
exporter->export_to( filename, this->image_path );
}
catch(Exception &e)
{
g_warning(
_("Export to file %s failed: %s."),
filename.c_str(),
... | false | false | false | false | false | 0 |
ecryptfs_verify_auth_tok_from_key(struct key *auth_tok_key,
struct ecryptfs_auth_tok **auth_tok)
{
int rc = 0;
(*auth_tok) = ecryptfs_get_key_payload_data(auth_tok_key);
if (IS_ERR(*auth_tok)) {
rc = PTR_ERR(*auth_tok);
*auth_tok = NULL;
goto out;
}
if (ecryptfs_verify_version((*auth_tok)->version)) ... | false | false | false | false | false | 0 |
luaH_newkey (lua_State *L, Table *t, const TValue *key) {
Node *mp;
if (ttisnil(key)) luaG_runerror(L, "table index is nil");
else if (ttisnumber(key) && luai_numisnan(L, nvalue(key)))
luaG_runerror(L, "table index is NaN");
mp = mainposition(t, key);
if (!ttisnil(gval(mp)) || isdummy(mp)) { /* main posi... | false | false | false | false | false | 0 |
item_edit_unrealize (GocItem *item)
{
GnmItemEdit *ie = GNM_ITEM_EDIT (item);
item_edit_cursor_blink_stop (ie);
/* to destroy the feedback ranges */
SCG_FOREACH_PANE (ie->scg, pane,
gnm_pane_expr_cursor_stop (pane););
g_clear_object (&ie->layout);
if (ie->gfont != NULL) {
gnm_font_unref (ie->gfont);
ie-... | false | false | false | false | false | 0 |
ajStrGetAsciiCommon(const AjPStr str)
{
const char *cp;
ajulong totals[256];
ajulong maxtot = 0;
char maxcode = 0;
int icode;
ajulong i;
if(!str)
return '\0';
if(!str->Len)
return '\0';
for(i=0;i<256;i++)
totals[i] = 0;
cp = str->Ptr;
while (*cp)
... | false | false | false | false | false | 0 |
buildin_petskillattack(struct script_state *st)
{
struct pet_data *pd;
struct map_session_data *sd = script_rid2sd(st);
if(sd == NULL || sd->pd == NULL)
return 0;
pd = sd->pd;
if(pd->a_skill == NULL)
pd->a_skill = (struct pet_skill_attack *)aCalloc(1, sizeof(struct pet_skill_attack));
pd->a_skill->id = con... | false | false | false | false | false | 0 |
canonical_locale_charset ()
{
const char *tmp;
char *old_LC_ALL;
const char *charset;
/* Save LC_ALL environment variable. */
tmp = getenv ("LC_ALL");
old_LC_ALL = (tmp != NULL ? xstrdup (tmp) : NULL);
xsetenv ("LC_ALL", locale, 1);
#ifdef HAVE_SETLOCALE
if (setlocale (LC_ALL, "") == NULL)
/* N... | false | false | false | false | false | 0 |
nemo_icon_container_for_each (NemoIconContainer *container,
NemoIconCallback callback,
gpointer callback_data)
{
CallbackAndData callback_and_data;
g_return_if_fail (NEMO_IS_ICON_CONTAINER (container));
callback_and_data.callback = callback;
callback_and_data.callback_data = callback_data;
g_list_fo... | false | false | false | false | false | 0 |
gkrellm_gtk_entry_get_text(GtkWidget **entry)
{
static /*const*/ gchar *def_s = "";
gchar *s = def_s;
if (*entry)
{
s = (gchar *)gtk_entry_get_text(GTK_ENTRY(*entry));
while (*s == ' ' || *s == '\t')
++s;
}
return s;
} | false | false | false | false | false | 0 |
filter_component (icalcomponent *icomponent,
GHashTable *fields_of_interest,
GString *string)
{
gchar *str;
/* RFC 2445 explicitly says that the newline is *ALWAYS* a \r\n (CRLF)!!!! */
const gchar newline[] = "\r\n";
icalcomponent_kind kind;
const gchar ... | false | false | false | false | false | 0 |
liste_plaques() const{
tirage resultat;
if(est_plaque){
resultat.tab[pl]=1;
} else{
list<calcul>::const_iterator Ci;
for(Ci=sous_calculs.begin(); Ci!=sous_calculs.end(); Ci++){
resultat = resultat + (Ci->liste_plaques());
}
}
return resultat;
} | false | false | false | false | false | 0 |
boehm_thread_register (MonoThreadInfo* info, void *baseptr)
{
#if GC_VERSION_MAJOR >= 7
struct GC_stack_base sb;
int res;
res = GC_get_stack_base (&sb);
if (res != GC_SUCCESS) {
sb.mem_base = baseptr;
#ifdef __ia64__
/* Can't determine the register stack bounds */
g_error ("mono_gc_register_thread failed ().... | false | false | false | false | false | 0 |
XactLogAbortRecord(TimestampTz abort_time,
int nsubxacts, TransactionId *subxacts,
int nrels, RelFileNode *rels,
TransactionId twophase_xid)
{
xl_xact_abort xlrec;
xl_xact_xinfo xl_xinfo;
xl_xact_subxacts xl_subxacts;
xl_xact_relfilenodes xl_relfilenodes;
xl_xact_twophase xl_twophase;
uint8 ... | false | false | false | false | false | 0 |
decode(OpcodeType type,
InstructionContext insnContext,
uint8_t opcode,
uint8_t modRM) {
const struct ModRMDecision* dec = nullptr;
switch (type) {
case ONEBYTE:
dec = &ONEBYTE_SYM.opcodeDecisions[insnContext].modRMDecisions[opcode];
br... | false | false | false | false | false | 0 |
iperf_udp_listen(struct iperf_test *test)
{
int s;
if ((s = netannounce(test->settings->domain, Pudp, test->bind_address, test->server_port)) < 0) {
i_errno = IESTREAMLISTEN;
return -1;
}
return s;
} | false | false | false | false | false | 0 |
deleteCache()
{
// delete cache
this->CMakeInstance->GetCacheManager()->DeleteCache(this->BinaryDirectory.toLocal8Bit().data());
// reload to make our cache empty
this->CMakeInstance->GetCacheManager()->LoadCache(this->BinaryDirectory.toLocal8Bit().data());
// emit no generator and no properties
this->setGe... | false | false | false | false | false | 0 |
apply(const cPDVector& pd) const {
bool first = false;
bool second = false;
for ( cPDVector::const_iterator p = pd.begin();
p != pd.end(); ++p ) {
if ( !first ) {
if ( apply(*p) )
first = true;
} else {
if ( apply(*p) )
second = true;
}
}
return first && second;
} | false | false | false | false | false | 0 |
h1(const state& st){
int** board = st.getBoard();
int nMismatchedTiles = 0;
if(board[0][0] != 1 && board[0][0] != 0)nMismatchedTiles++;
if(board[0][1] != 2 && board[0][1] != 0)nMismatchedTiles++;
if(board[0][2] != 3 && board[0][2] != 0)nMismatchedTiles++;
if(board[1][0] != 8 && board[1][0] != 0)nMismatchedTiles++... | false | false | false | false | false | 0 |
handle_memory_allocation( int sc_num, pid_t pid, pid_state *state )
{
bool ret=true;
switch( state->context_state[0]++ ) {
case 0:
ret=hma_state0( sc_num, pid, state );
break;
case 1:
return hma_state1( sc_num, pid, state );
case 20:
return hma_state20( sc_num, pid, ... | false | false | false | false | false | 0 |
playerChanged( int player )
{
static int recursionPreventer = 0;
recursionPreventer++;
if ( recursionPreventer == 1 )
playerSelector->SelectItem( player );
recursionPreventer--;
} | false | false | false | false | false | 0 |
cond(node)
NODE *node;
{
if (node == 0) return 0;
value_expr(node);
if (nd_type(node) == NODE_NEWLINE){
node->nd_next = cond0(node->nd_next);
return node;
}
return cond0(node);
} | false | false | false | false | false | 0 |
points_overlap(VPoint vp1, VPoint vp2)
{
double delta;
delta = 1.0/MIN2(page_width, page_height);
if (fabs(vp2.x - vp1.x) < delta || fabs(vp2.y - vp1.y) < delta) {
return TRUE;
} else {
return FALSE;
}
} | false | false | false | false | false | 0 |
chm_ban(struct Client *client_p, struct Client *source_p,
struct Channel *chptr, int parc, int *parn,
char **parv, int *errors, int alev, int dir, char c, void *d,
const char *chname)
{
char *mask = NULL;
if (dir == MODE_QUERY || parc <= *parn)
{
dlink_node *ptr = NULL;
if (*erro... | false | true | false | false | false | 1 |
property(Atom property,
long long_offset, long long_length,
bool do_delete,
Atom req_type,
Atom *actual_type_return,
int *actual_format_return,
unsigned long *nitems_return,
... | false | false | false | false | false | 0 |
LL_Find(LinkedList *list, int (*compare)(void *, void *), void *value)
{
if (!list)
return NULL;
if (!compare)
return NULL;
if (!value)
return NULL;
do {
void *data = LL_Get(list);
if (0 == compare(data, value))
return data;
} while (LL_Next(list) == 0);
return NULL;
} | false | false | false | false | false | 0 |
xgene_cle_setup_dbptr(struct xgene_enet_pdata *pdata,
struct xgene_enet_cle *cle)
{
struct xgene_cle_ptree *ptree = &cle->ptree;
u32 buf[CLE_DRAM_REGS];
u32 i;
int ret;
memset(buf, 0, sizeof(buf));
for (i = 0; i < ptree->num_dbptr; i++) {
xgene_cle_dbptr_to_hw(pdata, &ptree->dbptr[i], buf);
ret = xgene_... | false | false | false | false | false | 0 |
checksum_object(int index) const {
if (index < 0)
return NULL;
int i = 0;
for (std::list<checksum_desc>::const_iterator itCheckSum = checksums.begin();
itCheckSum != checksums.end(); itCheckSum++) {
if (index == i) return itCheckSum->sum;
i++;
}
return NULL;
} | false | false | false | false | false | 0 |
dlist_find_data(dlist *l, void *data)
{
for(l = dlist_first(l); l; l = l->next)
if(l->data == data)
break;
return l;
} | false | false | false | false | false | 0 |
xmalloc(size_t sz)
{
void *p;
if (sz < 1)
sz = 1;
if ((p = malloc(sz)) == NULL) {
if (failure_notify) {
snprintf(msg, 128, "xmalloc: Unable to allocate %d bytes!\n",
(int) sz);
(*failure_notify) (msg);
} else {
perror("malloc");
}
exit(1);
}
#if XMALLOC_DEBUG
check_malloc(p, ... | false | false | false | false | false | 0 |
init_log_direct(const char *log_file, int append)
{
int open_flags = append ? 0 : O_TRUNC;
dev_create_file(log_file, &_log_dev, &_log_dev_alias, 1);
if (!dev_open_flags(&_log_dev, O_RDWR | O_CREAT | open_flags, 1, 0))
return;
_log_direct = 1;
} | false | false | false | false | false | 0 |
vp_delete(Varinfo vp)
{
Varinfo vp1, vp2;
for(vp2 = vp; vp2; ) {
if(vp2->child)
vp_delete(vp2->child);
vp1 = vp2;
vp2 = vp2->next;
DXFree((Pointer)vp1);
}
} | false | false | false | false | false | 0 |
snd_jack_report(struct snd_jack *jack, int status)
{
struct snd_jack_kctl *jack_kctl;
int i;
if (!jack)
return;
list_for_each_entry(jack_kctl, &jack->kctl_list, list)
snd_kctl_jack_report(jack->card, jack_kctl->kctl,
status & jack_kctl->mask_bits);
if (!jack->input_dev)
return;
for (i = 0; i < ... | false | false | false | false | false | 0 |
z_input_stream (void)
{
flush_buffer ();
if (zargs[0] == 0 && istream_replay)
replay_close ();
if (zargs[0] == 1 && !istream_replay)
replay_open ();
} | false | false | false | false | false | 0 |
getExecutionDomain(const MachineInstr *MI) const {
// If we don't have access to NEON instructions then we won't be able
// to swizzle anything to the NEON domain. Check to make sure.
if (Subtarget.hasNEON()) {
// VMOVD, VMOVRS and VMOVSR are VFP instructions, but can be changed to NEON
// if they are not... | false | false | false | false | false | 0 |
decif_start_play(BcmDecIF *decif)
{
BC_STATUS sts = DtsStartDecoder(decif->hdev);
if (sts != BC_STS_SUCCESS)
return sts;
sts = DtsStartCapture(decif->hdev);
return sts;
} | false | false | false | false | false | 0 |
hx509_request_free(hx509_request *req)
{
if ((*req)->name)
hx509_name_free(&(*req)->name);
free_SubjectPublicKeyInfo(&(*req)->key);
free_ExtKeyUsage(&(*req)->eku);
free_GeneralNames(&(*req)->san);
memset(*req, 0, sizeof(**req));
free(*req);
*req = NULL;
} | false | false | false | false | false | 0 |
GetVertexNormal(vtkIdType Vertex, double *Normal)
{
vtkIdList *FList=vtkIdList::New();
this->GetVertexNeighbourFaces(Vertex, FList);
vtkIdType i;
double TempNormal[3];
double P1[3],P2[3],P3[3];
double Area;
vtkIdType v1,v2,v3;
Normal[0]=0;
Normal[1]=0;
Normal[2]=0;
for (i=0;i<FList->GetNumberOfIds();i++)
{... | false | false | false | false | false | 0 |
check_flags(unsigned long flags)
{
#if defined(CONFIG_PROVE_LOCKING) && defined(CONFIG_DEBUG_LOCKDEP) && \
defined(CONFIG_TRACE_IRQFLAGS)
if (!debug_locks)
return;
if (irqs_disabled_flags(flags)) {
if (DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled)) {
printk("possible reason: unannotated irqs-off.\n");
... | false | false | false | false | false | 0 |
synic_clear_sint_msg_pending(struct kvm_vcpu_hv_synic *synic,
u32 sint)
{
struct kvm_vcpu *vcpu = synic_to_vcpu(synic);
struct page *page;
gpa_t gpa;
struct hv_message *msg;
struct hv_message_page *msg_page;
gpa = synic->msg_page & PAGE_MASK;
page = kvm_vcpu_gfn_to_page(vcpu, gpa >> PAGE_SHIFT);
if (is_er... | false | false | false | false | false | 0 |
p7_trace_GrowTo(P7_TRACE *tr, int N)
{
int status;
void *tmp;
if (N < tr->nalloc) return eslOK; /* no-op */
ESL_RALLOC(tr->st, tmp, sizeof(char) *N);
ESL_RALLOC(tr->k, tmp, sizeof(int) *N);
ESL_RALLOC(tr->i, tmp, sizeof(int) *N);
if (tr->pp != NULL) ESL_RALLOC(tr->pp, tmp, sizeof(float) *N);
tr... | false | false | false | false | false | 0 |
visitClassDecl(const ClassDeclPtr& p)
{
//
// Emit forward declarations.
//
string scoped = p->scoped();
if(_classHistory.count(scoped) == 0)
{
_out << sp << nl << "if not " << getDictLookup(p) << ':';
_out.inc();
string type = getAbsolute(p, "_t_");
_out << nl <<... | false | false | false | false | false | 0 |
HandleTogglePvP(WorldPacket& recv_data)
{
// this opcode can be used in two ways: Either set explicit new status or toggle old status
if (recv_data.size() == 1)
{
bool newPvPStatus;
recv_data >> newPvPStatus;
GetPlayer()->ApplyModFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP, newPvPStatus);... | false | false | false | false | false | 0 |
storeAddVary(const char *store_url, const char *url, method_t * method, const cache_key * key, const char *etag, const char *vary, const char *vary_headers, const char *accept_encoding)
{
AddVaryState *state;
request_flags flags = null_request_flags;
CBDATA_INIT_TYPE_FREECB(AddVaryState, free_AddVaryState);... | false | false | false | false | false | 0 |
s_load_image(s_container_t *c, unsigned bank, const char *name)
{
SDL_Surface *src;
s_bank_t *b;
src = IMG_Load(name);
if(!src)
{
log_printf(ELOG, "sprite: Failed to load sprite \"%s\"!\n", name);
return -1;
}
b = s_new_bank(c, bank, 1, src->clip_rect.w, src->clip_rect.h);
if(!b)
{
log_printf(ELOG, "sp... | false | false | false | false | false | 0 |
py_Cell_get_rendered_text_method (py_Cell_object *self, PyObject *args)
{
gchar *text;
PyObject *py_text;
if (!PyArg_ParseTuple (args, (char *) ":get_rendered_text")) {
return NULL;
}
text = gnm_cell_get_rendered_text (self->cell);
py_text = PyString_FromString (text);
g_free (text);
return py_text;
} | false | false | false | false | false | 0 |
flatterm_to_term(Flatterm f)
{
if (VARIABLE(f))
return get_variable_term(VARNUM(f));
else {
Term t = get_rigid_term_dangerously(SYMNUM(f),ARITY(f));
int i;
Flatterm g = f->next;
for (i = 0; i < ARITY(f); i++) {
ARG(t,i) = flatterm_to_term(g);
g = g->end->next;
}
return t;
}... | false | false | false | false | false | 0 |
LightCreatesShadow(vtkLight *l)
{
assert("pre: l_exists" && l!=0);
return !l->LightTypeIsHeadlight() &&
(!l->GetPositional() || l->GetConeAngle()<180.0);
} | false | false | false | false | false | 0 |
test_config_stress__dont_break_on_invalid_input(void)
{
const char *editor, *color;
struct git_config_file *file;
git_config *config;
cl_assert(git_path_exists("git-test-config"));
cl_git_pass(git_config_file__ondisk(&file, "git-test-config"));
cl_git_pass(git_config_new(&config));
cl_git_pass(git_config_add_fi... | false | false | false | false | false | 0 |
FetchClientConnectInfo(int in_clid, void *ret_info) {
struct sockaddr_in client_addr;
#ifdef HAVE_SOCKLEN_T
socklen_t client_len;
#else
int client_len;
#endif
memset(&client_addr, 0, sizeof(struct sockaddr_in));
client_len = sizeof(struct sockaddr_in);
if (getsockname(in_clid, (struct sockaddr... | false | false | false | false | false | 0 |
load_realms(void)
{
const char* rfnm = "/etc/iproute2/rt_realms";
char buf[512];
FILE *fil;
char *cur, *nxt;
int id;
struct realmname *oldnm = NULL, *newnm = NULL;
fil = fopen(rfnm, "re");
if (!fil) {
rdberr = 1;
return;
}
while (fgets(buf, sizeof(buf), fil)) {
cur = buf;
while ((*cur == ' ') || (*c... | false | false | false | false | false | 0 |
open_daud(bgav_demuxer_context_t * ctx)
{
bgav_stream_t * s;
ctx->tt = bgav_track_table_create(1);
s = bgav_track_add_audio_stream(&ctx->tt->tracks[0], ctx->opt);
s->fourcc = BGAV_MK_FOURCC('d', 'a', 'u', 'd');
s->data.audio.format.num_channels = 6;
s->data.audio.format.samplerate = 96000;
s->containe... | false | false | false | false | false | 0 |
data_Size(GF_Box *s)
{
GF_Err e;
GF_DataBox *ptr = (GF_DataBox *)s;
e = gf_isom_full_box_get_size(s);
if (e) return e;
ptr->size += 4;
if(ptr->data != NULL && ptr->dataSize > 0){
ptr->size += ptr->dataSize;
}
return GF_OK;
} | false | false | false | false | false | 0 |
zd1211_hw_init_hmac(struct zd_chip *chip)
{
static const struct zd_ioreq32 ioreqs[] = {
{ CR_ZD1211_RETRY_MAX, ZD1211_RETRY_COUNT },
{ CR_RX_THRESHOLD, 0x000c0640 },
};
dev_dbg_f(zd_chip_dev(chip), "\n");
ZD_ASSERT(mutex_is_locked(&chip->mutex));
return zd_iowrite32a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs))... | false | false | false | false | false | 0 |
startPeriodicUpdate(int refreshFrequency)
{
if(ourPeriodicUpdateThread) {
printf("***** Setting refresh freq to %d ms.\n", refreshFrequency);
ourPeriodicUpdateThread->setRefreshFreq(refreshFrequency);
return;
}
ourPeriodicUpdateThread = new ArSystemStatusRefreshThread(refreshFrequency);
ourPeriodicU... | false | false | false | false | false | 0 |
host_table_init()
{
ht = calloc(1, sizeof(struct host_table));
if (ht == NULL) {
LogError("malloc of %zd bytes failed.", sizeof(struct host_table));
return TSPERR(TSS_E_OUTOFMEMORY);
}
MUTEX_INIT(ht->lock);
return TSS_SUCCESS;
} | false | false | false | false | false | 0 |
ftrace_ops_recurs_func(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct pt_regs *regs)
{
int bit;
bit = trace_test_and_set_recursion(TRACE_LIST_START, TRACE_LIST_MAX);
if (bit < 0)
return;
op->func(ip, parent_ip, op, regs);
trace_clear_recursion(bit);
} | false | false | false | false | false | 0 |
get_line_number( FILE *file ) {
int count = 0;
char c;
int pos = ftell( file );
fseek( file, 0, SEEK_SET );
while ( ftell( file ) < pos - 1 ) {
fread( &c, sizeof( char ), 1, file );
if ( c == 10 ) count++;
}
fseek( file, pos, SEEK_SET );
return count + 1;
} | false | false | false | false | false | 0 |
if_spi_c2h_data(struct if_spi_card *card)
{
struct lbs_private *priv = card->priv;
struct sk_buff *skb;
char *data;
u16 len;
int err = 0;
lbs_deb_enter(LBS_DEB_SPI);
/* How many bytes are there to read? */
err = spu_read_u16(card, IF_SPI_SCRATCH_1_REG, &len);
if (err)
goto out;
if (!len) {
netdev_err(pr... | false | false | false | false | false | 0 |
login(char *key, char *fullname) {
if(key) snprintf(message, PIPE_BUF,
"PASS %s\r\nNICK %s\r\nUSER %s localhost %s :%s\r\n", key,
nick, nick, host, fullname ? fullname : nick);
else snprintf(message, PIPE_BUF, "NICK %s\r\nUSER %s localhost %s :%s\r\n",
nick, nick, host, fullname ? fullname : nick);
write... | false | false | false | false | false | 0 |
rt5677_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{
struct snd_soc_codec *codec = dai->codec;
struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
unsigned int reg_val = 0;
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBM_CFM:
rt5677->master[dai->id] = 1;
break;
case ... | false | false | false | false | false | 0 |
opensslgost_createctx(dst_key_t *key, dst_context_t *dctx) {
EVP_MD_CTX *evp_md_ctx;
const EVP_MD *md = EVP_gost();
UNUSED(key);
if (md == NULL)
return (DST_R_OPENSSLFAILURE);
evp_md_ctx = EVP_MD_CTX_create();
if (evp_md_ctx == NULL)
return (ISC_R_NOMEMORY);
if (!EVP_DigestInit_ex(evp_md_ctx, md, NULL)) ... | false | false | false | false | false | 0 |
set_up_command_word_buffer()
{
if (!have_command_word_buffer) {
_num_command_word = 0;
have_command_word_buffer = true;
}
} | false | false | false | false | false | 0 |
L21()
{register object *base=vs_base;
register object *sup=base+VM21; VC21
vs_check;
{object V144;
register object V145;
V144=(base[0]);
V145=(base[1]);
vs_top=sup;
goto TTL;
TTL:;
{object V146;
V146= ((V145))->v.v_self[(long)77];
base[2]= CMPcar((V146));
{object V147;
V147= ((V145))->v.v_self[(long)76];
... | false | false | false | false | false | 0 |
write_automata (void)
{
output_time = create_ticker ();
if (progress_flag)
fprintf (stderr, "Forming and outputting automata tables...");
output_tables ();
if (progress_flag)
{
fprintf (stderr, "done\n");
fprintf (stderr, "Output functions to work with automata...");
}
output_chip_defi... | false | false | false | false | true | 1 |
activate_selected_items (NemoListView *view)
{
GList *file_list;
file_list = nemo_list_view_get_selection (NEMO_VIEW (view));
if (view->details->renaming_file) {
/* We're currently renaming a file, wait until the rename is
finished, or the activation uri will be wrong */
if (view->details->renaming_fil... | false | false | false | false | false | 0 |
end(miniexp_t p)
{
if (dryrun)
{
ASSERT(miniexp_consp(p));
ASSERT(miniexp_numberp(car(p)));
int pos = miniexp_to_int(car(p));
ASSERT(tab >= pos);
car(p) = miniexp_number(tab - pos);
}
} | 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.