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 |
|---|---|---|---|---|---|---|
iso_compare_name(const char *de_name, size_t len,
const char *file_name)
{
char iso_file_name[256];
char *p = iso_file_name;
char c1, c2;
int i;
i = iso_convert_name(iso_file_name, de_name, len);
(void)i;
dprintf("Compare: \"%s\" to \"%s\" (len %zu)\n",
file_name, iso_file_... | true | true | false | false | false | 1 |
AdvanceSelection(bool forward)
{
if (GetPageCount() <= 1)
return;
int currentSelection = GetSelection();
wxAuiTabCtrl* tabCtrl = nullptr;
int idx = -1;
if (!FindTab(GetPage(currentSelection), &tabCtrl, &idx))
return;
if (!tabCtrl || idx < 0)
return;
wxWindow* pag... | false | false | false | false | false | 0 |
prio_active_inversion_cb(evutil_socket_t fd, short what, void *arg)
{
int *call_order = arg;
*call_order = n_pai_calls++;
if (n_pai_calls == 1) {
/* This should activate later, even though it shares a
priority with us. */
event_active(&pai_events[1], EV_READ, 1);
/* This should activate next, since its pr... | false | false | false | false | false | 0 |
ascii2hexNybble( char ch )
{
return( '9' < ch ? ('a' > ch ? ch - 'A' : ch - 'a') + 10 : ch - '0' );
} | false | false | false | false | false | 0 |
m_edit_plugins(GtkWidget *, cchar *) // v.11.03
{
int edit_plugins_event(zdialog *zd, cchar *event);
int ii;
char *pp;
zdialog *zd;
zfuncs::F1_help_topic = "plugins";
zd = zdialog_new("Edit Plugins",mWin,ZTX("Add"),ZTX("Remove"),Bdone,null... | false | false | false | false | false | 0 |
WriteSpellGoTargets(WorldPacket* data)
{
// This function also fill data for channeled spells:
// m_needAliveTargetMask req for stop channeling if one target die
// Always hits on GO and expected all targets for Units
*data << (uint8)(m_UniqueTargetInfo.size() + m_UniqueGOTargetInfo.size());
for (T... | false | false | false | false | false | 0 |
pci_iommu_alloc(void)
{
struct iommu_table_entry *p;
sort_iommu_table(__iommu_table, __iommu_table_end);
check_iommu_entries(__iommu_table, __iommu_table_end);
for (p = __iommu_table; p < __iommu_table_end; p++) {
if (p && p->detect && p->detect() > 0) {
p->flags |= IOMMU_DETECTED;
if (p->early_init)
... | false | false | false | false | false | 0 |
gtkvbbox_gtk_vbutton_box_set_layout_default(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj layout_scm;
int layout;
ScmObj SCM_SUBRARGS[1];
int SCM_i;
SCM_ENTER_SUBR("gtk-vbutton-box-set-layout-default");
for (SCM_i=0; SCM_i<1; SCM_i++) {
SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
}
layout_scm =... | false | false | false | false | false | 0 |
matrix_CpAB_float (float* pC,const float* pA,const float* pB,size_t n,size_t p,size_t m)
{
float r;
const float* p1;
size_t i,k,j;
for (j=0;j<m;j++)
{
p1 = pA;
for (k=0;k<p;k++)
{
r = *pB++;
for (i=0;i<n;i++)
{
pC[i] += r*p1[i];
}
p1 += n;
}
pC += n;
}
} | false | false | false | false | false | 0 |
isCallerAuthorized(const QString &action, QByteArray callerID)
{
QDataStream s(&callerID, QIODevice::ReadOnly);
qint64 pid;
s >> pid;
PolkitQt1::UnixProcessSubject subject(pid);
PolkitQt1::Authority *authority = PolkitQt1::Authority::instance();
PolkitResultEventLoop e;
connect(authority,... | false | false | false | false | false | 0 |
db_force_rollback(void){
int i;
static int busy = 0;
sqlite3_stmt *pStmt = 0;
if( busy || g.db==0 ) return;
busy = 1;
undo_rollback();
while( (pStmt = sqlite3_next_stmt(g.db,pStmt))!=0 ){
sqlite3_reset(pStmt);
}
while( db.pAllStmt ){
db_finalize(db.pAllStmt);
}
if( db.nBegin ){
sqlite3... | false | false | false | false | true | 1 |
gst_deinterlace_do_bufferpool (GstDeinterlace * self, GstCaps * outcaps)
{
GstQuery *query;
gboolean result = TRUE;
GstBufferPool *pool;
GstAllocator *allocator;
GstAllocationParams params;
GstStructure *config;
guint size, min, max;
if (self->passthrough) {
/* we are in passthrough, the input buff... | false | false | false | false | false | 0 |
SetPressedState()
{
if (mFrameBrush != &mFrameOverBrush)
{
mFrameBrush = &mFrameOverBrush;
}
mYOffs = 1;
update(mRect);
} | false | false | false | false | false | 0 |
Save(int index)
{
EditorBase* ed = InternalGetEditorBase(index);
if (ed)
{
if (!ed->Save())
return false;
return true;
}
return false;
} | false | false | false | false | false | 0 |
mlx4_catas_init(struct mlx4_dev *dev)
{
INIT_WORK(&dev->persist->catas_work, catas_reset);
dev->persist->catas_wq = create_singlethread_workqueue("mlx4_health");
if (!dev->persist->catas_wq)
return -ENOMEM;
return 0;
} | false | false | false | false | false | 0 |
g2_reset_palette(int dev)
{
g2_device *devp;
int i;
if((devp=g2_get_device_pointer(dev))==NULL) {
fprintf(stderr, "g2_reset_palette: No such device: %d\n", dev);
return;
}
switch(devp->t) {
case g2_PD:
g2_clear_palette(dev);
g2_allocate_basic_colors(dev);
break;
case g2_VD... | false | false | false | false | false | 0 |
spca504B_SetSizeType(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
u8 Size;
Size = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv;
switch (sd->bridge) {
case BRIDGE_SPCA533:
reg_w_riv(gspca_dev, 0x31, 0, 0);
spca504B_WaitCmdStatus(gspca_dev);
spca504B_PollingDataReady(gspca_dev... | false | false | false | false | false | 0 |
SimpleGenContents(CommandLine &CmdL)
{
if (CmdL.FileSize() < 2)
return ShowHelp(CmdL);
// Create a package writer object.
ContentsWriter Contents(_config->Find("APT::FTPArchive::DB"), _config->Find("APT::FTPArchive::Architecture"));
if (_error->PendingError() == true)
return false;
//... | false | false | false | false | false | 0 |
is_vms_varlen_txt(__G__ ef_buf, ef_len)
__GDEF
uch *ef_buf; /* buffer containing extra field */
unsigned ef_len; /* total length of extra field */
{
unsigned eb_id;
unsigned eb_len;
uch *eb_data;
unsigned eb_datlen;
#define VMSREC_C_UNDEF 0
#define VMSREC_C_VAR 2
uch vms_re... | false | false | false | false | false | 0 |
verifyhost(irlist_t *list, const char *hmask)
{
regex_t *ah;
updatecontext();
ah = irlist_get_head(list);
while (ah)
{
if (!regexec(ah,hmask,0,NULL,0))
{
return 1;
}
ah = irlist_get_next(ah);
}
return 0;
} | false | false | false | false | false | 0 |
set_find_mode(bool val)
{
m_find_mode = val;
//Set find mode in all portals:
for(type_portals::const_iterator iter = m_portals.begin(); iter != m_portals.end(); ++iter)
{
//*iter is a FlowTableItem.
Box_Data_Portal* portal = *iter;
if(portal)
portal->set_find_mode(m_find_mode);
}
//Set f... | false | false | false | false | false | 0 |
getOwnPropertySlot(ExecState* exec, unsigned i, PropertySlot& slot)
{
return inlineGetOwnPropertySlot(exec, i, slot);
} | false | false | false | false | false | 0 |
vflist_find_row_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
{
ViewFileFindRowData *find = data;
FileData *fd;
gtk_tree_model_get(model, iter, FILE_COLUMN_POINTER, &fd, -1);
if (fd == find->fd)
{
*find->iter = *iter;
find->found = TRUE;
return TRUE;
}
find->row++;
return ... | false | false | false | false | false | 0 |
gsd_wacom_device_get_current_mode (GsdWacomDevice *device,
int group_id)
{
int current_idx;
g_return_val_if_fail (GSD_IS_WACOM_DEVICE (device), -1);
current_idx = GPOINTER_TO_INT (g_hash_table_lookup (device->priv->modes, GINT_TO_POINTER(group_id)));
/* That means that the mode doesn't exist, se... | false | false | false | false | false | 0 |
sec_asn1e_integer(PLArenaPool *poolp, SECItem *dest, unsigned long value,
PRBool is_unsigned)
{
unsigned long copy;
unsigned char sign;
int len = 0;
/*
* Determine the length of the encoded value (minimum of 1).
*/
copy = value;
do {
len++;
sign = (unsigned char)(copy & 0x80);
... | false | false | false | false | false | 0 |
btrfs_dentry_delete(const struct dentry *dentry)
{
struct btrfs_root *root;
struct inode *inode = d_inode(dentry);
if (!inode && !IS_ROOT(dentry))
inode = d_inode(dentry->d_parent);
if (inode) {
root = BTRFS_I(inode)->root;
if (btrfs_root_refs(&root->root_item) == 0)
return 1;
if (btrfs_ino(inode) == ... | false | false | false | false | false | 0 |
Open(void *z,unsigned int len,DWORD flags)
{ if (uf!=0 || currentfile!=-1) return ZR_NOTINITED;
//
#ifdef ZIP_STD
char* buf = GETCWD(rootdir,MAX_PATH-1);
if (buf==0) return ZR_NOFILE;
#else
#ifdef GetCurrentDirectory
GetCurrentDirectory(MAX_PATH-1,rootdir);
#else
rootdir[0]='/'; rootdir[1]=0;
#endif
#endif
... | false | false | false | false | false | 0 |
get_entries(ENTRY_TYPES entry_type) const
{
std::list<bsaindexentry>* ret = new std::list<bsaindexentry>();
std::map<std::string, bsaindexentry>::const_iterator it;
for (it = entries.begin(); it!= entries.end(); it++) {
std::string key = it->first;
bsaindexentry value = it->second;
if (key.rfind(... | false | false | false | false | false | 0 |
returnUntillStrip(string stop, string &line)
{
string result;
size_t pos = line.find_first_of( stop, 0 );
if ( pos != string::npos )
result = line.substr( 0, pos );
// strip result from line
line = line.substr( pos+1, line.size() );
return result;
} | false | false | false | false | false | 0 |
__pyx_tp_new_7sklearn_5utils_12arraybuilder_ArrayBuilder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
struct __pyx_obj_7sklearn_5utils_12arraybuilder_ArrayBuilder *p;
PyObject *o = (*t->tp_alloc)(t, 0);
if (!o) return 0;
p = ((struct __pyx_obj_7sklearn_5utils_12arraybuilder_ArrayBuil... | false | false | false | false | false | 0 |
vs_fill_borders_RGB555 (const VSImage * dest, const uint8_t * val)
{
int i;
int top = dest->border_top, bottom = dest->border_bottom;
int left = dest->border_left, right = dest->border_right;
int width = dest->width;
int height = dest->height;
int real_width = dest->real_width;
int stride = dest->stride;
... | false | false | false | false | false | 0 |
gfm_server_group_info_set(struct peer *peer, int from_client, int skip)
{
gfarm_error_t e;
struct gfarm_group_info gi;
struct user *user = peer_get_user(peer);
int need_free;
static const char diag[] = "GFM_PROTO_GROUP_INFO_SET";
e = get_group(peer, diag, &gi);
if (e != GFARM_ERR_NO_ERROR) {
gflog_debug(GFARM... | false | false | false | false | false | 0 |
CKYBuffer_AppendChar(CKYBuffer *buf, CKYByte val)
{
CKYStatus ret;
ret = CKYBuffer_Reserve(buf, buf->len + 1);
if (ret != CKYSUCCESS) {
return ret;
}
buf->data[buf->len] = val;
buf->len += 1;
return CKYSUCCESS;
} | false | false | false | false | false | 0 |
netsnmp_table_data_clone_row(netsnmp_table_row *row)
{
netsnmp_table_row *newrow = NULL;
if (!row)
return NULL;
memdup((u_char **) & newrow, (u_char *) row,
sizeof(netsnmp_table_row));
if (!newrow)
return NULL;
if (row->indexes) {
newrow->indexes = snmp_clone_var... | false | false | false | false | false | 0 |
downheap_int(int *array, int n, int k)
{
int j, v;
v = array[k];
while (k <= n / 2) {
j = k + k;
if (j < n && array[j] < array[j + 1])
j++;
if (v >= array[j])
break;
array[k] = array[j];
k = j;
}
array[k] = v;
} | false | false | false | false | false | 0 |
BStream_readDataOfLength_(BStream *self, size_t length)
{
if (self->index + length <= UArray_size(self->ba))
{
unsigned char *b = (unsigned char *)UArray_bytes(self->ba) + self->index;
self->index += length;
return b;
}
return NULL;
} | false | false | false | false | false | 0 |
next_node(void)
{
int q;
/* go to the right */
curp = tree[curp].right;
if (curp == 0) /* no more */
return 0;
if (curp < 0) { /* thread. stop here */
curp = -curp;
return 1;
}
while ((q = tree[curp].left)) /* now go all the way left */
curp = q;
return 1;
} | false | false | false | false | false | 0 |
think_build_inn()
{
Nation* ownNation = nation_array[nation_recno];
if( ownNation->ai_inn_count < ownNation->ai_supported_inn_count() )
{
return think_build_firm( FIRM_INN, 1 );
}
return 0;
} | false | false | false | false | false | 0 |
image_hash_from_data(struct image * image) {
unsigned char buf[0x20000];
uint16_t hash = 0;
int ret;
image_seek(image, 0);
while ( ( ret = image_read(image, &buf, sizeof(buf)) ) )
hash ^= do_hash((uint16_t *)&buf, ret);
return hash;
} | false | false | false | false | false | 0 |
pp_c_specifier_qualifier_list (c_pretty_printer *pp, tree t)
{
const enum tree_code code = TREE_CODE (t);
if (!(pp->flags & pp_c_flag_gnu_v3) && code != POINTER_TYPE)
pp_c_type_qualifier_list (pp, t);
switch (code)
{
case REFERENCE_TYPE:
case POINTER_TYPE:
{
/* Get the types-specifier of t... | false | false | false | false | false | 0 |
main(int argc, char **argv)
{
int error = 0;
struct sigaction sa;
CHAIN(error, process_command_line(argc, argv));
if (configfile == NULL)
configfile = DEFAULT_CONFIGFILE;
CHAIN(error, process_configfile(configfile));
if (report_dest == UNSET_INT || report_level == UNSET_INT) {
report_dest = RPT_DEST_STDERR;... | false | false | false | false | true | 1 |
resetTuneEE() {
resetParm("StringFlav:probStoUD");
resetParm("StringFlav:probQQtoQ");
resetParm("StringFlav:probSQtoQQ");
resetParm("StringFlav:probQQ1toQQ0");
resetParm("StringFlav:mesonUDvector");
resetParm("StringFlav:mesonSvector");
resetParm("StringFlav:mesonCvector");
resetParm("StringFlav:mesonB... | false | false | false | false | false | 0 |
gdpy_fragment_init(struct gdpy_fragment_t* self, PyObject *args,
PyObject *keys)
{
dtrace("%p, %p, %p", self, args, keys);
char *keywords[] = {"dirifle", "index", NULL};
if (!PyArg_ParseTupleAndKeywords(args, keys,
"O!i:pygetdata.fragment.__init__", keywords, &gdpy_dirfile,
&self->dirfile, s... | false | false | false | false | false | 0 |
parseSetEndImm(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
const AsmToken &Tok = Parser.getTok();
SMLoc S = Tok.getLoc();
if (Tok.isNot(AsmToken::Identifier)) {
Error(Tok.getLoc(), "'be' or 'le' operand expected");
return MatchOperand_ParseFail;
}
int Val = StringSwitch<int>(Tok.getString())
... | false | false | false | false | false | 0 |
check_delta_limit(struct object_entry *me, unsigned int n)
{
struct object_entry *child = me->delta_child;
unsigned int m = n;
while (child) {
unsigned int c = check_delta_limit(child, n + 1);
if (m < c)
m = c;
child = child->delta_sibling;
}
return m;
} | false | false | false | false | false | 0 |
i915_reset(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct i915_gpu_error *error = &dev_priv->gpu_error;
unsigned reset_counter;
int ret;
intel_reset_gt_powersave(dev);
mutex_lock(&dev->struct_mutex);
/* Clear any previous failed attempts at recovery. Time to try again. ... | false | false | false | false | false | 0 |
check_reason_string(struct check *check)
{
struct chunk *msg;
if (!check)
return NULL;
msg = get_trash_chunk();
chunk_printf(msg, "reason: %s", get_check_status_description(check->status));
if (check->status >= HCHK_STATUS_L57DATA)
chunk_appendf(msg, ", code: %d", check->code);
if (*check->desc) {
struc... | false | false | false | false | false | 0 |
dm9132_id_table(struct net_device *dev)
{
struct dmfe_board_info *db = netdev_priv(dev);
void __iomem *ioaddr = db->ioaddr + 0xc0;
u16 *addrptr = (u16 *)dev->dev_addr;
struct netdev_hw_addr *ha;
u16 i, hash_table[4];
/* Node address */
for (i = 0; i < 3; i++) {
dw16(0, addrptr[i]);
ioaddr += 4;
}
/* Clea... | false | false | false | false | false | 0 |
_opt_args(int argc, char **argv)
{
char **rest = NULL;
int leftover;
set_options(argc, argv);
leftover = 0;
if (optind < argc) {
rest = argv + optind;
while (rest[leftover] != NULL)
leftover++;
}
if (leftover != 1) {
error("too many parameters");
_usage();
exit(error_exit);
}
_parse_jobid_stepi... | false | false | false | false | false | 0 |
LI9(object V82,object first,...)
{
va_list ap;
int narg = VFUN_NARGS; VMB9 VMS9 VMV9
{register object V83;
object V84;
va_start(ap,first);
if(narg <1) too_few_arguments();
V83= V82;
narg= narg - 1;
V85 = (ALLOCA_CONS(narg),ON_STACK_LIST_VECTOR_NEW(narg,first,ap));
V84= V85;
{register object V86;
register o... | false | false | false | false | false | 0 |
ToString() const {
std::ostringstream os;
os << "DataCodec[" << id << ":" << name << "]";
return os.str();
}
} | false | false | false | false | false | 0 |
sbp_session_create(
struct sbp_tpg *tpg,
u64 guid)
{
struct sbp_session *sess;
int ret;
char guid_str[17];
struct se_node_acl *se_nacl;
sess = kmalloc(sizeof(*sess), GFP_KERNEL);
if (!sess) {
pr_err("failed to allocate session descriptor\n");
return ERR_PTR(-ENOMEM);
}
sess->se_sess = transport_init_s... | false | false | false | false | false | 0 |
fillchar_vsep(attr)
int *attr;
{
*attr = hl_attr(HLF_C);
if (*attr == 0 && fill_vert == ' ')
return '|';
else
return fill_vert;
} | false | false | false | false | false | 0 |
cd_convert_ti3_ti3_to_ccmx (const gchar *reference_fn,
const gchar *measured_fn,
const gchar *device_fn,
GError **error)
{
CdIt8 *it8_ccmx = NULL;
CdIt8 *it8_measured = NULL;
CdIt8 *it8_reference = NULL;
gboolean ret;
GFile *file_ccmx = NULL;
GFile *file_measured = NULL;
GFile *file_referenc... | false | false | false | false | false | 0 |
choose_closest_next( ant_struct *a, long int phase )
/*
FUNCTION: Chooses for an ant the closest city as the next one
INPUT: pointer to ant and the construction step "phase"
OUTPUT: none
(SIDE)EFFECT: ant moves to the chosen city
*/
{
long int city, current_city,... | false | false | false | false | false | 0 |
tcs3472_trigger_handler(int irq, void *p)
{
struct iio_poll_func *pf = p;
struct iio_dev *indio_dev = pf->indio_dev;
struct tcs3472_data *data = iio_priv(indio_dev);
int i, j = 0;
int ret = tcs3472_req_data(data);
if (ret < 0)
goto done;
for_each_set_bit(i, indio_dev->active_scan_mask,
indio_dev->masklengt... | false | false | false | false | false | 0 |
printJumpStats(const SolveStats& st) const {
if (st.jumps) {
const JumpStats& js = *st.jumps;
w_ += 8;
printf("\n");
printKeyValue("Backtracks", "%-6" PRIu64"\n", st.conflicts-st.analyzed);
printKeyValue("Backjumps", "%-6" PRIu64, st.analyzed);
printf(" (Bounded: %" PRIu64")\n", js.bJumps);
printKeyValue... | false | false | false | false | false | 0 |
main (int argc, char* argv [])
{
int I;
if (argc < 2) {
Usage (argv [0]);
}
for (I = 1; I < argc; I++) {
FILE* F;
const char* Filename = argv [I];
unsigned char MagicBuf [4];
unsigned char BuildBuf [2];
unsigned char VersionBuf [2];
unsigned Bui... | false | false | false | false | false | 0 |
selection_delete(gpaint_selection *s)
{
g_assert(s->timer);
gtk_timeout_remove(s->timer);
gdk_gc_unref(s->gc);
s->timer = 0;
selection_clear_flash(s);
g_free(s);
} | false | false | false | false | false | 0 |
SyncElementBelowStackPointer(int index) {
// Emit code to write elements below the stack pointer to their
// (already allocated) stack address.
ASSERT(index <= stack_pointer_);
FrameElement element = elements_[index];
ASSERT(!element.is_synced());
switch (element.type()) {
case FrameElement::INVALID:
... | false | false | false | false | false | 0 |
vunmap_pmd_range(pud_t *pud, unsigned long addr, unsigned long end)
{
pmd_t *pmd;
unsigned long next;
pmd = pmd_offset(pud, addr);
do {
next = pmd_addr_end(addr, end);
if (pmd_clear_huge(pmd))
continue;
if (pmd_none_or_clear_bad(pmd))
continue;
vunmap_pte_range(pmd, addr, next);
} while (pmd++, addr... | false | false | false | false | false | 0 |
CERT_MatchNickname(char *name1, char *name2) {
char *nickname1= NULL;
char *nickname2 = NULL;
char *token1;
char *token2;
char *token = NULL;
int len;
/* first deal with the straight comparison */
if (PORT_Strcmp(name1, name2) == 0) {
return PR_TRUE;
}
/* we need to handle the ... | false | false | false | false | false | 0 |
asn1_parse_integer_uint64(chunk_t blob)
{
u_int64_t val = 0;
int i;
for (i = 0; i < blob.len; i++)
{ /* if it is longer than 8 bytes, we just use the 8 LSBs */
val <<= 8;
val |= (u_int64_t)blob.ptr[i];
}
return val;
} | false | false | false | false | false | 0 |
hda_cleanup_all_streams(struct hda_codec *codec)
{
int i;
for (i = 0; i < codec->cvt_setups.used; i++) {
struct hda_cvt_setup *p = snd_array_elem(&codec->cvt_setups, i);
if (p->stream_tag)
really_cleanup_stream(codec, p);
}
} | false | false | false | false | false | 0 |
e1000_clear_vfta(struct e1000_hw *hw)
{
uint32_t offset;
uint32_t vfta_value = 0;
uint32_t vfta_offset = 0;
uint32_t vfta_bit_in_reg = 0;
if (hw->mac_type == e1000_ich8lan)
return;
if (hw->mac_type == e1000_82573) {
if (hw->mng_cookie.vlan_id != 0) {
/* The VFTA is ... | false | false | false | false | false | 0 |
gz_avail(state)
gz_statep state;
{
z_streamp strm = &(state->strm);
if (state->err != Z_OK)
return -1;
if (state->eof == 0) {
if (gz_load(state, state->in, state->size,
(unsigned *)&(strm->avail_in)) == -1)
return -1;
strm->next_in = state->in;
}
... | false | false | false | false | false | 0 |
evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
{
Evas_Object_Table_Option *opt;
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0);
if (rowspan < 1)
{
ERR("rowspan < 1");
return EINA_FAL... | false | false | false | false | false | 0 |
xsh_detmon_ronbias_histo(const cpl_imagelist * rawbiases,
const cpl_image * masterbias,
cpl_propertylist * qclist)
{
int nraws = cpl_imagelist_get_size(rawbiases);
int i;
double mbias = DBL_MAX;
double mfwhm = DBL_MAX;
doubl... | false | false | false | false | false | 0 |
dav_cmd_davdepthinfinity(cmd_parms *cmd, void *config,
int arg)
{
dav_dir_conf *conf = (dav_dir_conf *)config;
if (arg)
conf->allow_depthinfinity = DAV_ENABLED_ON;
else
conf->allow_depthinfinity = DAV_ENABLED_OFF;
return NULL;
} | false | false | false | false | false | 0 |
qib_copy_from_sge(void *data, struct qib_sge_state *ss, u32 length)
{
struct qib_sge *sge = &ss->sge;
while (length) {
u32 len = sge->length;
if (len > length)
len = length;
if (len > sge->sge_length)
len = sge->sge_length;
BUG_ON(len == 0);
memcpy(data, sge->vaddr, len);
sge->vaddr += len;
sge-... | false | false | false | false | false | 0 |
Itk_OptListRemove(olist, entry)
ItkOptList *olist; /* ordered list */
Tcl_HashEntry *entry; /* entry to be removed from the list */
{
int pos = 0;
int i, first, last, cmp;
char *swname, *optname;
first = 0;
last = olist->len-1;
swname = Tcl_GetHashKey(olist->options, entry) + 1;
... | false | false | false | false | false | 0 |
build_line_set(GF_Node *node, Drawable3D *stack, GF_TraverseState *tr_state)
{
u32 i, j, c_idx;
GenMFField *cols;
GF_Vertex vx;
Bool rgba_col;
SFColorRGBA rgba;
X_LineSet *p = (X_LineSet *)node;
X_Coordinate *c = (X_Coordinate *) p->coord;
stack->mesh->mesh_type = MESH_LINESET;
cols = NULL;
rgba_col = 0;
i... | false | false | false | false | false | 0 |
gageQueryReset(gageContext *ctx, gagePerVolume *pvl) {
static const char me[]="gageQueryReset";
AIR_UNUSED(ctx);
if (!( pvl )) {
biffAddf(GAGE, "%s: got NULL pointer", me);
return 1;
}
GAGE_QUERY_RESET(pvl->query);
return 0;
} | false | false | false | false | false | 0 |
_gtk_source_style_scheme_new_from_file (const gchar *filename)
{
char *text;
gsize text_len;
xmlDoc *doc;
xmlNode *node;
GError *error = NULL;
GtkSourceStyleScheme *scheme;
g_return_val_if_fail (filename != NULL, NULL);
if (!g_file_get_contents (filename, &text, &text_len, &error))
{
gchar *filename_utf8 =... | false | false | false | false | false | 0 |
upsdrv_initups(void)
{
struct termios tio;
char *v;
set_ups_type();
upsfd = ser_open(device_path);
if (tcgetattr(upsfd, &tio)) {
fatal_with_errno(EXIT_FAILURE, "tcgetattr");
}
/* don't hang up on last close */
tio.c_cflag &= ~HUPCL;
if (tcsetattr(upsfd, TCSANOW, &tio)) {
fatal_with_errno(EXIT_FAILURE,... | false | false | false | false | false | 0 |
setup_try_hard_regno_pseudos (int p, enum reg_class rclass)
{
int i, hard_regno;
enum machine_mode mode;
unsigned int spill_regno;
bitmap_iterator bi;
/* Find what pseudos could be spilled. */
EXECUTE_IF_SET_IN_BITMAP (&live_hard_reg_pseudos[p], 0, spill_regno, bi)
{
mode = PSEUDO_REGNO_MODE (sp... | false | false | false | false | false | 0 |
soap_markelement(struct soap *soap, const void *ptr, int type)
{
(void)soap; (void)ptr; (void)type; /* appease -Wall -Werror */
switch (type)
{
case SOAP_TYPE___ns1__pow:
soap_serialize___ns1__pow(soap, (const struct __ns1__pow *)ptr);
break;
case SOAP_TYPE___ns1__powResponse:
soap_serialize___ns1__powRespon... | false | false | false | false | false | 0 |
trace_finodelk (call_frame_t *frame, xlator_t *this, const char *volume,
fd_t *fd, int32_t cmd, struct gf_flock *flock, dict_t *xdata)
{
char *cmd_str = NULL;
char *type_str = NULL;
trace_conf_t *conf = NULL;
conf = this->private;
if (!co... | true | true | false | false | false | 1 |
receive_start_bit()
{
Dprintf(("USART received a start bit\n"));
if((value.get() & (CREN | SREN)) == 0) {
Dprintf((" but not enabled\n"));
return;
}
if(txsta && (txsta->value.get() & _TXSTA::BRGH))
set_callback_break(BRGH_FIRST_MID_SAMPLE);
else
set_callback_break(BRGL_FIRST_MID_SAMPLE);
... | false | false | false | false | false | 0 |
init_link(struct nvbios_init *init)
{
if (init_exec(init)) {
if (init->outp)
return !(init->outp->sorconf.link & 1);
error("script needs OR link\n");
}
return 0;
} | false | false | false | false | false | 0 |
_roster_in_sess_s10n(mod_instance_t mi, sess_t sess, pkt_t pkt)
{
mod_roster_t mroster = (mod_roster_t) mi->mod->private;
module_t mod = mi->mod;
item_t item;
pkt_t push;
int ns, elem, ret, items = -1;
log_debug(ZONE, "got s10n packet");
/* s10ns have to go to someone */
if(pkt->to == ... | false | false | false | false | false | 0 |
onefetch(ESL_GETOPTS *go, FILE *ofp, char *key, CM_FILE *cmfp)
{
ESL_ALPHABET *abc = NULL;
CM_t *cm = NULL;
int status;
if (cmfp->ssi != NULL)
{
status = cm_file_PositionByKey(cmfp, key);
if (status == eslENOTFOUND) cm_Fail("CM %s not found in SSI index for file %s\n",... | false | false | false | false | false | 0 |
create_liste_methods(GtkWidget*win,GtkWidget *frame, gboolean nothing)
{
GtkWidget *hbox;
GtkWidget *vbox;
GtkWidget *hseparator;
GtkTreeIter iter;
GtkTreeStore *store;
GtkTreeModel *model;
GtkWidget *combobox;
GtkCellRenderer *renderer;
vbox =create_vbox(frame);
VboxM[NM]=vbox;
hbox =create_h... | false | false | false | false | false | 0 |
gt_array_iterate(GtArray *a, GtArrayProcessor array_processor, void *info,
GtError *err)
{
unsigned long idx;
int rval;
gt_error_check(err);
gt_assert(a && array_processor);
for (idx = 0; idx < gt_array_size(a); idx++) {
if ((rval = array_processor(gt_array_get(a, idx), info, err)))
... | false | false | false | false | false | 0 |
fz_new_stroke_state_with_len(fz_context *ctx, int len)
{
fz_stroke_state *state;
len -= nelem(state->dash_list);
if (len < 0)
len = 0;
state = Memento_label(fz_malloc(ctx, sizeof(*state) + sizeof(state->dash_list[0]) * len), "fz_stroke_state");
state->refs = 1;
state->start_cap = FZ_LINECAP_BUTT;
state->dash... | false | false | false | false | false | 0 |
mga_warp_init(drm_mga_private_t *dev_priv)
{
u32 wmisc;
/* FIXME: Get rid of these damned magic numbers...
*/
switch (dev_priv->chipset) {
case MGA_CARD_TYPE_G400:
case MGA_CARD_TYPE_G550:
MGA_WRITE(MGA_WIADDR2, MGA_WMODE_SUSPEND);
MGA_WRITE(MGA_WGETMSB, 0x00000E00);
MGA_WRITE(MGA_WVRTXSZ, 0x00001807);
... | false | false | false | false | false | 0 |
save_story_list(struct z_story_list *story_list)
{
z_file *out;
struct z_story_list_entry *entry;
int i = 0;
char *quoted_serial = NULL;
char *quoted_title = NULL;
char *quoted_author = NULL;
char *quoted_language = NULL;
char *quoted_description = NULL;
char *quoted_filename = NULL;
char *quoted_bl... | false | false | false | false | true | 1 |
convert_log_mask (int lm_mask)
{
int syslog_mask = 0;
if (ACE_BIT_ENABLED (lm_mask, LM_TRACE)
|| ACE_BIT_ENABLED (lm_mask, LM_DEBUG))
ACE_SET_BITS (syslog_mask, LOG_MASK(LOG_DEBUG));
if (ACE_BIT_ENABLED (lm_mask, LM_STARTUP)
|| ACE_BIT_ENABLED (lm_mask, LM_SHUTDOWN)
|| ACE_BIT_ENABLED (lm_... | false | false | false | false | false | 0 |
start_guard_timer(struct sap_connection *conn, guint interval)
{
if (!conn)
return;
if (!conn->timer_id)
conn->timer_id = g_timeout_add_seconds(interval, guard_timeout,
conn);
else
error("Timer is already active.");
} | false | false | false | false | false | 0 |
mono_method_same_domain (MonoJitInfo *caller, MonoJitInfo *callee)
{
MonoMethod *cmethod;
if (!caller || caller->is_trampoline || !callee || callee->is_trampoline)
return FALSE;
/*
* If the call was made from domain-neutral to domain-specific
* code, we can't patch the call site.
*/
if (caller->domain_neu... | false | false | false | false | false | 0 |
xino_clear_xib(struct super_block *sb)
{
struct au_sbinfo *sbinfo;
SiMustWriteLock(sb);
sbinfo = au_sbi(sb);
sbinfo->si_xread = NULL;
sbinfo->si_xwrite = NULL;
if (sbinfo->si_xib)
fput(sbinfo->si_xib);
sbinfo->si_xib = NULL;
free_page((unsigned long)sbinfo->si_xib_buf);
sbinfo->si_xib_buf = NULL;
} | false | false | false | false | false | 0 |
ExecDropTupleTable(TupleTable table, /* tuple table */
bool shouldFree) /* true if we should free slot
* contents */
{
/*
* sanity checks
*/
Assert(table != NULL);
/*
* first free all the valid pointers in the tuple array and drop refcounts
* of any referenced buffers, if that's what the ... | false | false | false | false | false | 0 |
gst_mss_demux_get_property (GObject * object, guint prop_id, GValue * value,
GParamSpec * pspec)
{
GstMssDemux *mssdemux = GST_MSS_DEMUX (object);
switch (prop_id) {
case PROP_CONNECTION_SPEED:
g_value_set_uint (value, mssdemux->connection_speed / 1000);
break;
case PROP_MAX_QUEUE_SIZE_BUFF... | false | false | false | false | false | 0 |
allocate_callback (GtkWidget *canvas, GtkAllocation *allocation, ETableFieldChooser *etfc)
{
gdouble height;
etfc->last_alloc = *allocation;
gnome_canvas_item_set (
etfc->item,
"width", (gdouble) allocation->width,
NULL);
g_object_get (
etfc->item,
"height", &height,
NULL);
height = MAX (height, alloca... | false | false | false | false | false | 0 |
tracker_dbus_signal_cb (GDBusConnection *connection,
const gchar *sender_name,
const gchar *object_path,
const gchar *interface_name,
const gchar *signal_name,
GVariant *paramet... | false | false | false | false | false | 0 |
print() {
unsigned int i;
printf(" name: %s\n", project_name.c_str());
printf(" master URL: %s\n", master_url);
printf(" user_name: %s\n", user_name.c_str());
printf(" team_name: %s\n", team_name.c_str());
printf(" resource share: %f\n", resource_share);
printf(" user_total_cred... | false | false | false | false | false | 0 |
mwifiex_11h_activate(struct mwifiex_private *priv, bool flag)
{
u32 enable = flag;
/* enable master mode radar detection on AP interface */
if ((GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) && enable)
enable |= MWIFIEX_MASTER_RADAR_DET_MASK;
return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_SNMP_MIB,
HostCmd_... | false | false | false | false | false | 0 |
mac80211_hwsim_beacon(struct hrtimer *timer)
{
struct mac80211_hwsim_data *data =
container_of(timer, struct mac80211_hwsim_data,
beacon_timer.timer);
struct ieee80211_hw *hw = data->hw;
u64 bcn_int = data->beacon_int;
ktime_t next_bcn;
if (!data->started)
goto out;
ieee80211_iterate_active_interfac... | false | false | false | false | false | 0 |
recreate_database_from_document(Document* document, const sigc::slot<void>& progress)
{
ConnectionPool* connection_pool = ConnectionPool::get_instance();
if(!connection_pool)
return false; //Impossible anyway.
//Check whether the database exists already.
const Glib::ustring db_name = document->get_connecti... | false | false | false | false | false | 0 |
lookup_objprop(int id, int t)
{
if (id<0 || id>=oprop_cnt) return -1;
switch (t)
{
case 0: return proptable[id].r;
case 1: return proptable[id].n;
case 2: return proptable[id].c;
default: rprintf("INT ERROR: Invalid object type.\n");
return -1;
}
} | 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.