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 |
|---|---|---|---|---|---|---|
amd_put_event_constraints(struct cpu_hw_events *cpuc,
struct perf_event *event)
{
if (amd_has_nb(cpuc) && amd_is_nb_event(&event->hw))
__amd_put_nb_event_constraints(cpuc, event);
} | false | false | false | false | true | 1 |
ns1__srmReassignToUser (struct soap *soap, struct ns1__srmReassignToUserRequest *req, struct ns1__srmReassignToUserResponse_ *rep)
{
char clientdn[256];
const char *clienthost;
char func[16];
struct ns1__srmReassignToUserResponse *repp;
struct srm_srv_thread_info *thip = soap->user;
strcpy (func, "ReassignToUser... | false | false | false | false | false | 0 |
increment_set_input_source_ops (GsdKeyboardManager *manager)
{
GsdKeyboardManagerPrivate *priv = manager->priv;
if (!priv->invocation)
return;
priv->pending_ops += 1;
} | false | false | false | false | false | 0 |
_e_smart_clip_unset(Evas_Object *obj)
{
E_Smart_Data *sd;
/* try to get the objects smart data */
if (!(sd = evas_object_smart_data_get(obj))) return;
/* unset the clip */
if (sd->o_scroll) evas_object_clip_unset(sd->o_scroll);
} | false | false | false | false | false | 0 |
cl_thread_list_get_thread_by_name(cl_raw_list_t* list_p, char* thread_name) { /* CR check */
cl_thread_list_elem_t* elem = NULL;
cl_thread_settings_t* thread_config = NULL;
if (thread_name == NULL) {
return NULL;
}
for (elem = cl_thread_list_get_first_elem(list_p); elem != NULL ; elem = cl_threa... | false | false | false | false | false | 0 |
ChoosePortalStrategy(List *parseTrees)
{
int nSetTag;
ListCell *lc;
/*
* PORTAL_ONE_SELECT and PORTAL_UTIL_SELECT need only consider the
* single-Query-struct case, since there are no rewrite rules that can add
* auxiliary queries to a SELECT or a utility command.
*/
if (list_length(parseTrees) == 1)
... | false | false | false | false | false | 0 |
nssCRL_Create (
nssPKIObject *object
)
{
PRStatus status;
NSSCRL *rvCRL;
NSSArena *arena = object->arena;
PR_ASSERT(object->instances != NULL && object->numInstances > 0);
rvCRL = nss_ZNEW(arena, NSSCRL);
if (!rvCRL) {
return (NSSCRL *)NULL;
}
rvCRL->object = *object;
/* XXX shoul... | false | false | false | false | false | 0 |
SPF_request_query_fallback(SPF_request_t *spf_request,
SPF_response_t **spf_responsep,
const char *record)
{
SPF_server_t *spf_server;
SPF_record_t *spf_record;
SPF_errcode_t err;
SPF_ASSERT_NOTNULL(spf_request);
spf_server = spf_request->spf_server;
SPF_ASSERT_NOTNULL(spf_server);
*spf_responsep = SP... | false | false | false | false | false | 0 |
gz_compress_mmap(in, out)
FILE *in;
gzFile out;
{
int len;
int err;
int ifd = fileno(in);
caddr_t buf; /* mmap'ed buffer for the entire input file */
off_t buf_len; /* length of the input file */
struct stat sb;
/* Determine the size of the file, needed for mmap: */
if (fs... | false | false | false | false | false | 0 |
heapify_f(heap * h, int i, int index[], float dist[])
{
int l, r, largest;
while (1) {
l = left(i);
r = right(i);
if (insideHeap(h, l) && greaterPriority(h, l, i, dist))
largest = l;
else
largest = i;
if (insideHeap(h, r) && greaterPriority(h, r, largest, dist))
largest = r;
if (largest ==... | false | false | false | false | false | 0 |
parser_st2tuple(PyST_Object *self, PyObject *args, PyObject *kw)
{
PyObject *line_option = 0;
PyObject *col_option = 0;
PyObject *res = 0;
int ok;
static char *keywords[] = {"st", "line_info", "col_info", NULL};
if (self == NULL || PyModule_Check(self)) {
ok = PyArg_ParseTupleAndKeywor... | false | false | false | false | false | 0 |
_sc92031_set_mar(struct net_device *dev)
{
struct sc92031_priv *priv = netdev_priv(dev);
void __iomem *port_base = priv->port_base;
u32 mar0 = 0, mar1 = 0;
if ((dev->flags & IFF_PROMISC) ||
netdev_mc_count(dev) > multicast_filter_limit ||
(dev->flags & IFF_ALLMULTI))
mar0 = mar1 = 0xffffffff;
else if ... | false | false | false | false | false | 0 |
mrpc_dispatch_loop(struct mrpc_conn_set *set)
{
int ret;
ret=mrpc_dispatch_validate(set);
if (ret)
return ret;
while (1) {
ret=mrpc_dispatch_one(set);
if (ret == EAGAIN)
selfpipe_wait(set->events_notify_pipe);
else if (ret)
break;
}
return ret;
} | false | false | false | false | false | 0 |
mq_set_inode_xattr (xlator_t *this, loc_t *loc)
{
struct gf_flock lock = {0, };
quota_local_t *local = NULL;
int32_t ret = 0;
call_frame_t *frame = NULL;
frame = create_frame (this, this->ctx->pool);
if (!frame) {
ret = -1;
... | false | false | false | false | false | 0 |
xmlSecQName2BitMaskDebugXmlDump(xmlSecQName2BitMaskInfoConstPtr info, xmlSecBitMask mask,
const xmlChar* name, FILE* output) {
unsigned int ii;
xmlSecAssert(info != NULL);
xmlSecAssert(name != NULL);
xmlSecAssert(output != NULL);
if(mask == 0) {
return;
}
... | false | false | false | false | false | 0 |
scsi_get_cd_drive_mask (void)
{
uae_u32 mask = 0;
for (int i = 0; i < MAX_TOTAL_SCSI_DEVICES; i++) {
struct devstruct *dev = &devst[i];
if (dev->iscd)
mask |= 1 << i;
}
return mask;
} | false | false | false | false | false | 0 |
foreach_selection_changed (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
ForeachSelectionData *data)
{
gboolean visible = data->numselected == 0 ||
gtk_tree_selection_path_is_sele... | false | false | false | false | false | 0 |
PHash_tableInit_(PHash* self, int log2tableSize)
{
if (log2tableSize > 20)
printf("ouuups");
self->log2tableSize = log2tableSize;
self->tableSize = 1<<self->log2tableSize;
self->records = (PHashRecord *)io_calloc(1, sizeof(PHashRecord) * self->tableSize * 2);
memset(self->records, 0x0, sizeof(PHashRecord) * self... | false | false | false | false | false | 0 |
orinoco_hw_disassociate(struct orinoco_private *priv,
u8 *addr, u16 reason_code)
{
struct hermes *hw = &priv->hw;
int err;
struct {
u8 addr[ETH_ALEN];
__le16 reason_code;
} __packed buf;
/* Currently only supported by WPA enabled Agere fw */
if (!priv->has_wpa)
return -EOPNOTSUPP;
memcpy(buf.addr... | false | true | false | false | false | 1 |
brasero_burn_uri_start (BraseroJob *job,
GError **error)
{
BraseroBurnURIPrivate *priv;
BraseroBurnResult result;
BraseroJobAction action;
BraseroBurnURI *self;
BraseroTrack *track;
GSList *grafts;
gchar *uri;
self = BRASERO_BURN_URI (job);
priv = BRASERO_BURN_URI_PRIVATE (self);
/* skip that part */
br... | false | false | false | false | false | 0 |
mono_method_same_domain (MonoJitInfo *caller, MonoJitInfo *callee)
{
MonoMethod *cmethod;
if (!caller || !callee)
return FALSE;
/*
* If the call was made from domain-neutral to domain-specific
* code, we can't patch the call site.
*/
if (caller->domain_neutral && !callee->domain_neutral)
return FALSE;
... | false | false | false | false | false | 0 |
ossl_x509crl_verify(VALUE self, VALUE key)
{
X509_CRL *crl;
int ret;
GetX509CRL(self, crl);
if ((ret = X509_CRL_verify(crl, GetPKeyPtr(key))) < 0) {
ossl_raise(eX509CRLError, NULL);
}
if (ret == 1) {
return Qtrue;
}
return Qfalse;
} | false | false | false | false | false | 0 |
_wrap_apol_nodecon_query_t_set_mask(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[5];
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
for (ii = 0; (ii < 4) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 3) {
... | false | false | false | false | false | 0 |
ListExpr1 (
Expr expr )
{
Obj list; /* list value, result */
Int len; /* logical length of the list */
/* get the length of the list */
len = SIZE_EXPR(expr) / sizeof(Expr)... | false | false | false | false | false | 0 |
nmasldap_get_password(
LDAP *ld,
char *objectDN,
size_t *pwdSize, // in bytes
char *pwd )
{
int err = 0;
struct berval *requestBV = NULL;
char *replyOID = NULL;
struct berval *replyBV = NULL;
int serverVersion;
char *pwdBuf;
size_t pwdBufLen, bufferLen;
#ifdef NOT_N_PLAT_NLM
int currentThreadGr... | false | false | false | false | false | 0 |
reset_startup_rule(MAILSTREAM *stream)
{
long rflags = ROLE_DO_OTHER;
PAT_STATE pstate;
PAT_S *pat;
unsigned startup_rule;
startup_rule = IS_NOTSET;
if(stream && nonempty_patterns(rflags, &pstate)){
for(pat = first_pattern(&pstate); pat; pat = next_pattern(&pstate)){
if(m... | false | true | false | false | false | 1 |
fcopy(f, g, n)
FILE *f, *g; /* source and destination files */
/* now use uzoff_t for all file sizes 5/14/05 CS */
uzoff_t n; /* number of bytes to copy or -1 for all */
/* Copy n bytes from file *f to file *g, or until EOF if (zoff_t)n == -1.
Return an error code in the ZE_ class. */
... | false | false | false | false | true | 1 |
CL_Download_f (void)
{
char filename[MAX_OSPATH];
if (Cmd_Argc() != 2)
{
Com_Printf("Usage: download <filename>\n");
return;
}
Com_sprintf(filename, sizeof(filename), "%s", Cmd_Argv(1));
if (strstr (filename, ".."))
{
Com_Printf ("Refusing to download a path with ..\n");
return;
}
... | true | true | false | false | false | 1 |
incomingConnection(int descriptor)
{
KLocalSocket *socket = new KLocalSocket(this);
KLocalSocketPrivate *socket_d = KLocalSocketPrivate::d(socket);
socket_d->localPath = d->localPath;
socket_d->type = d->type;
socket->setSocketDescriptor(descriptor, QAbstractSocket::ConnectedState, QIODevice::ReadW... | false | false | false | false | false | 0 |
DiffCyc (
Obj opL,
Obj opR )
{
UInt nl, nr; /* order of left and right field */
UInt n; /* order of smallest superfield */
UInt ml, mr; /* cofactors into the superfield */
UInt ... | false | false | false | false | false | 0 |
tpl_text_channel_list_features (TpProxyClass *cls G_GNUC_UNUSED)
{
static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
static GQuark depends_on[3] = { 0, 0, 0 };
if (G_LIKELY (features[0].name != 0))
return features;
features[FEAT_CORE].name = TPL_TEXT_CHANNEL_FEATURE_CORE;
features[FEAT_CORE].prepa... | false | false | false | false | false | 0 |
output(void)
{
int i;
char buf[4096];
char *s;
if(!nflag)
qsort(dirbuf, ndir, sizeof dirbuf[0], (int (*)(const void*, const void*))compar);
for(i=0; i<ndir; i++)
dowidths(dirbuf[i].d);
for(i=0; i<ndir; i++) {
if(!pflag && (s = dirbuf[i].prefix)) {
if(strcmp(s, "/") ==0) /* / is a special case */
s =... | true | true | false | false | false | 1 |
bifpty(bifcxdef *ctx, int argc)
{
prpnum prpn;
objnum objn;
uint ofs;
runsdef val;
objnum orn;
objdef *objptr;
prpdef *propptr;
bifcntargs(ctx, 2, argc);
/* get offset of obj.prop */
objn = runpopobj(ctx->bifcxrun);
prpn = runpopprp(ctx->bifcx... | false | false | false | false | false | 0 |
pixbuf_loader_size_prepared_cb (GdkPixbufLoader *loader,
int width,
int height,
gpointer user_data)
{
ScaleData *scale_data = user_data;
scale_data->original_width = width;
scale_data->original_height = height;
scale_data->loader_width = width;
scale_data->loader_heig... | false | false | false | false | false | 0 |
showLyrics( const QString &lyrics ) const
{
DEBUG_BLOCK
Meta::TrackPtr track = The::engineController()->currentTrack();
if( !track )
return;
LyricsManager::self()->lyricsResult( lyrics, false );
} | false | false | false | false | false | 0 |
gst_codec_utils_mpeg4video_caps_set_level_and_profile (GstCaps * caps,
const guint8 * vis_obj_seq, guint len)
{
const gchar *profile, *level;
g_return_val_if_fail (GST_IS_CAPS (caps), FALSE);
g_return_val_if_fail (GST_CAPS_IS_SIMPLE (caps), FALSE);
g_return_val_if_fail (vis_obj_seq != NULL, FALSE);
prof... | false | false | false | false | false | 0 |
server_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct gf_flock *lock,
dict_t *xdata)
{
gfs3_lk_rsp rsp = {0,};
rpcsvc_request_t *req = NULL;
server_state_t *state = NULL;
req = frame->local;
... | false | false | false | false | false | 0 |
_cb_border_add(void *data, __UNUSED__ int type, void *event)
{
E_Event_Border_Add *ev = event;
Plugin *p = data;
if (!_border_item_add(p, ev->border))
return ECORE_CALLBACK_PASS_ON;
EVRY_PLUGIN_ITEMS_CLEAR(p);
EVRY_PLUGIN_ITEMS_ADD(p, p->borders, p->input, 1, 0);
EVRY_PLUGIN_UPDATE(p, EVRY_UP... | false | false | false | false | false | 0 |
initData(const size_t len) {
length = len;
uintLength = length/W+1;
data = new uint[uintLength];
for(uint i=0;i<uintLength;i++)
data[i] = 0;
} | false | false | false | false | false | 0 |
tomoyo_read_self(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
const char *domain = tomoyo_domain()->domainname->name;
loff_t len = strlen(domain);
loff_t pos = *ppos;
if (pos >= len || !count)
return 0;
len -= pos;
if (count < len)
len = count;
if (copy_to_user(buf, domain + pos, le... | false | false | false | false | false | 0 |
vficon_index_get_data(ViewFile *vf, gint row)
{
IconData *id;
id = g_list_nth_data(vf->list, row);
return id ? id->fd : NULL;
} | false | false | false | false | false | 0 |
list_concat(list *l, list *l2)
{
if (!l || !l2)
return;
if (!l2->front)
return;
if (!l->front)
{
l->front = l2->front;
l->back = l2->back;
l->cnt = l2->cnt;
}
else
{
l->back->next = l2->front;
l2->front->prev = l->back;
l->back = l2->back;
l->cnt += l2->cnt;
}
l2->front = l2->back = NULL;
... | false | false | false | false | false | 0 |
pcauchy(gnm_float x, gnm_float location, gnm_float scale,
gboolean lower_tail, gboolean log_p)
{
#ifdef IEEE_754
if (gnm_isnan(x) || gnm_isnan(location) || gnm_isnan(scale))
return x + location + scale;
#endif
if (scale <= 0) ML_ERR_return_NAN;
x = (x - location) / scale;
if (gnm_isnan(x)) ML_... | false | false | false | false | false | 0 |
http_impl_init(Slapi_ComponentId *plugin_id)
{
int status = HTTP_IMPL_SUCCESS;
slapi_log_error(SLAPI_LOG_PLUGIN, HTTP_PLUGIN_SUBSYSTEM,
"-> http_impl_init \n");
httpConfig = NULL;
httpConfig = (httpPluginConfig *) slapi_ch_calloc(1, sizeof(httpPluginConfig));
status = readConfigLDAPurl(plugin_id, HTT... | false | false | false | false | false | 0 |
qof_format_time(const gchar *format, const struct tm *tm)
{
gchar *locale_format, *tmpbuf, *retval;
gsize tmplen, tmpbufsize;
g_return_val_if_fail(format, 0);
g_return_val_if_fail(tm, 0);
locale_format = qof_time_format_from_utf8(format);
if (!locale_format)
return NULL;
tmpbufsiz... | false | false | false | false | false | 0 |
create_mask(gchar *data[], Pixmap *mask)
{
Pixmap tmp_pm;
if (XpmCreatePixmapFromData(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
data, &tmp_pm, mask, NULL) == XpmSuccess)
XFreePixmap(GDK_DISPLAY(), tmp_pm);
else
g_critical("Could not create pixmap from data");
} | false | false | false | false | false | 0 |
g_copy_files_ready_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
{
CopyFilesData *cfd = user_data;
GFile *source = cfd->source->data;
GError *error = NULL;
if (! g_file_copy_finish (source, result, &error)) {
/* source... | false | false | false | false | false | 0 |
_wrap_new_ho_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ho_string *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)":new_ho_string")) SWIG_fail;
{
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
result = (ho_string *)new ho_string();
SWIG_PYTHON_THREAD_END_ALLOW;
}
resu... | false | false | false | false | false | 0 |
generic_post_check(int needs_art, FILE **fp, char **file_name)
{
if (global.busy)
XBell(display, 0);
else if (!global.domain_name)
set_message("Domain name not available, posting will not be allowed!",
True);
else if (!global.user_id)
set_message("User id not available, posting will not be allowed!... | false | false | false | false | false | 0 |
adf_cleanup_bh(struct adf_accel_dev *accel_dev)
{
struct adf_etr_data *priv_data = accel_dev->transport;
struct adf_hw_device_data *hw_data = accel_dev->hw_device;
int i;
for (i = 0; i < hw_data->num_banks; i++) {
tasklet_disable(&priv_data->banks[i].resp_handler);
tasklet_kill(&priv_data->banks[i].resp_handle... | false | false | false | false | false | 0 |
strbuf_set_increment(strbuf_t *s, int increment)
{
/* Increment > 0: Linear buffer growth rate
* Increment < -1: Exponential buffer growth rate */
if (increment == 0 || increment == -1)
luaL_error(s->lua, "BUG: Invalid string increment");
s->increment = increment;
} | false | false | false | false | false | 0 |
e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
bool state)
{
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
if (hw->mac.type != e1000_ich8lan) {
e_dbg("Workaround applies to ICH8 only.\n");
return;
}
dev_spec->kmrn_lock_loss_workaround_enabled = state;
} | false | false | false | false | false | 0 |
clutter_list_model_row_removed (ClutterModel *model,
ClutterModelIter *iter)
{
ClutterListModelIter *iter_default;
guint i, n_columns;
GValue *values;
n_columns = clutter_model_get_n_columns (model);
iter_default = CLUTTER_LIST_MODEL_ITER (iter);
values = g_sequence_ge... | false | false | false | false | false | 0 |
vacuum(VacuumStmt *vacstmt, Oid relid, bool do_toast,
BufferAccessStrategy bstrategy, bool for_wraparound, bool isTopLevel)
{
const char *stmttype;
volatile bool in_outer_xact,
use_own_xacts;
List *relations;
/* sanity checks on options */
Assert(vacstmt->options & (VACOPT_VACUUM | VACOPT_ANALYZE));
A... | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__gui__controls__EditBox_GetSelPos(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__gui__controls__EditLine ** l1, int * y1, int * x1, struct __ecereNameSpace__ecere__gui__controls__EditLine ** l2, int * y2, int * x2, unsigned int reorder)
{
stru... | false | false | false | false | false | 0 |
manager_optimize_away(struct mansession *s, const struct message *m)
{
const char *channel;
struct local_pvt *p, *tmp = NULL;
struct ast_channel *c;
int found = 0;
struct ao2_iterator it;
channel = astman_get_header(m, "Channel");
if (ast_strlen_zero(channel)) {
astman_send_error(s, m, "'Channel' not specifi... | false | false | false | false | false | 0 |
glade_widget_set_internal (GladeWidget * widget, const gchar * internal)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
if (widget->priv->internal != internal)
{
g_free (widget->priv->internal);
widget->priv->internal = g_strdup (internal);
g_object_notify_by_pspec (G_OBJECT (widget), properti... | false | false | false | false | false | 0 |
gth_chain_contract(GthChain *dest, const GthChain *src)
{
GtRange forwardrange, reverserange;
gt_assert(gt_array_size(src->forwardranges) ==
gt_array_size(src->reverseranges));
/* copy core */
chain_copy_core(dest, src);
/* contract ranges */
forwardrange.start = ((GtRange*)
... | false | false | false | false | false | 0 |
ocrdma_query_device(struct ib_device *ibdev, struct ib_device_attr *attr,
struct ib_udata *uhw)
{
struct ocrdma_dev *dev = get_ocrdma_dev(ibdev);
if (uhw->inlen || uhw->outlen)
return -EINVAL;
memset(attr, 0, sizeof *attr);
memcpy(&attr->fw_ver, &dev->attr.fw_ver[0],
min(sizeof(dev->attr.fw_ver), siz... | false | false | false | false | false | 0 |
findConsecutive(int count, int align) const
{
for(int n = 0; n < items.count(); n += align)
{
if(isConsecutive(n, count))
return n;
}
return -1;
} | false | false | false | false | false | 0 |
sock_s_unpack_sockaddr_in(VALUE self, VALUE addr)
{
struct sockaddr_in * sockaddr;
VALUE host;
sockaddr = (struct sockaddr_in*)SockAddrStringValuePtr(addr);
if (RSTRING_LEN(addr) <
(char*)&((struct sockaddr *)sockaddr)->sa_family +
sizeof(((struct sockaddr *)sockaddr)->sa_family) -
... | false | false | false | false | false | 0 |
gf_odf_read_cc(GF_BitStream *bs, GF_CCDescriptor *ccd, u32 DescSize)
{
u32 nbBytes = 0;
if (!ccd) return GF_BAD_PARAM;
ccd->classificationEntity = gf_bs_read_int(bs, 32);
ccd->classificationTable = gf_bs_read_int(bs, 16);
nbBytes += 6;
ccd->dataLength = DescSize - 6;
ccd->contentClassificationData = (char*)gf_m... | false | true | false | false | false | 1 |
afr_build_parent_loc (loc_t *parent, loc_t *child, int32_t *op_errno)
{
int ret = -1;
char *child_path = NULL;
if (!child->parent) {
if (op_errno)
*op_errno = EINVAL;
goto out;
}
child_path = gf_strdup (child->path)... | false | false | false | false | false | 0 |
bnx2x_set_next_page_sgl(struct bnx2x_fastpath *fp)
{
int i;
for (i = 1; i <= NUM_RX_SGE_PAGES; i++) {
struct eth_rx_sge *sge;
sge = &fp->rx_sge_ring[RX_SGE_CNT * i - 2];
sge->addr_hi =
cpu_to_le32(U64_HI(fp->rx_sge_mapping +
BCM_PAGE_SIZE*(i % NUM_RX_SGE_PAGES)));
sge->addr_lo =
cpu_to_le32(U64_LO... | false | false | false | false | false | 0 |
WaitXSelectionRequest (Display *dpy,
Window win,
XEvent *ev,
XPointer client_data)
{
XIMS ims = (XIMS) client_data;
Xi18n i18n_core = ims->protocol;
if (((XSelectionRequestEvent *) ev)->selection
... | false | false | false | false | false | 0 |
saveOfferList(QDataStream &str)
{
m_offerListOffset = str.device()->pos();
// For each entry in servicetypeFactory
KSycocaEntryDict::const_iterator itstf = m_serviceTypeFactory->entryDict()->constBegin();
const KSycocaEntryDict::const_iterator endstf = m_serviceTypeFactory->entryDict()->constEnd();
... | false | false | false | false | false | 0 |
on_realm_joined (GObject *source,
GAsyncResult *result,
gpointer user_data)
{
UmAccountDialog *self = UM_ACCOUNT_DIALOG (user_data);
GError *error = NULL;
um_realm_join_finish (self->selected_realm,
result, &error);
/* Yay... | false | false | false | false | false | 0 |
macro_is_playing(struct macro *macro)
{
return macro && macro->at < macro->bytes;
} | false | false | false | false | false | 0 |
http_body_drop(int fd, rr_data_t response) {
length_t bodylen;
int rc = 1;
bodylen = http_has_body(NULL, response);
if (bodylen) {
if (hlist_subcmp(response->headers, "Transfer-Encoding", "chunked")) {
if (debug)
printf("Discarding chunked body.\n");
rc = chunked_data_send(-1, fd);
} else {
if (de... | false | false | false | false | false | 0 |
runLegalizePass(Program *prog, CGStage stage) const
{
bool ret = false;
if (stage == CG_STAGE_PRE_SSA) {
NV50LoweringPreSSA pass(prog);
ret = pass.run(prog, false, true);
} else
if (stage == CG_STAGE_SSA) {
if (!prog->targetPriv)
prog->targetPriv = new std::list<Instruction *>();... | false | false | false | false | false | 0 |
save_currentstate(void)
{
int fd;
if (flags.ins_chkpt)
{
/* write out just-attained level, with pets and everything */
fd = currentlevel_rewrite();
if (fd < 0) return;
bufon(fd);
savelev(fd,ledger_no(&u.uz), WRITE_SAVE);
bclose(fd);
}
/* write out no... | false | false | false | false | false | 0 |
print(raw_ostream &OS) const {
OS << " [";
StringRef Res = getName();
if (!Res.empty())
OS << " [" << Res << "] ";
unsigned Tag = getTag();
OS << " [" << dwarf::TagString(Tag) << "] ";
// TODO : Print context
getCompileUnit().print(OS);
OS << " [" << getLineNumber() << "] ";
if (isLocalToUnit()... | false | false | false | false | false | 0 |
getAttributeValue(CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
Log* log) const
{
// keep track if these error conditions are true for any attribute
bool attrTypeInvalid = false;
bool bufferTooSmall = false;
unsigned int i;
// loop over all attributes in the template
for( i = 0; i < ulCount... | false | false | false | false | false | 0 |
SplinePrevSplice(SplinePoint *end,SplinePoint *newstuff) {
end->prev = newstuff->prev;
end->prev->to = end;
end->prevcp = newstuff->prevcp;
end->noprevcp = newstuff->noprevcp;
if ( end->me.x!=newstuff->me.x || end->me.y!=newstuff->me.y ) {
double xdiff = end->me.x-newstuff->me.x, ydiff = end->me.y-... | false | false | false | false | false | 0 |
is_authorized(struct connection *conn, const char *path) {
FILE *fp;
int authorized = MG_TRUE;
if ((fp = open_auth_file(conn, path)) != NULL) {
authorized = mg_authorize_digest(&conn->mg_conn, fp);
fclose(fp);
}
return authorized;
} | false | false | false | false | false | 0 |
generateDAG(const std::vector<double> &rnps, int n, double effectiveThres, double routingThres, const std::vector<WeatherData> &wDataSets, RoutingDAG* rDAG, double quadrantAngularWidth, int numFixNodes)
{
std::cout << "Generating DAG..." << std::endl;
if(!generateEntryAndFixNodes(rnps, effectiveThres, routin... | false | false | false | false | false | 0 |
PutString(CurPos &cp, int xtag, char *str) {
PutObject(cp, xtag, slen(str), str);
} | false | false | false | false | false | 0 |
libipw_get_channel(struct libipw_device
*ieee, u8 channel)
{
int index = libipw_channel_to_index(ieee, channel);
if (index == -1)
return &bad_channel;
if (channel <= LIBIPW_24GHZ_CHANNELS)
return &ieee->geo.bg[index];
return &ieee->geo.a[index];
} | false | false | false | false | false | 0 |
ensIntronIsCanonical(const EnsPIntron intron, AjBool *Presult)
{
AjPStr both = NULL;
AjPStr donor = NULL;
AjPStr acceptor = NULL;
if (!intron)
return ajFalse;
if (!Presult)
return ajFalse;
*Presult = AJFALSE;
ensIntronFetchSplicesequences(intron, &donor, &acceptor)... | false | false | false | false | false | 0 |
mmc_spi_request(struct mmc_host *mmc, struct mmc_request *mrq)
{
struct mmc_spi_host *host = mmc_priv(mmc);
int status = -EINVAL;
int crc_retry = 5;
struct mmc_command stop;
#ifdef DEBUG
/* MMC core and layered drivers *MUST* issue SPI-aware commands */
{
struct mmc_command *cmd;
int invalid = 0;
cm... | false | false | false | false | false | 0 |
Meta(const std::string& metaServer, unsigned int maxQueries) :
m_status(INVALID),
m_metaHost(metaServer),
m_maxActiveQueries(maxQueries),
m_nextQuery(0),
m_stream(NULL)
{
Poll::instance().Ready.connect(sigc::mem_fun(this, &Meta::gotData));
TimedEventService::instance()->Idle.connect(sigc::me... | false | false | false | false | false | 0 |
simulate_check_file_read(item_t * item) {
struct stat st;
uint64_t max_off = 0;
sim_item_t * sim_item = hash_table_entry(item, sim_item_t, item);
if ( sim_item->created ) { //the file was created, don't control this one
return;
}
max_off = simulate_get_max_offset(sim_item);
if ( access(sim_item->name, R_OK) ... | false | false | false | true | true | 1 |
lt_ext_module_load(lt_ext_module_t *module)
{
lt_bool_t retval = FALSE;
lt_string_t *fullname = lt_string_new(NULL);
char *filename = lt_strdup_printf("liblangtag-ext-%s." LT_MODULE_SUFFIX,
module->name);
char *path_list, *p, *s, *path;
const char *env = lt_getenv("LANGTAG_EXT_MODULE_PATH");
size_t len;
... | false | false | false | false | false | 0 |
OnSend(int)
{
// if the socket just connected and this is outgoing, we might want to start the handshake here
if (m_StreamCryptState == ECS_PENDING || m_StreamCryptState == ECS_PENDING_SERVER){
//printf("Starting connection negotiation on OnSend for %s\n", (const char*) unicode2char(DbgGetIPString()));
StartNegot... | false | false | false | false | false | 0 |
encode_caldaysec(int calendar, int year, int month, int day, int hour, int minute, int second,
int *julday, int *secofday)
{
int dpy;
dpy = calendar_dpy(calendar);
if ( dpy == 360 || dpy == 365 || dpy == 366 )
*julday = encode_day(dpy, year, month, day);
else
*julday = encode_julday(calendar, ... | false | false | false | false | false | 0 |
GetData() {
i::Handle<i::Context> env = Utils::OpenHandle(this);
i::Isolate* isolate = env->GetIsolate();
if (IsDeadCheck(isolate, "v8::Context::GetData()")) {
return v8::Local<Value>();
}
i::Object* raw_result = NULL;
ASSERT(env->IsGlobalContext());
if (env->IsGlobalContext()) {
raw_result = env-... | false | false | false | false | false | 0 |
pack_ctld_job_step_info_response_msg(
uint32_t job_id, uint32_t step_id, uid_t uid,
uint16_t show_flags, Buf buffer, uint16_t protocol_version)
{
ListIterator job_iterator;
ListIterator step_iterator;
int error_code = 0;
uint32_t steps_packed = 0, tmp_offset;
struct step_record *step_ptr;
struct job_record *job... | false | false | false | false | false | 0 |
ftpOpenConnection (LoginMode loginMode)
{
// check for implicit login if we are already logged on ...
if(loginMode == loginImplicit && m_bLoggedOn)
{
Q_ASSERT(m_control != NULL); // must have control connection socket
return true;
}
kDebug(7102) << "host=" << m_host << ", port=" << m_port << ", us... | false | false | false | false | false | 0 |
FindAny(const char *Name,const char *Default) const
{
string key = Name;
char type = 0;
if (key.size() > 2 && key.end()[-2] == '/')
{
type = key.end()[-1];
key.resize(key.size() - 2);
}
switch (type)
{
// file
case 'f':
return FindFile(key.c_str(), Default);
... | false | false | false | false | false | 0 |
opinion_text()
{
std::stringstream ret;
if (op_of_u.trust <= -10)
ret << "Completely untrusting";
else if (op_of_u.trust <= -6)
ret << "Very untrusting";
else if (op_of_u.trust <= -3)
ret << "Untrusting";
else if (op_of_u.trust <= 2)
ret << "Uneasy";
else if (op_of_u.trust <= 5)
ret << "Trusting";
else... | false | false | false | false | false | 0 |
FetchSupportedChannels(string in_interface) {
vector<unsigned int> ret;
char errstr[STATUS_MAX];
/* If we couldn't figure out what we are with mac80211, or if we don't
* have mac80211, go on to iwcontrol */
if (mac80211_get_chanlist(in_interface.c_str(), &ret, errstr) <= 0 ||
ret.size() == 0) {
/* I guess we... | false | false | false | false | false | 0 |
tar_add_file(
const char *zName, /* Name of the file. nul-terminated */
Blob *pContent, /* Content of the file */
int mPerm, /* 1: executable file, 2: symlink */
unsigned int mTime /* Last modification time of the file */
){
int nName = strle... | false | false | false | false | false | 0 |
symbols_sha1(const char *file, struct sha1 *digest)
{
int fd;
SHA1Context ctx;
fd = file_open(file, O_RDONLY, 0);
if (-1 == fd)
return FALSE;
SHA1Reset(&ctx);
for (;;) {
char buf[512];
int r;
r = read(fd, buf, sizeof buf);
if (-1 == r) {
close(fd);
return FALSE;
}
SHA1Input(&ctx, buf, r)... | false | false | false | false | false | 0 |
get_line(BIO *const in, char *const buf, const int bufsize)
{
char tmp;
int i, n_read;
memset(buf, 0, bufsize);
for(n_read = 0;;)
switch(BIO_gets(in, buf + n_read, bufsize - n_read - 1)) {
case -2:
/* BIO_gets not implemented */
return -1;
case 0:
... | false | false | false | false | false | 0 |
pkinit_init_certs(pkinit_identity_crypto_context ctx)
{
krb5_error_code retval = ENOMEM;
int i;
for (i = 0; i < MAX_CREDS_ALLOWED; i++)
ctx->creds[i] = NULL;
ctx->my_certs = NULL;
ctx->cert_index = 0;
ctx->my_key = NULL;
ctx->trustedCAs = NULL;
ctx->intermediateCAs = NULL;
c... | false | false | false | false | false | 0 |
shiftColors(void)
{
int w=image.width();
int h=image.height();
for(int c=0; c<w; c++) {
for(int r=0; r<h; r++) {
QRgb rgb=image.pixel(c,r);
rgb=qRgb(qGreen(rgb),qBlue(rgb),qRed(rgb));
image.setPixel(c,r,rgb);
}
}
widget()->update(0, 0, w, h);
emit newImage();
} | false | false | false | false | false | 0 |
item_bar_update_bounds (GocItem *item)
{
GnmItemBar *ib = GNM_ITEM_BAR (item);
item->x0 = 0;
item->y0 = 0;
if (ib->is_col_header) {
item->x1 = G_MAXINT64/2;
item->y1 = (ib->cell_height + ib->indent);
} else {
item->x1 = (ib->cell_width + ib->indent);
item->y1 = G_MAXINT64/2;
}
} | false | false | false | false | false | 0 |
acknowledgeInfo() {
char s[64],tz[128];
if (myboard==NULL)
return;
myboard->freeze();
// P2P and engine games
if (GameNumber > 7000 && GameNumber < 9000) {
timecontrol.toString(s,64);
} else if (GameNumber >= 9000) { // client-side games - rated/unrated unknown
timecontrol.toShortString(tz,128... | false | false | false | false | false | 0 |
hev_thresh_from_level(int level, int keyframe) {
if (keyframe) {
return (level >= 40) ? 2 : (level >= 15) ? 1 : 0;
} else {
return (level >= 40) ? 3 : (level >= 20) ? 2 : (level >= 15) ? 1 : 0;
}
} | false | false | false | false | false | 0 |
audit_show_dialog (GvaProcess *process,
gint status,
GvaAuditData *data)
{
GtkTreeView *view;
GtkTreeModel *model;
GError *error = NULL;
if (process->error != NULL)
return;
model = audit_build_model (data, &error);
g... | 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.