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 |
|---|---|---|---|---|---|---|
amdgpu_atombios_encoder_dpms(struct drm_encoder *encoder, int mode)
{
struct amdgpu_encoder *amdgpu_encoder = to_amdgpu_encoder(encoder);
DRM_DEBUG_KMS("encoder dpms %d to mode %d, devices %08x, active_devices %08x\n",
amdgpu_encoder->encoder_id, mode, amdgpu_encoder->devices,
amdgpu_encoder->active_device);... | false | false | false | false | false | 0 |
show_lpm_shift(ivl_lpm_t net, const char*shift_dir)
{
ivl_nexus_t nex;
unsigned width = ivl_lpm_width(net);
fprintf(out, " LPM_SHIFT%s %s: <width=%u, %ssigned>\n", shift_dir,
ivl_lpm_basename(net), width,
ivl_lpm_signed(net)? "" : "un");
nex = ivl_lpm_q(net, 0);
fprintf(ou... | false | false | false | false | false | 0 |
udc_alloc_bna_dummy(struct udc_ep *ep)
{
struct udc_request *req = NULL;
struct usb_request *_req = NULL;
/* alloc the dummy request */
_req = udc_alloc_request(&ep->ep, GFP_ATOMIC);
if (_req) {
req = container_of(_req, struct udc_request, req);
ep->bna_dummy_req = req;
udc_init_bna_dummy(req);
}
return r... | false | false | false | false | false | 0 |
cmatch(const char *class, int ch)
{
int not;
ch = lcase(ch);
if ((not = (*++class == '^'))) ++class;
while (1) {
if (*class == ']') return (char*)(not ? class + 1 : NULL);
if (*class == '\\') ++class;
if (class[1] == '-' && class[2] != ']') {
char lo = *class;
... | false | false | false | false | false | 0 |
SList_join(SList *left, SList *right){
register SListNode *head, *tail;
g_assert(left);
g_assert(right);
g_assert(left->set == right->set);
if(SList_isempty(right))
return left;
if(SList_isempty(left)){
head = left->head;
tail = left->tail;
left->head = right->hea... | false | false | false | false | false | 0 |
testCompositionJacobian(
double x,double y, double z, double yaw, double pitch, double roll,
double x2,double y2, double z2, double yaw2, double pitch2, double roll2)
{
const CPose3DQuat q1( CPose3D(x,y,z,yaw,pitch,roll) );
const CPose3DQuat q2( CPose3D(x2,y2,z2,yaw2,pitch2,roll2) );
// Theoretical Jacobi... | false | false | false | false | false | 0 |
writeto(const std::string& str,
const std::string& filename)
{
if (_proto_kind == binary)
_write_str_bin(_socket, str, filename);
else
_write_str(_socket, str, filename);
} | false | false | false | false | false | 0 |
e_source_registry_dup_unique_display_name (ESourceRegistry *registry,
ESource *source,
const gchar *extension_name)
{
GString *buffer;
GList *list, *link;
gchar *display_name;
gboolean need_clarification = FALSE;
g_return_val_if... | false | false | false | false | false | 0 |
AddConsumer(std::string& id,const std::string& client) {
lock_.lock();
if(id.empty()) {
for(int tries = 0;tries<1000;++tries) {
GUID(id);
ConsumerIterator i = consumers_.find(id);
if(i == consumers_.end()) break;
id.resize(0);
};
if(id.empty()) {
failure_ = "Failed to gener... | false | false | false | false | false | 0 |
cmd_create_dev_ht(gx_device_halftone **ppdht, gs_memory_t *mem)
{
gx_device_halftone *pdht = *ppdht;
if (pdht == 0) {
rc_header rc;
rc_alloc_struct_1(pdht, gx_device_halftone, &st_device_halftone, mem,
return_error(gs_error_VMerror),
"cmd_cre... | false | false | false | false | false | 0 |
globus_object_copy (const globus_object_t * object)
{
globus_object_t * copy;
globus_object_t * parent_copy;
if ( globus_object_assert_valid (object)
== GLOBUS_FALSE ) return NULL;
if ( object==NULL ) return NULL;
if ( object->parent_object != NULL ) {
parent_copy = globus_object_copy (object->... | false | false | false | false | false | 0 |
test_checkout_index__options_dir_modes(void)
{
#ifndef GIT_WIN32
git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
struct stat st;
git_oid oid;
git_commit *commit;
cl_git_pass(git_reference_name_to_id(&oid, g_repo, "refs/heads/dir"));
cl_git_pass(git_commit_lookup(&commit, g_repo, &oid));
reset_index_to_treeish... | false | false | false | false | false | 0 |
clish_command_choose_longest(clish_command_t *cmd1,
clish_command_t *cmd2)
{
unsigned len1 = (cmd1 ? strlen(clish_command__get_name(cmd1)) : 0);
unsigned len2 = (cmd2 ? strlen(clish_command__get_name(cmd2)) : 0);
if(len2 < len1)
{
return cmd1;
}
else if(... | false | false | false | false | false | 0 |
rompath_changed_cb (GFileMonitor *monitor,
GFile *file,
GFile *other_file,
GFileMonitorEvent event_type)
{
static GtkWidget *dialog = NULL;
gint response;
if (dialog != NULL)
return;
/* Filter out events we don... | false | false | false | false | false | 0 |
Icall_continue_error_handler(object error_name,object error_format_string,int nfmt_args,...)
{ object b[20];
b[0]= error_name;
b[1]= Ct; /* continue format */
b[2] = ihs_top_function_name(ihs_top);
b[3] = null_string; /*continue format arg*/
b[4] = error_format_string;
{int i = 0;
va_list ap;
va_sta... | false | false | false | false | false | 0 |
stream_tube_accept (TpSvcChannelTypeStreamTube *iface,
TpSocketAddressType address_type,
TpSocketAccessControl access_control,
const GValue *access_control_param,
DBusGMethodInvocation *context)
{
TpTestsStreamTubeChannel *self = (TpTestsStreamTubeChannel *) iface;
GError *error = NULL;
GValue *ad... | false | false | false | false | false | 0 |
string_to_geometricpoint (const GValue *src, GValue *dest)
{
GdaGeometricPoint *point;
const gchar *as_string;
g_return_if_fail (G_VALUE_HOLDS_STRING (src) &&
GDA_VALUE_HOLDS_GEOMETRIC_POINT (dest));
as_string = g_value_get_string (src);
point = g_new0 (GdaGeometricPoint, 1);
as_string++;
point->x = atof... | false | false | false | false | false | 0 |
ajStrKeepSetFilter(AjPStr *Pstr, const char* filter)
{
const char* cp;
char* cq;
if(!*Pstr)
*Pstr = ajStrNewResLenC("", 1, 0);
else if((*Pstr)->Use > 1)
ajStrGetuniqueStr(Pstr);
cp = cq = (*Pstr)->Ptr;
while(*cp)
{
if(filter[(int)*cp])
*cq++ = *cp;
... | false | false | false | false | false | 0 |
apol_mls_range_is_literal(const apol_mls_range_t * range)
{
if (range == NULL) {
return -1;
}
int ret;
if ((ret = apol_mls_level_is_literal(range->low)) != 0) {
return ret;
}
if (range->high != NULL) {
ret = apol_mls_level_is_literal(range->high);
}
return ret;
} | false | false | false | false | false | 0 |
ttm_check_swapping(struct ttm_mem_global *glob)
{
bool needs_swapping = false;
unsigned int i;
struct ttm_mem_zone *zone;
spin_lock(&glob->lock);
for (i = 0; i < glob->num_zones; ++i) {
zone = glob->zones[i];
if (zone->used_mem > zone->swap_limit) {
needs_swapping = true;
break;
}
}
spin_unlock(&gl... | false | false | false | false | true | 1 |
eat_whitespace(char **cursor)
{
while (**cursor && isspace(**cursor))
{
(*cursor)++;
}
if (**cursor == '\0')
{
return FALSE;
}
else
{
return TRUE;
}
} | false | false | false | false | false | 0 |
matrix(GMT_LONG nrl, GMT_LONG nrh, GMT_LONG ncl, GMT_LONG nch)
/* allocate a float matrix with subscript range m[nrl..nrh][ncl..nch] */
{
GMT_LONG i, nrow=nrh-nrl+1,ncol=nch-ncl+1;
float **m;
/* allocate pointers to rows */
m=(float **) malloc((size_t)((nrow+NR_END)*sizeof(float*)));
if (!m) nrerror("allocation f... | false | false | false | false | false | 0 |
init_big_from_rom(big x,int len,const mr_small *rom,int romsize,int *romptr)
{
int i;
zero(x);
x->len=len;
for (i=0;i<len;i++)
{
if (*romptr>=romsize) return FALSE;
#ifdef MR_AVR
x->w[i]=pgm_read_byte_near(&rom[*romptr]);
#else
x->w[i]=rom[*romptr];
#endif
(*romptr)++... | false | false | false | false | false | 0 |
iwpm_mapping_info_cb(struct sk_buff *skb, struct netlink_callback *cb)
{
struct nlattr *nltb[IWPM_NLA_MAPINFO_REQ_MAX];
const char *msg_type = "Mapping Info response";
u8 nl_client;
char *iwpm_name;
u16 iwpm_version;
int ret = -EINVAL;
if (iwpm_parse_nlmsg(cb, IWPM_NLA_MAPINFO_REQ_MAX,
resp_mapinfo_policy, ... | true | true | false | false | false | 1 |
afp_to_uri_scheme (GVfsUriMapper *mapper,
GMountSpec *spec)
{
const gchar *type = g_mount_spec_get (spec, "type");
if (strcmp ("afp-server", type) == 0 ||
strcmp ("afp-volume", type) == 0)
return "afp";
else
return NULL;
} | false | false | false | false | false | 0 |
bpf_any_get(void *raw, enum bpf_type type)
{
switch (type) {
case BPF_TYPE_PROG:
raw = bpf_prog_inc(raw);
break;
case BPF_TYPE_MAP:
raw = bpf_map_inc(raw, true);
break;
default:
WARN_ON_ONCE(1);
break;
}
return raw;
} | false | false | false | false | false | 0 |
hawki_image_stats_initialize
(cpl_table ** raw_stats)
{
int idet;
/* Error state variables */
cpl_errorstate prestate = cpl_errorstate_get();
/* Check inputs */
if(raw_stats == NULL)
return -1;
for( idet=0 ; idet<HAWKI_NB_DETECTORS ; idet++)
{
if(raw_stats[idet] == NULL... | false | false | false | false | false | 0 |
RedrawCurve(int index, double min_x, double max_x)
{
if (m_batch_count) return;
wxCHECK_RET((min_x<=max_x)&&(index>=0)&&(index<(int)m_curves.GetCount()), wxT("invalid curve index"));
wxCHECK_RET(!GetDataCurve(index), wxT("invalid curve"));
wxRect rect(m_areaClientRect);
if (min_x > m_viewRect.GetR... | false | false | false | false | false | 0 |
eval( const MapCoordinate& mc, ContainerBase* subject )
{
int num = 0;
while ( getEntry( mc, num).first ) {
GuiButton* b = host->getButton(num);
b->registerFunc( this, mc, subject, num );
b->Show();
++num;
}
GuiButton* b = host->getButton(num);
b->registerFunc( this... | false | false | false | false | false | 0 |
oom_scan_process_thread(struct oom_control *oc,
struct task_struct *task, unsigned long totalpages)
{
if (oom_unkillable_task(task, NULL, oc->nodemask))
return OOM_SCAN_CONTINUE;
/*
* This task already has access to memory reserves and is being killed.
* Don't allow any other task to have access to the rese... | false | false | false | false | false | 0 |
soc_camera_device_register(struct soc_camera_device *icd)
{
struct soc_camera_device *ix;
int num = -1, i;
mutex_lock(&list_lock);
for (i = 0; i < 256 && num < 0; i++) {
num = i;
/* Check if this index is available on this interface */
list_for_each_entry(ix, &devices, list) {
if (ix->iface == icd->iface ... | false | false | false | false | false | 0 |
kf_bfly_generic (kiss_fft_s32_cpx * Fout,
const size_t fstride, const kiss_fft_s32_cfg st, int m, int p)
{
int u, k, q1, q;
kiss_fft_s32_cpx *twiddles = st->twiddles;
kiss_fft_s32_cpx t;
int Norig = st->nfft;
CHECKBUF (scratchbuf, nscratchbuf, p);
for (u = 0; u < m; ++u) {
k = u;
for (q1 = 0; ... | false | false | false | false | false | 0 |
PyImport_GetImporter(PyObject *path) {
PyObject *importer=NULL, *path_importer_cache=NULL, *path_hooks=NULL;
path_importer_cache = PySys_GetObject("path_importer_cache");
path_hooks = PySys_GetObject("path_hooks");
if (path_importer_cache != NULL && path_hooks != NULL) {
importer = get_path_imp... | false | false | false | false | false | 0 |
playSample( int sampleId, int loop, bool withPriority ) {
int ret = -1;
if (enabled) {
if ( !withPriority || reservedChannels == 0 ) {
ret = Mix_PlayChannel(-1, mixChunks[sampleId], loop);
playsOn[ sampleId ] = ret;
} else {
lastUsedReservedChannel = (lastUsedReservedChannel+1) % reservedChannels;
ret... | false | false | false | false | false | 0 |
revocation_present(KBNODE keyblock)
{
KBNODE onode,inode;
PKT_public_key *pk=keyblock->pkt->pkt.public_key;
for(onode=keyblock->next;onode;onode=onode->next)
{
/* If we reach user IDs, we're done. */
if(onode->pkt->pkttype==PKT_USER_ID)
break;
if(onode->pkt->pkttype==PKT_SIGNATURE &&
on... | false | false | false | false | false | 0 |
fixup_flag(unsigned int idx)
{
if (idx>MAX_FLAG) {
LM_ERR("flag (%d) out of range %d..%d\n",
idx, 0, MAX_FLAG );
return 0;
}
return (1<<idx);
} | false | false | false | false | false | 0 |
readEntry(const QString& key)
{
return value(key).toString();
} | false | false | false | false | false | 0 |
ap_environment_add(ap_environment_t* env,
ap_var_t* name_of_intdim, size_t intdim,
ap_var_t* name_of_realdim, size_t realdim)
{
ap_environment_t* res;
denv_t denv2;
denv_t denv1 = denv_of_environment(env);
denv2.envint = env_add(&denv1.envint, name_of_intdim, intdim, NULL);
denv2.envreal =... | 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));
TemplatesView *_t = static_cast<TemplatesView *>(_o);
switch (_id) {
case 0: _t->currentItemChanged(); break;
case 1: _t... | false | false | false | false | false | 0 |
detach_node_from_list(listmgr_t *L, struct listnode *node)
{
struct listnode *n, *lastchecked = NULL;
n = L->head;
while(n != NULL)
{
if(n == node)
{
/* If node is first in list */
if(lastchecked == NULL)
{
L->head = n->next;
if(L->tail == n)
L->tail = NULL;
}
else
{
lastchec... | false | false | false | false | false | 0 |
mwifiex_flush_auto_tdls_list(struct mwifiex_private *priv)
{
struct mwifiex_auto_tdls_peer *peer, *tmp_node;
unsigned long flags;
spin_lock_irqsave(&priv->auto_tdls_lock, flags);
list_for_each_entry_safe(peer, tmp_node, &priv->auto_tdls_list, list) {
list_del(&peer->list);
kfree(peer);
}
INIT_LIST_HEAD(&pri... | false | false | false | false | false | 0 |
expand_hash(AV * a, HV * h) {
AV *add = newAV();
int len = hv_iterinit(h);
if (len) {
av_extend(add, len);
for(;;) {
HE * iter = hv_iternext(h);
if (!iter)
break;
// SV * k = HeSVKEY(iter);
SV * k = hv_iterkeysv(iter);
SV * v = HeVAL(iter);
av_push(add, newRV(k));
a... | false | false | false | false | false | 0 |
tg3_get_5787_nvram_info(struct tg3 *tp)
{
u32 nvcfg1;
nvcfg1 = tr32(NVRAM_CFG1);
switch (nvcfg1 & NVRAM_CFG1_5752VENDOR_MASK) {
case FLASH_5787VENDOR_ATMEL_EEPROM_64KHZ:
case FLASH_5787VENDOR_ATMEL_EEPROM_376KHZ:
case FLASH_5787VENDOR_MICRO_EEPROM_64KHZ:
case FLASH_5787VENDOR_MICRO_EEPROM_376KHZ:
tp->nvram_j... | false | false | false | false | false | 0 |
allocate_error(XMPP::StunAllocate::Error e)
{
QString str = allocate->errorString();
TurnClient::Error te;
if(e == StunAllocate::ErrorAuth)
te = TurnClient::ErrorAuth;
else if(e == StunAllocate::ErrorRejected)
te = TurnClient::ErrorRejected;
else if(e == StunAllocate::ErrorProtocol)
te = TurnClient... | false | false | false | false | false | 0 |
xgene_cle_set_rss_idt(struct xgene_enet_pdata *pdata)
{
u32 fpsel, dstqid, nfpsel, idt_reg, idx;
int i, ret = 0;
u16 pool_id;
for (i = 0; i < XGENE_CLE_IDT_ENTRIES; i++) {
idx = i % pdata->rxq_cnt;
pool_id = pdata->rx_ring[idx]->buf_pool->id;
fpsel = xgene_enet_ring_bufnum(pool_id) - 0x20;
dstqid = xgene_e... | false | false | false | false | false | 0 |
LocatePatch(cmsIT8* it8, const char* cPatch)
{
int i;
const char *data;
TABLE* t = GetTable(it8);
for (i=0; i < t-> nPatches; i++) {
data = GetData(it8, i, t->SampleID);
if (data != NULL) {
if (cmsstrcasecmp(data, cPatch) == 0)
return i;
... | false | false | false | false | false | 0 |
setRequest(Request *_request)
{
if ( _request && !m_request )
m_status = Pending;
if ( allowInLRUList() )
Cache::removeFromLRUList( this );
m_request = _request;
if ( allowInLRUList() )
Cache::insertInLRUList( this );
} | false | false | false | false | false | 0 |
PRNGTEST_Instantiate(const PRUint8 *entropy, unsigned int entropy_len,
const PRUint8 *nonce, unsigned int nonce_len,
const PRUint8 *personal_string, unsigned int ps_len)
{
int bytes_len = entropy_len + nonce_len + ps_len;
PRUint8 *bytes = NULL;
SECStatus rv;
if (entropy_len < 256/PR_BITS_PER_BYTE) {
... | false | false | false | false | false | 0 |
killswitch_destroy (Killswitch *ks)
{
g_return_if_fail (ks != NULL);
g_free (ks->name);
g_free (ks->path);
g_free (ks->driver);
memset (ks, 0, sizeof (Killswitch));
g_free (ks);
} | false | false | false | false | false | 0 |
find_title(const object *book, int msgtype) {
title *t;
titlelist *tl;
size_t length;
int index;
if (msgtype < 0)
return (title *)NULL;
tl = get_titlelist(msgtype);
if (!tl)
return (title *)NULL;
length = strlen(book->msg);
index = strtoint(book->msg);
for (t =... | false | false | false | false | false | 0 |
filter_compute_hash(struct slapi_filter *f)
{
PRUint32 h;
char **a;
struct slapi_filter *fx;
Slapi_Value **keylist;
Slapi_PBlock *pb;
struct berval *inval[2], **outval;
Slapi_Attr sattr;
if (! hash_filters)
return;
h = addhash_long(0, f->f_choice);
switch (f->f_choice) {
c... | false | false | false | false | false | 0 |
authenticateShutdown(void)
{
int i;
debug(29, 2) ("authenticateShutdown: shutting down auth schemes\n");
/* find the currently known authscheme types */
for (i = 0; authscheme_list && authscheme_list[i].typestr; i++) {
if (authscheme_list[i].donefunc != NULL)
authscheme_list[i].donefunc();
else
... | false | false | false | false | false | 0 |
Perl_grok_bin(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
{
const char *s = start;
STRLEN len = *len_p;
UV value = 0;
NV value_nv = 0;
const UV max_div_2 = UV_MAX / 2;
const bool allow_underscores = cBOOL(*flags & PERL_SCAN_ALLOW_UNDERSCORES);
bool overflowed = FALSE;
... | false | false | false | false | false | 0 |
drbg_add_buf(unsigned char *dst, size_t dstlen,
const unsigned char *add, size_t addlen)
{
/* implied: dstlen > addlen */
unsigned char *dstptr;
const unsigned char *addptr;
unsigned int remainder = 0;
size_t len = addlen;
dstptr = dst + (dstlen-1);
addptr = add + (addlen-1);
while (len) {
remainder += *... | false | false | false | false | false | 0 |
value(const int type, const QString &lang) const
{
if (type == Spec_Uuid) {
return d->m_Uuid;
}
QString l = lang;
if (lang.isEmpty())
l = QLocale().name().left(2);
SpecsBook *values = d->getLanguage(l);
if (!values)
return QString();
QVariant val = values->m_Specs.val... | false | false | false | false | false | 0 |
setScrollY()
{
if (verticalScrollBarPolicy != Qt::ScrollBarAlwaysOff) {
verticalScrollBar->blockSignals(true);
verticalScrollBar->setValue(-widget.data()->pos().y()/10.);
verticalScrollBar->blockSignals(false);
}
} | false | false | false | false | false | 0 |
setlayout(const Arg *arg) {
if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
selmon->sellt ^= 1;
if(arg && arg->v)
selmon->lt[selmon->sellt] = (Layout *)arg->v;
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
if(selmon->sel)
arrange(selmon);
else
drawbar(sel... | false | false | false | false | false | 0 |
testBranchWithNode(Node* current, double rnp, Node* start)
{
//tracking down the branch starting at the Node start, first test the collision with the startnode
if(current->collisionWithNode(start, rnp))
{
return true;
}
// then track down the branch
Node* temp = start;
while(temp->getNo... | false | false | false | false | false | 0 |
_dxf_listAppendItem(listO lo, Pointer item)
{
listP list = (listP)_dxf_getHwObjectData(lo);
if (! list)
return ERROR;
if(list->end == list->max)
{
Pointer tmp = DXReAllocate(list->items,list->max*2*sizeof(Pointer));
if(!tmp)
return ERROR;
list->max *= 2;
list->items = tmp;
... | false | false | false | false | false | 0 |
_sfree(int d, void *ptr)
{
if (_dma_mem_size) {
return mpool_free(_dma_pool, ptr);
}
if (_pgfree(ptr) < 0) {
kfree(ptr);
}
} | false | false | false | false | false | 0 |
_xml_route_dump_cb(void *data,
Eina_Simple_XML_Type type,
const char *value,
unsigned offset __UNUSED__,
unsigned length)
{
Route_Dump *dump = data;
if (!dump) return EINA_FALSE;
switch (type)
{
case EINA_SIMPLE_XML_OPEN:
... | false | false | false | false | false | 0 |
ast_cdr_register(const char *name, const char *desc, ast_cdrbe be)
{
struct ast_cdr_beitem *i = NULL;
if (!name)
return -1;
if (!be) {
ast_log(LOG_WARNING, "CDR engine '%s' lacks backend\n", name);
return -1;
}
AST_RWLIST_WRLOCK(&be_list);
AST_RWLIST_TRAVERSE(&be_list, i, list) {
if (!strcasecmp(name, ... | false | false | false | false | false | 0 |
createGLECode(string& code) {
ostringstream str;
str << "aline " << getP2().getX() << " " << getP2().getY();
addArrowToCode(str, getArrow());
code = str.str();
} | false | false | false | false | false | 0 |
sort_files(void)
{
if (ppanel_file->pd->cnt == 0)
return;
qsort(ppanel_file->files,ppanel_file->pd->cnt,sizeof(FILE_ENTRY *),qcmp);
} | false | false | false | false | false | 0 |
getAtr(LC_CLIENT *cl, GWEN_DB_NODE *dbArgs){
LC_CLIENT_RESULT res;
int timeOut;
LC_CARD *card=NULL;
timeOut=GWEN_DB_GetIntValue(dbArgs, "timeout", 0, CARD_TIMEOUT);
res=LC_Client_Start(cl);
if (res!=LC_Client_ResultOk) {
showError(0, res, "StartWait");
return 2;
}
res=LC_Client_GetNextCard(cl... | false | false | false | false | false | 0 |
gmon_io_write_32 (FILE *ofp, unsigned int val)
{
char buf[4];
bfd_put_32 (core_bfd, (bfd_vma) val, buf);
if (fwrite (buf, 1, 4, ofp) != 4)
return 1;
return 0;
} | false | false | false | false | false | 0 |
app_list_first(app_list_t *apps)
{
g_assert(apps != NULL);
if (!apps->apps)
return NULL;
apps->hamster = g_list_first(apps->apps);
return apps->hamster->data;
} | false | false | false | false | false | 0 |
gpk_cell_renderer_restart_set_property (GObject *object, guint param_id,
const GValue *value, GParamSpec *pspec)
{
GpkCellRendererRestart *cru = GPK_CELL_RENDERER_RESTART (object);
switch (param_id) {
case PROP_VALUE:
cru->value = g_value_get_uint (value);
cru->icon_name = gpk_restart_enum_to_icon_name ... | false | false | false | false | false | 0 |
mark_init(void)
{
uint32_t i;
mark = 0;
for (i = 0; i < dent_pool.size; i++)
if (!repo_dirent_is_dir(dent_pointer(i)) &&
dent_pointer(i)->content_offset > mark)
mark = dent_pointer(i)->content_offset;
mark++;
} | false | false | false | false | false | 0 |
GetTemplateArgArray(const wxString& templateArgs, bool remove_gt_lt, bool add_last)
{
wxString word;
wxString args = templateArgs; args.Trim(true).Trim(false);
if (remove_gt_lt) { args.Remove(0, 1); args.RemoveLast(); }
wxArrayString container;
for (size_t i = 0; i < args.Len(); ++i)
{
... | false | false | false | false | false | 0 |
syntax_highlight(
parse_iterator first,
parse_iterator last,
quickbook::state& state,
std::string const& source_mode,
bool is_block)
{
syntax_highlight_actions syn_actions(state, is_block);
// print the code with syntax coloring
if (source_mode == "c+... | false | false | false | false | false | 0 |
buildings( int process )
{
AiResult result;
displaymessage2("checking buildings ... ");
int buildingCounter = 0;
for ( Player::BuildingList::iterator bi = getPlayer().buildingList.begin(); bi != getPlayer().buildingList.end(); bi++ ) {
buildingCounter++;
displaymessage2("processing building %d... | false | false | false | false | false | 0 |
lancer_initiate_dump(struct be_adapter *adapter)
{
struct device *dev = &adapter->pdev->dev;
int status;
if (dump_present(adapter)) {
dev_info(dev, "Previous dump not cleared, not forcing dump\n");
return -EEXIST;
}
/* give firmware reset and diagnostic dump */
status = lancer_physdev_ctrl(adapter, PHYSDEV_... | false | false | false | false | false | 0 |
static_vertex_order (gamgi_voronoi *voronoi)
{
gamgi_polyhedron *polyhedron;
gamgi_vertex *vertex;
gamgi_slist *slist;
int n_seeds, order, i;
order = 0;
n_seeds = voronoi->n_seeds;
for (i = 0; i < n_seeds; i++)
{
polyhedron = voronoi->polyhedron[i];
if (polyhedron == NULL) continue;
for (slist = polyhedron->v... | false | false | false | false | false | 0 |
folks_test_utils_loop_run_with_timeout (GMainLoop* loop, gint timeout) {
GSource* source = NULL;
gint _tmp0_ = 0;
gint _tmp1_ = 0;
GSource* _tmp2_ = NULL;
GMainLoop* _tmp3_ = NULL;
GMainContext* _tmp4_ = NULL;
GMainLoop* _tmp5_ = NULL;
#line 66 "/home/treitter/collabora/folks/tests/lib/test-utils.vala"
g_return... | false | false | false | false | false | 0 |
jp2_write_jp2c(
opj_jp2_t *jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager
)
{
unsigned int j2k_codestream_exit;
unsigned char l_data_header [8];
// preconditions
assert(jp2 != 00);
assert(cio != 00);
assert(p_manager != 00);
assert(opj_stream_has_s... | false | false | false | false | false | 0 |
entangle_control_group_get_by_path(EntangleControlGroup *group,
const gchar *path)
{
g_return_val_if_fail(ENTANGLE_IS_CONTROL_GROUP(group), NULL);
g_return_val_if_fail(path != NULL, NULL);
EntangleControlGroupPrivate *priv = group->priv;
size_t i;
... | false | false | false | false | false | 0 |
glusterd_store_retrieve_value (glusterd_store_handle_t *handle,
char *key, char **value)
{
int32_t ret = -1;
char *scan_str = NULL;
char *iter_key = NULL;
char *iter_val = NULL;
char *free_str = NU... | false | true | false | true | true | 1 |
zx_DEC_ELEM_xa_Policy(struct zx_ctx* c, struct zx_xa_Policy_s* x)
{
struct zx_elem_s* el = x->gg.kids;
switch (el->g.tok) {
case zx_xa_Description_ELEM:
if (!x->Description)
x->Description = el;
return 1;
case zx_xa_PolicyDefaults_ELEM:
if (!x->PolicyDefaults)
x->PolicyDefaults = (struct... | false | false | false | false | false | 0 |
make_block_reach_def(Block *head, RdState *rs)
{
Block *bp;
rs->restart = FALSE;
for (bp = head; bp != NULL; bp = bp->next) {
if (pre_block_is_all_analysed(bp, rs)) {
block_first_rd(bp, rs);
block_rd(bp, rs);
}
else
rs->restart = TRUE;
}
if (rs->restart)
make_block_reach_def(hea... | false | false | false | false | false | 0 |
skd_comp_q(int irq, void *skd_host_data)
{
struct skd_device *skdev = skd_host_data;
unsigned long flags;
int flush_enqueued = 0;
int deferred;
spin_lock_irqsave(&skdev->lock, flags);
pr_debug("%s:%s:%d MSIX = 0x%x\n",
skdev->name, __func__, __LINE__,
SKD_READL(skdev, FIT_INT_STATUS_HOST));
SKD_WRITEL(skd... | false | false | false | false | false | 0 |
ccp_find_mmio_area(struct ccp_device *ccp)
{
struct device *dev = ccp->dev;
struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
resource_size_t io_len;
unsigned long io_flags;
io_flags = pci_resource_flags(pdev, IO_BAR);
io_len = pci_resource_len(pdev, IO_BAR);
if ((io_flags & IORESOURCE_MEM) && (io_... | false | false | false | false | false | 0 |
allfiles_create_node (char *term, REFERENCE **fref)
{
int i;
struct text_buffer text;
size_t off;
FILE_BUFFER *fb;
text_buffer_init (&text);
text_buffer_printf (&text, _("File names matching `%s'"), term);
text_buffer_add_char (&text, 0);
off = text.off;
text_buffer_printf (&text,
"\n\n%c\... | false | false | false | false | false | 0 |
GC_clear_roots GC_PROTO((void))
{
DCL_LOCK_STATE;
DISABLE_SIGNALS();
LOCK();
roots_were_cleared = TRUE;
n_root_sets = 0;
GC_root_size = 0;
# if !defined(MSWIN32) && !defined(MSWINCE)
{
register int i;
for (i = 0; i < RT_SIZE; i++) GC_root_index[i] = 0;
}
# endif
... | false | false | false | false | false | 0 |
client_socket_cb (GSocket *socket,
GIOCondition condition,
TpStreamTubeChannel *self)
{
GError *error = NULL;
if (!g_socket_check_connect_result (socket, &error))
{
DEBUG ("Failed to connect to socket: %s", error->message);
operation_failed (self, error);
g_error_free (error);
... | false | false | false | false | false | 0 |
dsc_read_doseps(CDSC *dsc)
{
unsigned char *line = (unsigned char *)dsc->line;
if ((dsc->doseps = (CDSCDOSEPS *)dsc_memalloc(dsc, sizeof(CDSCDOSEPS))) == NULL)
return CDSC_ERROR; /* no memory */
dsc->doseps->ps_begin = dsc_get_dword(line+4);
dsc->doseps->ps_length = dsc_get_dword(line+8);
dsc->do... | false | false | false | false | false | 0 |
citizen_luxury_happy(struct city *pcity, int *luxuries)
{
citizens *happy = &pcity->feel[CITIZEN_HAPPY][FEELING_LUXURY];
citizens *content = &pcity->feel[CITIZEN_CONTENT][FEELING_LUXURY];
citizens *unhappy = &pcity->feel[CITIZEN_UNHAPPY][FEELING_LUXURY];
citizens *angry = &pcity->feel[CITIZEN_ANGRY][FEELING_LUX... | false | false | false | false | false | 0 |
gsearch_history_entry_set_enable_completion (GsearchHistoryEntry *entry,
gboolean enable)
{
g_return_if_fail (GSEARCH_IS_HISTORY_ENTRY (entry));
if (enable)
{
if (entry->priv->completion != NULL)
return;
entry->priv->completion = gtk_entry_completion_new ();
gtk_entry_completion_set... | false | false | false | false | false | 0 |
parse_group (xmlNodePtr node, InputPadGroup **pgroup)
{
xmlNodePtr current;
gboolean has_name = FALSE;
gboolean has_table = FALSE;
InputPadTable **ptable = &((*pgroup)->table);
for (current = node; current; current = current->next) {
if (current->type == XML_ELEMENT_NODE) {
if (... | false | false | false | false | false | 0 |
gfarm_hostspec_to_string(struct gfarm_hostspec *hostspec,
char *string, size_t size)
{
unsigned char *a, *m;
if (size <= 0)
return;
switch (hostspec->type) {
case GFHS_ANY:
string[0] = '\0';
return;
case GFHS_NAME:
strncpy(string, hostspec->u.name, size);
return;
case GFHS_AF_INET4:
a = (unsigned c... | false | false | false | false | false | 0 |
ossl_x509name_to_a(VALUE self)
{
X509_NAME *name;
X509_NAME_ENTRY *entry;
int i,entries,nid;
char long_name[512];
const char *short_name;
VALUE ary, vname, ret;
GetX509Name(self, name);
entries = X509_NAME_entry_count(name);
if (entries < 0) {
OSSL_Debug("name entries < 0!");
retu... | false | false | false | false | false | 0 |
gt_pch_p_13convert_optab (void *this_obj ATTRIBUTE_UNUSED,
void *x_p,
gt_pointer_operator op ATTRIBUTE_UNUSED,
void *cookie ATTRIBUTE_UNUSED)
{
struct convert_optab * const x ATTRIBUTE_UNUSED = (struct convert_optab *)x_p;
{
size_t i0;
for (i0 = 0; i0 < (size_t)(NUM_MACHINE_MODES); i0++) {
{
... | false | false | false | false | false | 0 |
parse_name (ccss_color_t *self,
char const *css_color_name)
{
g_return_val_if_fail (css_color_name && self, false);
for (unsigned int i = 0; i < G_N_ELEMENTS (_color_map); i++) {
if (0 == g_ascii_strcasecmp (_color_map[i].name, css_color_name)) {
self->red = _color_map[i].color.red;
self->green = _color... | false | false | false | false | false | 0 |
bson_append_code_w_scope_n( bson *b, const char *name,
const char *code, int len, const bson *scope ) {
int sl = len + 1;
int size = 4 + 4 + sl + bson_size( scope );
if ( bson_append_estart( b, BSON_CODEWSCOPE, name, size ) == BSON_ERROR )
return BSON_ERROR;
bson... | false | false | false | false | false | 0 |
get_reports_callback (DBusGProxy *proxy,
SyncevoReports *reports,
GError *error,
ServerAsyncData *data)
{
if (data->callback) {
(*(SyncevoServerGetReportsCb)data->callback) (data->server,
... | false | false | false | false | false | 0 |
sii9234_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct device *dev = &client->dev;
struct sii9234_platform_data *pdata = dev->platform_data;
struct sii9234_context *ctx;
int ret;
ctx = devm_kzalloc(&client->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx) {
dev_err(dev, "out of memory\n... | false | false | false | false | false | 0 |
test_init(void)
{
int err;
if ((err = platform_driver_register(&test_driver)))
return err;
if ((test0 = platform_device_alloc("rtc-test", 0)) == NULL) {
err = -ENOMEM;
goto exit_driver_unregister;
}
if ((test1 = platform_device_alloc("rtc-test", 1)) == NULL) {
err = -ENOMEM;
goto exit_put_test0;
}
... | false | false | false | false | false | 0 |
cg_rd_ctrl_file(const char *subsys, const char *cgroup,
const char *file, char **value)
{
char path[FILENAME_MAX];
FILE *ctrl_file = NULL;
int ret;
if (!cg_build_path_locked(cgroup, path, subsys))
return ECGFAIL;
strncat(path, file, sizeof(path) - strlen(path));
ctrl_file = fopen(path, "re");
if (!ctrl_... | true | true | true | false | true | 1 |
renameinstance(lofig_list *f)
{
loins_list *i;
char tab[512];
for (i=f->LOINS;i;i=i->NEXT) {
strcpy(tab, "v_");
strcat(tab, i->INSNAME);
i->INSNAME=namealloc(tab);
}
} | true | true | false | false | false | 1 |
rqst_exp_get_by_name(struct svc_rqst *rqstp, struct path *path)
{
struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT);
struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
struct cache_detail *cd = nn->svc_export_cache;
if (rqstp->rq_client == NULL)
goto gss;
/* First try the auth_unix client: */
ex... | 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.