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 |
|---|---|---|---|---|---|---|
displayHSVColorRange(l_int32 hval,
l_int32 sval,
l_int32 vval,
l_int32 huehw,
l_int32 sathw,
l_int32 nsamp,
l_int32 factor)
{
l_int32 i, j, w, huedelta, satdelta, hue, sat, rval, gval, b... | false | false | false | false | false | 0 |
s5p_mfc_poll(struct file *file,
struct poll_table_struct *wait)
{
struct s5p_mfc_ctx *ctx = fh_to_ctx(file->private_data);
struct s5p_mfc_dev *dev = ctx->dev;
struct vb2_queue *src_q, *dst_q;
struct vb2_buffer *src_vb = NULL, *dst_vb = NULL;
unsigned int rc = 0;
unsigned long flags;
mutex_lock(&dev->mfc_mu... | false | false | false | false | false | 0 |
put_dword(struct hive *hdesc, int vofs, char *path, int exact, int dword)
{
struct keyval *kr;
int r;
ALLOC(kr,1,sizeof(int)+sizeof(int));
kr->len = sizeof(int);
kr->data = dword;
r = put_buf2val(hdesc, kr, vofs, path, REG_DWORD, exact);
FREE(kr);
return(r);
} | false | false | false | false | false | 0 |
findFormat(unsigned int arg, const Token *firstArg,
const Token **formatStringTok, const Token **formatArgTok)
{
const Token* argTok = firstArg;
for (unsigned int i = 0; i < arg && argTok; ++i)
argTok = argTok->nextArgument();
if (Token::Match(argTok, "%str% [,)]")) {
... | false | false | false | true | false | 1 |
start_socket_client(char *host, int remote_argc, char *remote_argv[],
int argc, char *argv[])
{
int fd, ret;
char *p, *user = NULL;
/* This is redundant with code in start_inband_exchange(), but this
* short-circuits a problem in the client before we open a socket,
* and the extra check won't hurt. */
if (*... | false | false | false | false | false | 0 |
op_3x3_calc_pixel(struct op_3x3_parm *p, unsigned char *s1,
unsigned char *s2, unsigned char *s3)
{
int val = 0;
val += p->f1[0] * s1[0];
val += p->f1[1] * s1[3];
val += p->f1[2] * s1[6];
val += p->f2[0] * s2[0];
val += p->f2[1] * s2[3];
val += p->f2[2] * s2[6];
val += p->f3[0] * s3... | false | false | false | false | false | 0 |
array_iter_extend(arrayobject *self, PyObject *bb)
{
PyObject *it, *v;
it = PyObject_GetIter(bb);
if (it == NULL)
return -1;
while ((v = PyIter_Next(it)) != NULL) {
if (ins1(self, Py_SIZE(self), v) != 0) {
Py_DECREF(v);
Py_DECREF(it);
return -1;
... | false | false | false | false | false | 0 |
deadkey_number(char *name, int line)
{
DEADKEY *dp, *dp0=NULL, *dp1;
int n;
for(n=0,dp=kbp->deadkeys; dp!=NULL; dp0=dp,dp=dp->next,n++)
{
if(strcasecmp(name,dp->name) == 0) return n;
}
// Create the deadkey if this is the first reference
dp1 = (DEADKEY *)checked_alloc(sizeof(DEADKEY),1);
if(dp0) dp0->next = d... | false | false | false | false | false | 0 |
doinit() {
addVertex(_theWPTDVertex);
addVertex(_theZPQQVertex);
addVertex(_theAGQQVertex);
addVertex(_theSU2XVertex);
StandardModel::doinit();
} | false | false | false | false | false | 0 |
ves1x93_set_inversion(struct ves1x93_state *state,
enum fe_spectral_inversion inversion)
{
u8 val;
/*
* inversion on/off are interchanged because i and q seem to
* be swapped on the hardware
*/
switch (inversion) {
case INVERSION_OFF:
val = 0xc0;
break;
case INVERSION_ON:
val = 0x80;
break;
c... | false | false | false | false | false | 0 |
qualifiers_match(exec_list *params)
{
exec_list_iterator iter_a = parameters.iterator();
exec_list_iterator iter_b = params->iterator();
/* check that the qualifiers match. */
while (iter_a.has_next()) {
ir_variable *a = (ir_variable *)iter_a.get();
ir_variable *b = (ir_variable *)iter_b.get();... | false | false | false | false | false | 0 |
netsnmp_get_statistic_helper_handler(netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests)
{
if (reqinfo->mode == MODE_GE... | false | false | false | false | false | 0 |
local_free(git_transport *transport)
{
transport_local *t = (transport_local *)transport;
size_t i;
git_remote_head *head;
git_vector_foreach(&t->refs, i, head)
free_head(head);
git_vector_free(&t->refs);
/* Close the transport, if it's still open. */
local_close(transport);
/* Free the transport */
git_... | false | false | false | false | false | 0 |
SetSplitterPosition( int pos, int splitterColumn )
{
wxASSERT_MSG( GetPageCount(),
wxT("SetSplitterPosition() has no effect until pages have been added") );
size_t i;
for ( i=0; i<GetPageCount(); i++ )
{
wxPropertyGridPage* page = GetPage(i);
page->DoSetSplitterPositio... | false | false | false | false | false | 0 |
ves_icall_System_Threading_Thread_SetState (MonoInternalThread* this_obj, guint32 state)
{
mono_thread_set_state (this_obj, (MonoThreadState)state);
if (state & ThreadState_Background) {
/* If the thread changes the background mode, the main thread has to
* be notified, since it has to rebuild the list of thre... | false | false | false | false | false | 0 |
DetectAltText ( XMP_Node * xmpParent )
{
XMP_Assert ( XMP_ArrayIsAlternate(xmpParent->options) );
size_t itemNum, itemLim;
for ( itemNum = 0, itemLim = xmpParent->children.size(); itemNum < itemLim; ++itemNum ) {
XMP_OptionBits currOptions = xmpParent->children[itemNum]->options;
if ( (currOptions & kXMP_Prop... | false | false | false | false | false | 0 |
cs_usolve (const cs *U, double *x)
{
csi p, j, n, *Up, *Ui ;
double *Ux ;
if (!CS_CSC (U) || !x) return (0) ; /* check inputs */
n = U->n ; Up = U->p ; Ui = U->i ; Ux = U->x ;
for (j = n-1 ; j >= 0 ; j--)
{
x [j] /= Ux [Up [j+1]-1] ;
for (p = Up [j] ; p < Up [... | false | false | false | false | false | 0 |
alarmtimer_suspend(struct device *dev)
{
struct rtc_time tm;
ktime_t min, now;
unsigned long flags;
struct rtc_device *rtc;
int i;
int ret;
spin_lock_irqsave(&freezer_delta_lock, flags);
min = freezer_delta;
freezer_delta = ktime_set(0, 0);
spin_unlock_irqrestore(&freezer_delta_lock, flags);
rtc = alarmtim... | false | false | false | false | false | 0 |
force_sol_payload_encryption_commit (const char *section_name,
const struct config_keyvalue *kv,
void *arg)
{
bmc_config_state_data_t *state_data;
struct sol_authentication sa;
config_err_t ret;
assert (section_name);
assert (kv);
as... | false | false | false | false | false | 0 |
j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info) {
opj_image_t *image = NULL;
opj_jpt_msg_header_t header;
int position;
opj_common_ptr cinfo = j2k->cinfo;
OPJ_ARG_NOT_USED(cstr_info);
j2k->cio = cio;
/* create an empty image */
image = opj_image_create0();
j2k->image... | false | false | false | false | false | 0 |
add_desc(cmd_parms *cmd, void *d, const char *desc,
const char *to)
{
autoindex_config_rec *dcfg = (autoindex_config_rec *) d;
ai_desc_t *desc_entry;
char *prefix = "";
desc_entry = (ai_desc_t *) apr_array_push(dcfg->desc_list);
desc_entry->full_path = (ap_strchr_c(to, '... | false | false | false | false | false | 0 |
pragment (NODE_T *p, BOOL_T keyw)
{
if (NPRAGMENT (p) != NO_TEXT) {
if (NPRAGMENT_TYPE (p) == BOLD_COMMENT_SYMBOL ||
NPRAGMENT_TYPE (p) == BOLD_PRAGMAT_SYMBOL) {
if (! keyw) {
put_nl ();
}
put_pragment (p);
put_nl ();
put_nl ();
} else {
if (! keyw && (int) ... | false | false | false | false | false | 0 |
pk_control_get_tid_finish (PkControl *control,
GAsyncResult *res,
GError **error)
{
GSimpleAsyncResult *simple;
gpointer source_tag;
g_return_val_if_fail (PK_IS_CONTROL (control), NULL);
g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (res), NULL);
g_return_val_if_fail (error == NULL || *error == NULL,... | false | false | false | false | false | 0 |
cavan_vfat_read_dbr(struct cavan_block_device *bdev, struct fat_dbr *dbr)
{
ssize_t rdlen;
rdlen = bdev->read_byte(bdev, 0, 0, dbr, sizeof(*dbr));
if (rdlen < 0)
{
pr_red_info("bdev->read_byte");
return rdlen;
}
if (dbr->boot_flags != 0xAA55)
{
pr_red_info("dbr->boot_flags = 0x%04x", dbr->boot_flags);
... | false | false | false | false | false | 0 |
move_tconc(ikptr tc, ik_ptr_page* ls){
if((ls == NULL) || (ls->count == ik_ptr_page_size)){
ik_ptr_page* page = (ik_ptr_page*)ik_mmap(pagesize);
page->count = 0;
page->next = ls;
ls = page;
}
ls->ptr[ls->count++] = tc;
return ls;
} | false | false | false | false | false | 0 |
insertDBRecords(FIS_HANDLE ** fisHandle, const char *callingAETitle,
const char *destinationAETitle, LST_HEAD ** imageList,
char *transactionUID)
{
FIS_STORAGECOMMITREQRECORD commit;
CONDITION cond;
QUERY_LIST_ITEM *queryItem;
commit.Type = FIS_K_STORAGECOMMITREQ;
cond = FIS_NewRecord(fisHandle... | true | true | false | false | false | 1 |
fuseki(int color)
{
int i = -1;
int j = -1;
int width; /* Side of the open region required in the corner. */
int empty_corner_value = EMPTY_CORNER_VALUE * board_size/19;
/* Return immediately if --disable_fuseki option used. */
if (disable_fuseki)
return;
set_symmetries();
/* Search in fuseki ... | false | false | false | false | false | 0 |
widget_timer_update(void *Self)
{
WIDGET *W = (WIDGET *) Self;
WIDGET_TIMER *Timer = W->data;
int update, active;
/* evaluate expressions */
property_eval(&Timer->update);
property_eval(&Timer->active);
/* get new update interval */
update = P2N(&Timer->update);
if (update < 10)
u... | false | false | false | false | false | 0 |
__add_file_updated (txninfop, fileid, dbregid)
VRFY_TXN_INFO *txninfop;
const DBT *fileid;
int32_t dbregid;
{
int ret;
DBT *pdbt, *p;
u_int32_t found, i;
ret = 0;
p = pdbt = NULL;
for (found = 0, i = 0; i < txninfop->filenum; i++) {
p = &(txninfop->fileups[i]);
if (p->size == fileid->size &&
memcmp... | false | false | false | false | false | 0 |
hpsa_intx_discard_completions(int irq, void *queue)
{
struct ctlr_info *h = queue_to_hba(queue);
u8 q = *(u8 *) queue;
u32 raw_tag;
if (ignore_bogus_interrupt(h))
return IRQ_NONE;
if (interrupt_not_for_us(h))
return IRQ_NONE;
h->last_intr_timestamp = get_jiffies_64();
while (interrupt_pending(h)) {
raw_t... | false | false | false | false | false | 0 |
sign(unsigned char *data, unsigned int length, unsigned char *hmd5,
isccc_region_t *secret)
{
isc_hmacmd5_t ctx;
isc_result_t result;
isccc_region_t source, target;
unsigned char digest[ISC_MD5_DIGESTLENGTH];
unsigned char digestb64[ISC_MD5_DIGESTLENGTH * 4];
isc_hmacmd5_init(&ctx, secret->rstart, REGION_SI... | false | false | false | false | false | 0 |
weffects(obj)
register struct obj *obj;
{
int otyp = obj->otyp;
boolean disclose = FALSE, was_unkn = !objects[otyp].oc_name_known;
exercise(A_WIS, TRUE);
#ifdef STEED
if (u.usteed && (objects[otyp].oc_dir != NODIR) &&
!u.dx && !u.dy && (u.dz > 0) && zap_steed(obj)) {
disclose = TRUE;
} else
#endif
if (obj... | false | false | false | false | false | 0 |
evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly)
{
if (!poly) return NULL;
while (poly->points)
{
Evas_GL_Polygon_Point *pt;
pt = poly->points->data;
poly->points = eina_list_remove(poly->points, pt);
free(pt);
}
free(poly);
return NULL;
} | false | false | false | false | false | 0 |
exit_game_panic(void)
{
/* If nothing important has happened, just quit */
if (!character_generated || character_saved) quit("panic");
/* Mega-Hack -- see "msg_print()" */
msg_flag = FALSE;
/* Clear the top line */
prt("", 0, 0);
/* Hack -- turn off some things */
disturb(1, 0);
/* Hack -- Delay death XXX ... | false | false | false | false | false | 0 |
private_lookup_attribute (const char *attr_name, size_t attr_len, tree list)
{
while (list)
{
size_t ident_len = IDENTIFIER_LENGTH (get_attribute_name (list));
if (ident_len == attr_len)
{
if (!strcmp (attr_name,
IDENTIFIER_POINTER (get_attribute_name (list))))
break;
}
/* TO... | false | false | false | false | false | 0 |
evas_font_available_list(const Evas *e)
{
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
return evas_font_dir_available_list(e);
} | false | false | false | false | false | 0 |
logInit(const cxxtools::SerializationInfo& si)
{
LoggerManagerConfiguration config;
si >>= config;
getInstance().configure(config);
} | false | false | false | false | false | 0 |
subscriptionTimestamp()
{
KConfigGroup config = KGlobal::config()->group( GpodderServiceConfig::configSectionName() );
return config.readEntry( "subscriptionTimestamp", 0 );
} | false | false | false | false | false | 0 |
vcal_fetch_msg(Folder * folder, FolderItem * item,
gint num)
{
gchar *filename = NULL;
const gchar *uid = NULL;
debug_print(" fetch for %s %d\n", (((VCalFolderItem *)item)->uri ? ((VCalFolderItem *)item)->uri:"(null)"), num);
if (((VCalFolderItem *)item)->uri)
return feed_fetch_item(item, num);
if (!uid) ... | false | false | false | false | false | 0 |
ex_symbol_value_print (Sfio_t *exoutput, int extype, EXSTYPE const * const exvaluep)
#else
static void
ex_symbol_value_print (exoutput, extype, exvaluep)
Sfio_t *exoutput;
int extype;
EXSTYPE const * const exvaluep;
#endif
{
Sfio_t *exo = exoutput;
EXUSE (exo);
if (!exvaluep)
return;
# ifdef EXPRI... | false | false | false | false | false | 0 |
ios_takebuf(ios_t *s, size_t *psize)
{
char *buf;
ios_flush(s);
if (s->buf == &s->local[0]) {
buf = LLT_ALLOC(s->size+1);
if (buf == NULL)
return NULL;
if (s->size)
memcpy(buf, s->buf, s->size);
}
else {
if (s->buf == NULL)
buf = ... | false | false | false | false | false | 0 |
isp1704_charger_type(struct isp1704_charger *isp)
{
u8 reg;
u8 func_ctrl;
u8 otg_ctrl;
int type = POWER_SUPPLY_TYPE_USB_DCP;
func_ctrl = isp1704_read(isp, ULPI_FUNC_CTRL);
otg_ctrl = isp1704_read(isp, ULPI_OTG_CTRL);
/* disable pulldowns */
reg = ULPI_OTG_CTRL_DM_PULLDOWN | ULPI_OTG_CTRL_DP_PULLDOWN;
isp1704... | false | false | false | false | false | 0 |
infc_request_manager_request_remove(InfcRequestManager* manager,
InfcRequest* request)
{
InfcRequestManagerPrivate* priv;
gpointer seq;
priv = INFC_REQUEST_MANAGER_PRIVATE(manager);
seq = GUINT_TO_POINTER(infc_request_get_seq(request));
g_assert(g_hash_table_lookup(priv->... | false | false | false | false | false | 0 |
Exp_TimestampObjCmd(
ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *CONST objv[]) /* Argument objects. */
{
char *format = 0;
time_t seconds = -1;
int gmt = FALSE; /* local time by default */
struct tm *tm;
Tcl_DString dstring;
int i;
static char* options[] = {
"-format",
... | false | false | false | false | false | 0 |
handleRead(memptr addr) {
addr -= getHWoffset();
switch(addr) {
case 0x3a: return hop;
case 0x3b: return op;
case 0x3c: return LOAD_B_ff8a3c();
case 0x3d: return skewreg;
}
panicbug("Blitter tried to read byte from register %x at %06x", addr+getHWoffset(), showPC());
return 0;
} | false | false | false | false | false | 0 |
jit_init_natives(void)
{
unsigned int i;
for (i = 0; i < ARRAY_SIZE(natives); i++)
vm_register_native(&natives[i]);
} | false | false | false | false | false | 0 |
rp_throttle(struct tty_struct *tty)
{
struct r_port *info = tty->driver_data;
#ifdef ROCKET_DEBUG_THROTTLE
printk(KERN_INFO "throttle %s: %d....\n", tty->name,
tty->ldisc.chars_in_buffer(tty));
#endif
if (rocket_paranoia_check(info, "rp_throttle"))
return;
if (I_IXOFF(tty))
rp_send_xchar(tty, STOP_CH... | false | false | false | false | false | 0 |
tiny_compute_factor_base(QS_t * qs_inf)
{
unsigned long fb_prime = 2;
unsigned long multiplier = qs_inf->k;
prime_t * factor_base = qs_inf->factor_base;
uint32_t * sqrts = qs_inf->sqrts;
unsigned long num_primes = tiny_num_FB_primes(qs_inf->bits);
unsigned long prime, nmod;
double pinv;
... | false | false | false | false | false | 0 |
wrapup_global_declaration_2 (tree decl)
{
if (TREE_ASM_WRITTEN (decl) || DECL_EXTERNAL (decl))
return false;
/* Don't write out static consts, unless we still need them.
We also keep static consts if not optimizing (for debugging),
unless the user specified -fno-keep-static-consts.
??? They mig... | false | false | false | false | false | 0 |
ladish_app_supervisor_set_directory(
ladish_app_supervisor_handle supervisor_handle,
const char * dir)
{
char * dup;
char * js_dir;
ASSERT(supervisor_ptr->pending_js_saves == 0);
dup = strdup(dir);
if (dup == NULL)
{
log_error("strdup(\"%s\") failed", dir);
return false;
}
js_dir = catdup... | false | false | false | false | false | 0 |
DeleteRfmStm(RfmStm stm)
{
if (stm == NULL) {
return;
}
if (stm->prev) {
stm->prev->next = stm->next;
} else {
if (stm->block) {
stm->block->stm_list = stm->next;
} else {
MSG_LOGICALERROR;
}
}
if (stm->next) {
stm->next->pr... | false | false | false | false | false | 0 |
getClosestPlane(const SimpleParticle& Po)
{
Plane3D PL=ARandomAssembly3D::getClosestPlane(Po);
double spl=PL.sep(Po.getPos());
RectPatch RP=getClosestPatch(Po,spl);
double srp=RP.sep(Po.getPos());
if (srp<spl){
PL=RP.getPlane(Po.getPos());
}
return PL;
} | false | false | false | false | false | 0 |
vm_browse_messages(struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu)
{
if (!strncasecmp(ast_channel_language(chan), "es", 2)) { /* SPANISH */
return vm_browse_messages_es(chan, vms, vmu);
} else if (!strncasecmp(ast_channel_language(chan), "gr", 2)) { /* GREEK */
return vm_browse_m... | false | false | false | false | false | 0 |
iscsi_session_chkready(struct iscsi_cls_session *session)
{
unsigned long flags;
int err;
spin_lock_irqsave(&session->lock, flags);
switch (session->state) {
case ISCSI_SESSION_LOGGED_IN:
err = 0;
break;
case ISCSI_SESSION_FAILED:
err = DID_IMM_RETRY << 16;
break;
case ISCSI_SESSION_FREE:
err = DID_TR... | false | false | false | false | false | 0 |
reserve_folder(const char *part, const char *mboxname,
struct sync_msgid_list *part_list)
{
struct mailbox *mailbox = NULL;
struct index_record record;
struct index_record record2;
int r;
struct sync_msgid *item;
const char *mailbox_msg_path, *stage_msg_path;
uint32_t recno;
/* Op... | false | false | false | false | false | 0 |
ctx_has_key_loaded(TCS_CONTEXT_HANDLE ctx_handle, TCS_KEY_HANDLE key_handle)
{
struct tcs_context *c;
struct keys_loaded *k = NULL;
MUTEX_LOCK(tcs_ctx_lock);
c = get_context(ctx_handle);
if (c == NULL) {
MUTEX_UNLOCK(tcs_ctx_lock);
return FALSE;
}
k = c->keys;
while (k != NULL) {
if (k->key_handle == ke... | false | false | false | false | false | 0 |
BuildIndex(FILE *f)
// BuildIndex builds the index chunk for a blorb file, loading all other chunks
{
int i,n=0; char *dp;
Blorb[0]=(struct Chunk *)my_malloc(sizeof(struct Chunk));
// Write the chunk type
strcpy(Blorb[0]->Type,"RIdx");
strcpy(Blorb[0]->Use,"0");
// Load all the chunks
while(!feof(f))
... | false | false | false | false | false | 0 |
push_label(gxml_data * xd, const char ** attr)
{
giiLabelTable * lt = &xd->gim->labeltable;
float rgba[4]={0.0, 0.0, 0.0, 0.0};
int key=0, rv;
lt->length++;
lt->key = (int *)realloc(lt->key, lt->length * sizeof(int));
lt->label = (char **)realloc(lt->label, lt->length * si... | false | false | false | false | false | 0 |
get_slow_args(
Tcl_Interp *interp,
struct slow_arg *x)
{
int sc; /* return from scanf */
CONST char *s = exp_get_var(interp,"send_slow");
if (!s) {
exp_error(interp,"send -s: send_slow has no value");
return(-1);
}
if (2 != (sc = sscanf(s,"%d %lf",&x->size,&x->time))) {
exp_error(interp,... | false | false | false | false | false | 0 |
evd_socket_set_property (GObject *obj,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
EvdSocket *self;
self = EVD_SOCKET (obj);
switch (prop_id)
{
case PROP_FAMILY:
self->priv->family = g_value_get_... | false | false | false | false | false | 0 |
clear_calibration()
{
std::vector<CalibrationData> data;
for(int i = 0; i < get_axis_count(); ++i)
{
CalibrationData cal;
cal.calibrate = false;
cal.invert = false;
cal.center_min = 0;
cal.center_max = 0;
cal.range_min = 0;
cal.range_max = 0;
data... | false | false | false | false | false | 0 |
GetFace(int faceId)
{
faceId = (faceId < 0 ? 0 : (faceId > 4 ? 4 : faceId ));
// load point id's and coordinates
// be carefull with the first one:
if(faceId > 0)
{
for (int i=0; i<6; i++)
{
this->TriangleFace->PointIds->SetId(i,this->PointIds->GetId(PyramidFaces[faceId][i]));
this->T... | false | false | false | false | false | 0 |
get_proxy(const char *dev, int fd)
{
unsigned char results[256];
unsigned char sb[128];
unsigned char cdb[INQUIRY_CMDLEN] = {INQUIRY_CMD, 1, 0xc1, 0,
sizeof(sb), 0};
struct sg_io_hdr io_hdr;
int ret = -1;
memset(&results, 0, sizeof (results));
memset(&io_hdr, 0, sizeof (struct sg_io_hdr));
io_hdr.inte... | false | false | false | false | false | 0 |
srvReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data, int *nmiss)
{
int vlistID, fileID;
int nlevs, gridID, gridsize;
off_t recpos, currentfilepos;
int header[8];
int tsid;
int recID;
int i;
double missval;
srvrec_t *srvp;
srvp = streamptr->record->srvp;
vlistID = stream... | false | false | false | false | false | 0 |
cp_parser_non_integral_constant_expression (cp_parser *parser,
non_integral_constant thing)
{
parser->non_integral_constant_expression_p = true;
if (parser->integral_constant_expression_p)
{
if (!parser->allow_non_integral_constant_expression_p)
{
const char *msg = NULL;
switch (thing)
... | false | false | false | false | false | 0 |
mconf_get_ptf_max_priority(void) {
long ret;
DENTER(BASIS_LAYER, "mconf_get_max_priority");
SGE_LOCK(LOCK_MASTER_CONF, LOCK_READ);
ret = ptf_max_priority;
SGE_UNLOCK(LOCK_MASTER_CONF, LOCK_READ);
DRETURN(ret);
} | false | false | false | false | false | 0 |
findBestBook(const Word16 *bc, Word16 *book)
{
Word32 minBits, j;
minBits = INVALID_BITCOUNT;
for (j=0; j<=CODE_BOOK_ESC_NDX; j++) {
if (bc[j] < minBits) {
minBits = bc[j];
*book = j;
}
}
return extract_l(minBits);
} | false | false | false | false | false | 0 |
_reset_page_state(GRAPHICS_CONTROLLER *gc)
{
PG_DISPLAY_SET *s = gc->igs;
BD_IG_PAGE *page = NULL;
unsigned page_id = bd_psr_read(gc->regs, PSR_MENU_PAGE_ID);
unsigned ii;
page = _find_page(&s->ics->interactive_composition, page_id);
if (!page) {
GC_ERROR("_re... | false | false | false | false | false | 0 |
hd29l2_read_ber(struct dvb_frontend *fe, u32 *ber)
{
int ret;
struct hd29l2_priv *priv = fe->demodulator_priv;
u8 buf[2];
if (!(priv->fe_status & FE_HAS_SYNC)) {
*ber = 0;
ret = 0;
goto err;
}
ret = hd29l2_rd_regs(priv, 0xd9, buf, 2);
if (ret) {
*ber = 0;
goto err;
}
/* LDPC BER */
*ber = ((buf[0... | false | false | false | false | false | 0 |
fatentry_to_dirent(Volume_t *V, DirEnt_t *D, struct dirent *dirp) {
int res;
LfnEntry_t *Buffer;
int bufsize;
WORD utf16buf[261];
char utf8buf[521];
int namelen;
Buffer= D->entry;
bufsize = D->len;
memset(dirp, 0, sizeof(struct dirent)); // bzeroing the fields.
memset(utf8buf,0,521);... | false | false | false | false | false | 0 |
hb_ot_layout_lookup_would_substitute_fast (hb_face_t *face,
unsigned int lookup_index,
const hb_codepoint_t *glyphs,
unsigned int glyphs_length,
hb_bool_t zero_context)
{
if (unlikely (lookup_index >= hb_ot_layout_from_face (face)->gsub_lookup_c... | false | false | false | false | false | 0 |
make_keys(FILE *ifp, FILE *ofp)
{
char buffer[BUFSIZ];
char from[256];
char to[256];
int maxlen = 16;
int scanned;
while (fgets(buffer, sizeof(buffer), ifp) != 0) {
if (*buffer == '#')
continue;
to[sizeof(to) - 1] = '\0';
from[sizeof(from) - 1] = '\0';
scanned = sscanf(buffer, "%255s... | true | true | false | false | false | 1 |
store_fpr (app_t app, int keynumber, u32 timestamp,
const unsigned char *m, size_t mlen,
const unsigned char *e, size_t elen,
unsigned char *fpr, unsigned int card_version)
{
unsigned int n, nbits;
unsigned char *buffer, *p;
int tag, tag2;
int rc;
for (; mlen && !*m; mlen--, ... | true | true | false | false | false | 1 |
remFromFileParser(ArFileParser *fileParser)
{
if (fileParser == NULL) {
return false;
}
for (std::map<std::string, ArMapInfoData*, ArStrCaseCmpOp>::iterator iter = myInfoNameToDataMap.begin();
iter != myInfoNameToDataMap.end();
iter++) {
ArMapInfoData *data = iter->second;
if (data == NUL... | false | false | false | false | false | 0 |
bdc_gadget_ep_dequeue(struct usb_ep *_ep,
struct usb_request *_req)
{
struct bdc_req *req;
unsigned long flags;
struct bdc_ep *ep;
struct bdc *bdc;
int ret;
if (!_ep || !_req)
return -EINVAL;
ep = to_bdc_ep(_ep);
req = to_bdc_req(_req);
bdc = ep->bdc;
dev_dbg(bdc->dev, "%s ep:%s req:%p\n", __func__,... | false | false | false | false | false | 0 |
create_pixmap (GtkWidget *widget,
const gchar *filename)
{
if (widget) {};
gchar *pathname = NULL;
GtkWidget *pixmap;
if (!filename || !filename[0])
return gtk_image_new ();
pathname = find_pixmap_file (filename);
if (!pathna... | false | false | false | false | false | 0 |
start_element(rum_parser_t **headp, rum_state_t state, const rum_tag_t *language, rum_buffer_t *buffer)
{
char *tag_name;
rum_element_t *parent = (*headp)->element;
rum_set_error(NULL);
if ((tag_name = rum_buffer_clone_substr(buffer)) == NULL) {
return -1;
}
rum_buffer_reset_substr(buff... | false | false | false | false | false | 0 |
newKey(const char *password, int passwdLength)
{
shared_ptr<SSLKey> key( new SSLKey( _keySize, _ivLength) );
int bytes = 0;
if( iface.current() > 1 )
{
// now we use BytesToKey, which can deal with Blowfish keys larger then
// 128 bits.
bytes = BytesToKey( _keySize, _ivLength, EVP_sha1(),
... | false | false | false | false | false | 0 |
unmap_region(struct mm_struct *mm,
struct vm_area_struct *vma, struct vm_area_struct *prev,
unsigned long start, unsigned long end)
{
struct vm_area_struct *next = prev ? prev->vm_next : mm->mmap;
struct mmu_gather tlb;
lru_add_drain();
tlb_gather_mmu(&tlb, mm, start, end);
update_hiwater_rss(mm);
unmap_vmas... | false | false | false | false | false | 0 |
copied_enumerate_glyph(gs_font *font, int *pindex,
gs_glyph_space_t glyph_space, gs_glyph *pglyph)
{
gs_copied_font_data_t *const cfdata = cf_data(font);
if (cfdata->ordered) {
if (*pindex >= cfdata->num_glyphs)
*pindex = 0;
else {
int i = cfdata->... | false | false | false | false | false | 0 |
tick()
{
if (mouseDisabled) {
return;
}
// Check if a mouse-button is down: left = paint, right = erase.
if (paintEditObj || paintAltObj) {
int i, j;
emit getMousePos (i, j);
// Check if the mouse has moved.
if ((i != oldI) || (j != oldJ)) {
// If s... | false | false | false | false | false | 0 |
kfd_topology_update_sysfs(void)
{
int ret;
pr_info("Creating topology SYSFS entries\n");
if (sys_props.kobj_topology == NULL) {
sys_props.kobj_topology =
kfd_alloc_struct(sys_props.kobj_topology);
if (!sys_props.kobj_topology)
return -ENOMEM;
ret = kobject_init_and_add(sys_props.kobj_topology,
&sy... | false | false | false | false | false | 0 |
flow_spec_to_ntuple(struct ethtool_rx_flow_spec *fsp,
struct ethtool_rx_ntuple_flow_spec *ntuple)
{
size_t i;
/* verify location is not specified */
if (fsp->location != RX_CLS_LOC_ANY)
return -1;
/* destination MAC address in L3/L4 rules is not supported by ntuple */
if (fsp->flow_type & FLOW_MAC_EX... | false | false | false | false | false | 0 |
GetExeVersion(
const QString& sPath)
{
#ifdef WIN32
CFileVersionInfo fvi;
if (!fvi.Create(qPrintable(sPath)))
{
return "";
}
return QString::fromStdString(fvi.GetFileVersion());
#else // !WIN32
Q_UNUSED( sPath )
LOG(2, "GetExeVersion called on non-Windows, returning empty st... | false | false | false | false | false | 0 |
send_string(Sock *sock, char *str)
{
int val, len = strlen(str);
send_int(sock, len+1);
val = swrite(sock, str, len+1, NULL);
if (val == -1) {
return -1;
}
return 0;
} | false | false | false | false | false | 0 |
say_digit_str_full(struct ast_channel *chan, const char *str, const char *ints, const char *lang, int audiofd, int ctrlfd)
{
const char *fn;
char fnbuf[256];
int num = 0;
int res = 0;
while (str[num] && !res) {
fn = NULL;
switch (str[num]) {
case ('*'):
fn = "digits/star";
break;
case ('#'):
fn =... | true | true | false | false | false | 1 |
snd_ca0106_pcm_trigger_capture(struct snd_pcm_substream *substream,
int cmd)
{
struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_ca0106_pcm *epcm = runtime->private_data;
int channel = epcm->channel_id;
int result = 0;
switch (cmd... | false | false | false | false | false | 0 |
igb_phy_hw_reset_sgmii_82575(struct e1000_hw *hw)
{
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val;
/* This isn't a true "hard" reset, but is the only reset
* available to us at this time.
*/
hw_dbg("Soft resetting SGMII attached PHY...\n");
/* SFP documentation requires the following to configure the S... | false | false | false | false | false | 0 |
set_pwm(struct device *dev, struct device_attribute *da,
const char *buf, size_t count)
{
struct g760a_data *data = g760a_update_client(dev);
struct i2c_client *client = data->client;
unsigned long val;
if (kstrtoul(buf, 10, &val))
return -EINVAL;
mutex_lock(&data->update_lock);
data->set_cnt = PWM_T... | false | false | false | false | false | 0 |
k5_init_preauth_context(krb5_context context)
{
krb5_plugin_initvt_fn *modules = NULL, *mod;
clpreauth_handle *list = NULL, h, h2;
size_t count;
krb5_preauthtype *tp;
/* Only do this once for each krb5_context */
if (context->preauth_context != NULL)
return;
/* Auto-register built-... | false | false | false | false | false | 0 |
dvb_terrestrial_scanner_add_scanning_data (DVBTerrestrialScanner* self, guint frequency, guint hierarchy, guint bandwidth, const gchar* transmode, const gchar* code_rate_hp, const gchar* code_rate_lp, const gchar* constellation, guint guard) {
GstStructure* tuning_params = NULL;
guint _tmp0_ = 0U;
guint _tmp1_ = 0U;... | false | false | false | false | false | 0 |
find_matching_pad (gconstpointer a, gconstpointer b)
{
const GValue *val = a;
GstPad *pad = GST_PAD (g_value_get_object (val));
GstCaps *caps = GST_CAPS (b);
GstCaps *padcaps = NULL;
gint ret = 1;
padcaps = gst_pad_query_caps (pad, NULL);
if (gst_caps_can_intersect (caps, padcaps))
ret = 0;
gst_c... | false | false | false | false | false | 0 |
show_arp_header(struct arp_header *hdr, int simple)
{
pr_bold_info("ARP Header:");
if (simple == 0)
{
println("hardware_type = %d", ntohs(hdr->hardware_type));
println("protocol_type = %d", ntohs(hdr->protocol_type));
println("hardware_addrlen = %d", hdr->hardware_addrlen);
println("protocol_addrlen = %d", ... | false | false | false | false | false | 0 |
dump_rsvp(packet_t *pkt)
{
rsvp_header_t rsvp;
u_int8_t version;
u_int8_t flags;
/* Set the layer */
set_layer(LAYER_APPLICATION);
/* Stats accounting */
stats_update(STATS_IP);
/* Get the common header */
if (get_packet_bytes((u_int8_t *) &rsvp, pkt, sizeof(rsvp_header_t)) == 0)
return;
/* ... | false | false | false | false | false | 0 |
transformWindowDefinitions(ParseState *pstate,
List *windowdefs,
List **targetlist)
{
List *result = NIL;
Index winref = 0;
ListCell *lc;
foreach(lc, windowdefs)
{
WindowDef *windef = (WindowDef *) lfirst(lc);
WindowClause *refwc = NULL;
List *partitionClause;
List *orderCla... | false | false | false | false | false | 0 |
omega_count_red_equations (omega_pb pb)
{
int e, i;
int result = 0;
for (e = 0; e < pb->num_eqs; e++)
if (pb->eqs[e].color == omega_red)
{
for (i = pb->num_vars; i > 0; i--)
if (pb->geqs[e].coef[i])
break;
if (i == 0 && pb->geqs[e].coef[0] == 1)
return 0;
else
result += 2;
}
... | false | false | false | false | false | 0 |
setCurrentDebugType(const char *Type) {
CurrentDebugType->clear();
CurrentDebugType->push_back(Type);
} | false | false | false | false | false | 0 |
gcm_trc_widget_finalize (GObject *object)
{
GcmTrcWidget *trc = (GcmTrcWidget*) object;
g_object_unref (trc->priv->layout);
if (trc->priv->clut != NULL)
g_object_unref (trc->priv->clut);
G_OBJECT_CLASS (gcm_trc_widget_parent_class)->finalize (object);
} | false | false | false | false | false | 0 |
SendResponse(const Request &request, const QVariant &data)
{
QVariantList container = Response::Build(request.GetId(), data);
QByteArray msg;
QDataStream stream(&msg, QIODevice::WriteOnly);
stream << container;
qDebug() << "RpcHandler: Sending response" << request.GetId() <<
"to" << request.... | false | false | false | false | false | 0 |
myvsnprintf_int(char **pdest,char *de,int width,int zero,
int neg,unsigned base,int letter,
longlong val)
{
if (val < 0)
myvsnprintf_uint_impl(pdest,de,width,zero,neg,base,letter,1,-val);
else
myvsnprintf_uint_impl(pdest,de,width,zero,neg,base,letter,0,val);
} | 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.