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 |
|---|---|---|---|---|---|---|
cb_can_select (G_GNUC_UNUSED GtkTreeSelection *selection,
G_GNUC_UNUSED GtkTreeModel *model,
GtkTreePath *path,
gboolean path_currently_selected,
G_GNUC_UNUSED CFormatState *state)
{
if (path_currently_selected)
return TRUE;
return (gtk_tree_path_get_depth (path) == 1);
} | false | false | false | false | false | 0 |
p_push_iter(IterStackType *iter_stack, IterStackItemType *stack_item)
{
iter_stack->stack_top++;
if(iter_stack->stack_top < iter_stack->stack_max_elem)
{
iter_stack->stack_arr[iter_stack->stack_top].lastval_type = stack_item->lastval_type;
iter_stack->stack_arr[iter_stack->stack_top].elem_size = stack_ite... | false | false | false | false | false | 0 |
Java_ncsa_hdf_hdf5lib_H5__1H5Rdereference
(JNIEnv *env, jclass clss, jint dataset, jint ref_type,
jbyteArray ref )
{
jboolean isCopy;
jbyte *refP;
hid_t status;
if (ref == NULL) {
h5nullArgument( env, "H5Rdereference: ref is NULL");
return -1;
}
if ((ref_type == H5R_OBJECT)... | false | false | false | false | false | 0 |
ipmi_oem_inventec_set_mac_address (ipmi_oem_state_data_t *state_data)
{
uint8_t bytes_rq[IPMI_OEM_MAX_BYTES];
uint8_t bytes_rs[IPMI_OEM_MAX_BYTES];
int rs_len;
unsigned int tmp;
uint8_t cmd;
int rv = -1;
assert (state_data);
assert (state_data->prog_data->args->oem_options_count == 2);
if (strcasecm... | false | false | false | false | false | 0 |
choke_dialogue()
{
register long i = (Strangled & TIMEOUT);
if(i > 0 && i <= SIZE(choke_texts)) {
if (Breathless || !rn2(50))
pline(choke_texts2[SIZE(choke_texts2) - i], body_part(NECK));
else {
const char *str = choke_texts[SIZE(choke_texts)-i];
if (index(str, '%'))
pline(str, hcolor(NH_BLUE)... | false | false | false | false | false | 0 |
hci_read_local_version(int dd, struct hci_version *ver, int to)
{
read_local_version_rp rp;
struct hci_request rq;
memset(&rq, 0, sizeof(rq));
rq.ogf = OGF_INFO_PARAM;
rq.ocf = OCF_READ_LOCAL_VERSION;
rq.rparam = &rp;
rq.rlen = READ_LOCAL_VERSION_RP_SIZE;
if (hci_send_req(dd, &rq, to) < 0)
return -1... | false | false | false | false | false | 0 |
distrust_tactics_helper(int str)
{
int color = board[str];
int adj;
int adjs[MAXCHAIN];
int k;
int r;
int s;
int lib = countlib(str);
ASSERT1(IS_STONE(board[str]), str);
if (lib > 2)
return 1;
else if (lib == 1)
return 0;
adj = chainlinks3(str, adjs, lib);
for (r = 0; r < adj; r++... | false | false | false | false | false | 0 |
gen_indirect_dispatch_tables (tree type)
{
const char *type_name = IDENTIFIER_POINTER (mangled_classname ("", type));
{
tree field = NULL;
char *buf = (char *) alloca (strlen (type_name)
+ strlen ("_catch_classes_") + 1);
tree catch_class_type = make_node (RECORD_TYPE);
sprintf (buf, "_catch... | false | false | false | true | false | 1 |
magic_scandesc_cleanup(cli_ctx *ctx, cli_file_t type, unsigned char *hash, size_t hashed_size, int cache_clean, int retcode, void *parent_property)
{
#if HAVE_JSON
ctx->wrkproperty = (struct json_object *)(parent_property);
#else
UNUSEDPARAM(parent_property);
#endif
UNUSEDPARAM(type);
cli_dbgmsg("cli_... | false | false | false | false | false | 0 |
from_hex_char( int h )
{
h -= 0x30;
if ( (unsigned) h > 9 )
h = ((h - 0x11) & 0xDF) + 10;
return h;
} | false | false | false | false | false | 0 |
gnc_tree_view_split_reg_delete_current_split (GncTreeViewSplitReg *view)
{
Transaction *trans;
Split *split;
/* Make sure we have stopped editing */
gnc_tree_view_split_reg_finish_edit (view);
trans = view->priv->current_trans;
split = view->priv->current_split;
... | false | false | false | false | false | 0 |
getCodeAddrSpace(MemSDNode *N) {
const Value *Src = N->getMemOperand()->getValue();
if (!Src)
return NVPTX::PTXLdStInstCode::GENERIC;
if (auto *PT = dyn_cast<PointerType>(Src->getType())) {
switch (PT->getAddressSpace()) {
case llvm::ADDRESS_SPACE_LOCAL: return NVPTX::PTXLdStInstCode::LOCAL;
cas... | false | false | false | false | false | 0 |
DtsPushAuthFwToLink(HANDLE hDevice, char *FwBinFile)
{
BC_STATUS status=BC_STS_ERROR;
uint32_t byesDnld=0;
char *fwfile=NULL;
DTS_LIB_CONTEXT *Ctx=NULL;
DTS_GET_CTX(hDevice,Ctx);
if(Ctx->OpMode == DTS_DIAG_MODE){
/* In command line case, we don't get a close
* between successive devinit commands.
*/... | false | false | false | false | false | 0 |
c_expand_expr (tree exp, rtx target, enum machine_mode tmode,
int modifier /* Actually enum_modifier. */,
rtx *alt_rtl)
{
switch (TREE_CODE (exp))
{
case STMT_EXPR:
{
tree rtl_expr;
rtx result;
bool preserve_result = false;
if (STMT_EXPR_WARN_UNUSED_RESULT (exp) && target == const... | false | false | false | true | false | 1 |
vl_kdforestsearcher_delete (VlKDForestSearcher * self)
{
if (self->previous && self->next) {
self->previous->next = self->next;
self->next->previous = self->previous;
} else if (self->previous && !self->next) {
self->previous->next = NULL;
} else if (!self->previous && self->next) {
self->next->pr... | false | false | false | false | false | 0 |
empty_list (void)
{
DECLARE_STRINGSBUF (ret);
if (end_stringsbuf (&ret) == -1)
return NULL;
return ret.argv;
} | false | false | false | false | false | 0 |
EffectDummyCreature_conjure_rift(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* /*pCreatureTarget*/, ObjectGuid /*originalCasterGuid*/)
{
// always check spellid and effectindex
if (uiSpellId == SPELL_CONJURE_RIFT && uiEffIndex == EFFECT_INDEX_0)
{
pCaster->SummonCreature(NP... | false | false | false | false | false | 0 |
IRead(hsStream* S, plResManager* mgr) {
fEnter = S->readBool();
fHitter = mgr->readKey(S);
fHittee = mgr->readKey(S);
} | false | false | false | false | false | 0 |
type_change(GtkWidget *w)
{
G_CONST_RETURN gchar *tmp;
struct file_pak *file_data;
tmp = gtk_entry_get_text(GTK_ENTRY(w));
/* update if valid type */
file_data = get_file_info((gpointer *) tmp, BY_LABEL);
if (file_data)
{
sysenv.file_type = file_data->id;
update_file_pane();
}
} | false | false | false | false | false | 0 |
broadsheet_gpio_burst_write(struct broadsheetfb_par *par, int size,
u16 *data)
{
int i;
u16 tmp;
par->board->set_ctl(par, BS_CS, 0);
par->board->set_ctl(par, BS_DC, 1);
for (i = 0; i < size; i++) {
par->board->set_ctl(par, BS_WR, 0);
tmp = (data[i] & 0x0F) << 4;
tmp |= (data[i] & 0x0F00) << 4;
par->... | false | false | false | false | false | 0 |
ds1390_probe(struct spi_device *spi)
{
unsigned char tmp;
struct ds1390 *chip;
int res;
spi->mode = SPI_MODE_3;
spi->bits_per_word = 8;
spi_setup(spi);
chip = devm_kzalloc(&spi->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
spi_set_drvdata(spi, chip);
res = ds1390_get_reg(&spi->dev, DS1390... | false | false | false | false | false | 0 |
cli_bcapi_trace_ptr(struct cli_bc_ctx *ctx, const uint8_t* ptr, uint32_t dummy)
{
if (LIKELY(ctx->trace_level < trace_val))
return 0;
if (ctx->trace_level&0x80) {
if ((ctx->trace_level&0x7f) < trace_param)
return 0;
ctx->trace(ctx, trace_param);
}
if (ctx->trace_ptr)
ctx->trace_ptr(ctx, ptr);
... | false | false | false | false | false | 0 |
ppc32_trigger_exception(cpu_ppc_t *cpu,u_int exc_vector)
{
//printf("TRIGGER_EXCEPTION: saving cpu->ia=0x%8.8x, msr=0x%8.8x\n",
// cpu->ia,cpu->msr);
/* Save the return instruction address */
cpu->srr0 = cpu->ia;
if (exc_vector == PPC32_EXC_SYSCALL)
cpu->srr0 += sizeof(ppc_insn_t);
/... | false | false | false | false | false | 0 |
device_remove_stored(struct btd_device *device)
{
bdaddr_t src;
char key[20];
DBusConnection *conn = get_dbus_connection();
adapter_get_address(device->adapter, &src);
ba2str(&device->bdaddr, key);
/* key: address only */
delete_entry(&src, "profiles", key);
delete_entry(&src, "trusts", key);
if (device_is_... | false | false | false | false | false | 0 |
spif_linked_list_reverse(spif_linked_list_t self)
{
spif_linked_list_item_t current, tmp, previous;
ASSERT_RVAL(!SPIF_LIST_ISNULL(self), FALSE);
for (previous = SPIF_NULL_TYPE(linked_list_item), current = self->head; current; previous = tmp) {
tmp = current;
current = current->next;
... | false | false | false | false | true | 1 |
clist_init_states(gx_device * dev, byte * init_data, uint data_size)
{
gx_device_clist_writer * const cdev =
&((gx_device_clist *)dev)->writer;
ulong state_size = cdev->nbands * (ulong) sizeof(gx_clist_state);
/* Align to the natural boundary for ARM processors, bug 689600 */
long alignment = (-... | false | false | false | false | false | 0 |
mem_cgroup_precharge_mc(struct mm_struct *mm)
{
unsigned long precharge = mem_cgroup_count_precharge(mm);
VM_BUG_ON(mc.moving_task);
mc.moving_task = current;
return mem_cgroup_do_precharge(precharge);
} | false | false | false | false | false | 0 |
lgl_units_get_name (lglUnits units)
{
if ( (units >= LGL_UNITS_FIRST) && (units <= LGL_UNITS_LAST) )
{
return gettext ((char *)unit_table[units].name);
}
else
{
/* Default to "points", if invalid. */
return gettext ((char *)unit... | false | false | false | false | false | 0 |
SimplifySwitch(SwitchInst *SI, IRBuilder<> &Builder) {
// If this switch is too complex to want to look at, ignore it.
if (!isValueEqualityComparison(SI))
return false;
BasicBlock *BB = SI->getParent();
// If we only have one predecessor, and if it is a branch on this value,
// see if that predecessor t... | false | false | false | false | false | 0 |
GetColorInterpretation()
{
if( eFormat == AdaptiveRGB ||
eFormat == Uncompressed24bit ||
eFormat == ContinuousTone )
{
switch( nRGBIndex )
{
case 1:
return GCI_RedBand;
case 2:
return GCI_GreenBand;
case 3:
... | false | false | false | false | false | 0 |
register_platform (dc1394_t * d, const platform_dispatch_t * dispatch,
const char * name)
{
if (!dispatch->platform_new || !dispatch->platform_free ||
!dispatch->get_device_list || !dispatch->free_device_list ||
!dispatch->device_get_config_rom ||
!dispatch->camera_new ||... | false | false | false | false | false | 0 |
parseValue (driOptionValue *v, driOptionType type,
const XML_Char *string) {
const XML_Char *tail = NULL;
/* skip leading white-space */
string += strspn (string, " \f\n\r\t\v");
switch (type) {
case DRI_BOOL:
if (!strcmp (string, "false")) {
v->_bool = GL_FALSE;
tail = string + 5... | false | false | false | false | false | 0 |
maybe_print_line (source_location src_loc)
{
const struct line_map *map = linemap_lookup (line_table, src_loc);
int src_line = SOURCE_LINE (map, src_loc);
/* End the previous line of text. */
if (print.printed)
{
putc ('\n', print.outf);
print.src_line++;
print.printed = 0;
}
if (s... | false | false | false | false | false | 0 |
analyze1(GroupInfo &info,
const AndModelGroup *andAncestor,
unsigned andGroupIndex,
FirstSet &first,
LastSet &last)
{
andDepth_ = ContentToken::andDepth(andAncestor);
andIndex_ = ContentToken::andIndex(andAncestor);
andAncestor_ = andAncestor;
andGroupIndex_ = andGroupIndex;
if... | false | false | false | false | false | 0 |
stoken(char* c, int* p, char* s, const char* sep, const char* ignore)
{
unsigned begin;
unsigned end;
begin = *p;
while (s[*p] && strchr(sep, s[*p])==0)
++*p;
end = *p;
*c = s[*p];
if (s[*p]) {
s[*p] = 0;
++*p;
}
while (begin < end && strchr(ignore, s[begin])!=0) {
++begin;
}
while (begin < end... | false | false | false | false | false | 0 |
write_restart(FILE *fp)
{
int n = 0;
double list[4];
list[n++] = event_number;
list[n++] = event_timestep;
list[n++] = tlo;
list[n++] = ebarrier;
if (comm->me == 0) {
int size = n * sizeof(double);
fwrite(&size,sizeof(int),1,fp);
fwrite(list,sizeof(double),n,fp);
}
} | false | false | false | false | false | 0 |
get_max_dlg_tag(Block *block_head, int tlg_num)
{
int *max_dlg_tag = zcalloc(tlg_num + 1, sizeof(int));
Block *b;
for (b = block_head; b != NULL; b = b->next) {
if (block_has_dlg_tag(b) && max_dlg_tag[b->tlg_tag] < b->dlg_tag) {
max_dlg_tag[b->tlg_tag] = b->dlg_tag;
}
}
... | false | false | false | false | false | 0 |
SocketRealError()
{
bool ret = false;
if (InternalError()) {
int lastError = InternalGetLastError();
ret = lastError != EC_ERROR_NOERROR && lastError != EC_ERROR_WOULDBLOCK;
}
return ret;
} | false | false | false | false | false | 0 |
i2400mu_reset_resume(struct usb_interface *iface)
{
int result;
struct device *dev = &iface->dev;
struct i2400mu *i2400mu = usb_get_intfdata(iface);
struct i2400m *i2400m = &i2400mu->i2400m;
d_fnstart(3, dev, "(iface %p)\n", iface);
result = i2400m_dev_reset_handle(i2400m, "device reset on resume");
d_fnend(3, ... | false | false | false | false | false | 0 |
add_state(struct prod *prod) {
struct state *result = NULL;
int r;
r = ALLOC(result);
ERR_NOMEM(r < 0, prod->lens->info);
list_cons(prod->start->next, result);
error:
return result;
} | false | false | false | false | false | 0 |
clear_resv_hash(void)
{
struct ConfItem *aconf;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
int i;
HASH_WALK_SAFE(i, R_MAX, ptr, next_ptr, resvTable)
{
aconf = ptr->data;
/* skip temp resvs */
if(aconf->flags & CONF_FLAGS_TEMPORARY)
continue;
free_conf(ptr->data);
rb_dlinkDestroy(ptr, &resvTable[... | false | false | false | false | false | 0 |
scm_require_internal(const char *filename)
{
ScmObj loaded_str;
loaded_str = make_loaded_str(filename);
if (!scm_providedp(loaded_str)) {
scm_load(filename);
scm_provide(loaded_str);
}
return NULL;
} | false | false | false | false | false | 0 |
samsung_leds_exit(struct samsung_laptop *samsung)
{
if (!IS_ERR_OR_NULL(samsung->kbd_led.dev))
led_classdev_unregister(&samsung->kbd_led);
if (samsung->led_workqueue)
destroy_workqueue(samsung->led_workqueue);
} | false | false | false | false | false | 0 |
player_controller_determine_state (PlayerController* self) {
Mpris2Controller* _tmp0_ = NULL;
gboolean _tmp1_ = FALSE;
g_return_if_fail (self != NULL);
_tmp0_ = self->mpris_bridge;
_tmp1_ = mpris2_controller_connected (_tmp0_);
if (_tmp1_ == TRUE) {
MetadataMenuitem* md = NULL;
GeeArrayList* _tmp2_ = NULL;
... | false | false | false | false | false | 0 |
dec_mpd_to_eng(PyObject *self, PyObject *args, PyObject *kwds)
{
static char *kwlist[] = {"context", NULL};
PyObject *result;
PyObject *context;
mpd_ssize_t size;
char *s;
CURRENT_CONTEXT(context);
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O", kwlist,
... | false | false | false | false | false | 0 |
dccp_parse(struct xt_option_call *cb)
{
struct xt_dccp_info *einfo = cb->data;
xtables_option_parse(cb);
switch (cb->entry->id) {
case O_SOURCE_PORT:
einfo->flags |= XT_DCCP_SRC_PORTS;
if (cb->invert)
einfo->invflags |= XT_DCCP_SRC_PORTS;
break;
case O_DEST_PORT:
einfo->flags |= XT_DCCP_DEST_PORTS;
i... | false | false | false | false | false | 0 |
ignore_check (char *host, int type)
{
struct ignore *ig;
GSList *list = ignore_list;
/* check if there's an UNIGNORE first, they take precendance. */
while (list)
{
ig = (struct ignore *) list->data;
if (ig->type & IG_UNIG)
{
if (ig->type & type)
{
if (match (ig->mask, host))
return FALSE;
... | true | true | false | false | true | 1 |
lockdep_softirq_end(bool in_hardirq)
{
lockdep_softirq_exit();
if (in_hardirq)
trace_hardirq_enter();
} | false | false | false | false | false | 0 |
AsMatchExactWord (
char *Word,
UINT32 WordLength)
{
char NextChar;
char PrevChar;
NextChar = Word[WordLength];
PrevChar = * (Word -1);
if (isalnum ((int) NextChar) ||
(NextChar == '_') ||
isalnum ((... | false | false | false | false | false | 0 |
load_mres(ulong siz, CVmImageLoaderMres *res_ifc)
{
char buf[16];
uint entry_cnt;
long base_ofs;
uint i;
/*
* Note the current physical seek position - each entry's seek position
* is stored in the table of contents as an offset from this location.
*
* Compu... | false | false | false | false | false | 0 |
buf_clear(b)
register Buffer *b;
{
lfreelist(b->b_first);
b->b_first = b->b_dot = b->b_last = NULL;
(void) listput(b, b->b_first);
SavLine(b->b_dot, NullStr);
b->b_char = 0;
AllMarkReset(b, b->b_dot);
if (b == curbuf)
getDOT();
diverge(b, NO);
if (b->b_modified)
UpdModLine = YES;
b->b_ntbf = b->b_modifi... | false | false | false | false | false | 0 |
realtime_multi_ldap(const char *basedn,
const char *table_name, va_list ap)
{
char *op;
const char *initfield = NULL;
const char *newparam, *newval;
struct ast_variable **vars =
realtime_ldap_base_ap(NULL, basedn, table_name, ap);
struct ast_config *cfg = NULL;
newparam = va_arg(ap, const char *);
newva... | false | false | false | false | false | 0 |
ast_netsock_release(struct ast_netsock_list *list)
{
ASTOBJ_CONTAINER_DESTROYALL(list, ast_netsock_destroy);
ASTOBJ_CONTAINER_DESTROY(list);
ast_free(list);
return 0;
} | false | true | false | false | false | 1 |
dumpvars_cb(p_cb_data cause)
{
if (dumpvars_status != 1) return 0;
dumpvars_status = 2;
dumpvars_time = timerec_to_time64(cause->time);
vcd_cur_time = dumpvars_time;
if (!dump_is_off) {
lxt2_wr_set_time64(dump_file, dumpvars_time);
vcd_checkpoint();
}
retur... | false | false | false | false | false | 0 |
_________lambda114_ (Block58Data* _data58_) {
Block56Data* _data56_;
Block55Data* _data55_;
BoxesSpiceDisplay * self;
GtkSwitch* _tmp0_ = NULL;
gboolean _tmp1_ = FALSE;
gboolean _tmp2_ = FALSE;
#line 327 "/extra-data/checkout/gnome/gnome-boxes/src/spice-display.vala"
_data56_ = _data58_->_data56_;
#line 327 "/ex... | false | false | false | false | false | 0 |
emitCmp(SelectionDAG &DAG, SDLoc DL, Comparison &C) {
if (!C.Op1.getNode()) {
SDValue Op;
switch (C.Op0.getOpcode()) {
case ISD::INTRINSIC_W_CHAIN:
Op = emitIntrinsicWithChainAndGlue(DAG, C.Op0, C.Opcode);
break;
case ISD::INTRINSIC_WO_CHAIN:
Op = emitIntrinsicWithGlue(DAG, C.Op0, C.... | false | false | false | false | false | 0 |
repl_objset_delete(Repl_Objset *o, void *handle)
{
Repl_Objset_object *co = (Repl_Objset_object *)handle;
PR_ASSERT(NULL != o);
PR_ASSERT(NULL != co);
PR_Lock(o->lock);
if (co->refcnt == 0)
{
removeObjectNolock(o, co);
}
else
{
/* Set deleted flag, clean up later */
co->flags |= REPL_OBJSET_OBJ_FLAG_DE... | false | false | false | false | false | 0 |
_pickle_dumps_impl(PyModuleDef *module, PyObject *obj, PyObject *protocol, int fix_imports)
/*[clinic end generated code: output=777f0deefe5b88ee input=293dbeda181580b7]*/
{
PyObject *result;
PicklerObject *pickler = _Pickler_New();
if (pickler == NULL)
return NULL;
if (_Pickler_SetProtocol(pi... | false | false | false | false | false | 0 |
run_rsa_derive (const void *data, size_t datalen)
{
gpg_error_t err;
gcry_sexp_t s_keyspec, s_key, s_top, l1;
gcry_mpi_t mpi;
const char *parmlist;
int idx;
if (!datalen)
err = gpg_error (GPG_ERR_NO_DATA);
else
err = gcry_sexp_new (&s_keyspec, data, datalen, 1);
if (err)
die ("gcry_sexp_new... | false | false | false | false | true | 1 |
dump_crtcs_fd(int drmfd)
{
int i;
drmModeRes *mode_resources = drmModeGetResources(drmfd);
printf("CRTCs:\n");
printf("id\tfb\tpos\tsize\n");
for (i = 0; i < mode_resources->count_crtcs; i++) {
drmModeCrtc *crtc;
crtc = drmModeGetCrtc(drmfd, mode_resources->crtcs[i]);
if (!crtc) {
fprintf(stderr, "could... | false | false | false | false | false | 0 |
Delete_Str_Stream(int stm)
{
StrSInf *str_stream = (StrSInf *) (stm_tbl[stm]->file);
if (str_stream == &static_str_stream_rd ||
str_stream == &static_str_stream_wr)
{
str_stream->ptr = NULL; /* not in use */
}
else
{
if (str_stream->buff_alloc_size)
Free(str_stream->buff);
Fr... | false | false | false | false | false | 0 |
CDReflect(SymbolDesc)
struct s *SymbolDesc;
{
/*
* This routine must be invoked at certain times by the CD user.
* All bounding box information must be up-to-date if the indexing
* method is to work.
*
* CDReflect will return False if malloc fails. Otherwise, True is
* returned.
... | false | false | false | false | false | 0 |
put_dquot_list(struct list_head *tofree_head)
{
struct list_head *act_head;
struct dquot *dquot;
act_head = tofree_head->next;
while (act_head != tofree_head) {
dquot = list_entry(act_head, struct dquot, dq_free);
act_head = act_head->next;
/* Remove dquot from the list so we won't have problems... */
list... | false | false | false | false | false | 0 |
decoded (FishSound * fsound, float ** pcm, long frames, void * user_data)
{
const FishSoundComment * comment;
if (fsound == NULL)
FAIL ("No Fish Found");
INFO ("+ Retrieving first (expect ARTIST1)");
comment = fish_sound_comment_first (fsound);
if (comment == NULL)
FAIL ("Recently inserted ARTIST1 ... | false | false | false | false | false | 0 |
mmc_test_nonblock_transfer(struct mmc_test_card *test,
struct scatterlist *sg, unsigned sg_len,
unsigned dev_addr, unsigned blocks,
unsigned blksz, int write, int count)
{
struct mmc_request mrq1;
struct mmc_command cmd1;
struct mmc_command stop1;
struct mmc_data data1;
struct mmc_re... | false | false | false | false | false | 0 |
tools_remove_node_cache(const char *node, const char *target)
{
int n = 0;
int rc = -1;
char *name = NULL;
char *admin_uuid = NULL;
crm_ipc_t *conn = crm_ipc_new(target, 0);
xmlNode *cmd = NULL;
xmlNode *hello = NULL;
char *endptr = NULL;
if (!conn) {
return -ENOTCONN;
}... | false | false | false | false | true | 1 |
addReference (string name) {
Reference *p = currentScope->addReference (name) ;
addVariableName (name, currentScope, p) ;
return p ;
} | false | false | false | false | false | 0 |
ncp_set_charsets(struct ncp_server* server, struct ncp_nls_ioctl __user *arg)
{
struct ncp_nls_ioctl user;
struct nls_table *codepage;
struct nls_table *iocharset;
struct nls_table *oldset_io;
struct nls_table *oldset_cp;
int utf8;
int err;
if (copy_from_user(&user, arg, sizeof(user)))
return -EFAULT;
code... | false | false | false | false | false | 0 |
M_SetupReadFields(void)
{
if(META_DEBUG)
{
METAIO_STREAM::cout << "MetaTubeGraph: M_SetupReadFields"
<< METAIO_STREAM::endl;
}
MetaObject::M_SetupReadFields();
MET_FieldRecordType * mF;
mF = new MET_FieldRecordType;
MET_InitReadField(mF, "Root", MET_INT, false);
m_Fiel... | false | false | false | false | false | 0 |
relay_back_has_subordinates( Operation *op, Entry *e, int *hasSubs )
{
BackendDB *bd;
int rc = LDAP_OTHER;
bd = relay_back_select_backend( op, NULL, relay_op_has_subordinates );
if ( bd && bd->be_has_subordinates ) {
RELAY_WRAP_OP( op, bd, relay_op_has_subordinates, {
rc = bd->be_has_subordinates( op, e, h... | false | false | false | false | false | 0 |
finalize_nrv_r (tree* tp, int* walk_subtrees, void* data)
{
struct nrv_data *dp = (struct nrv_data *)data;
void **slot;
/* No need to walk into types. There wouldn't be any need to walk into
non-statements, except that we have to consider STMT_EXPRs. */
if (TYPE_P (*tp))
*walk_subtrees = 0;
/* Cha... | false | false | false | false | false | 0 |
InvokeByIndex (int aIndex,
const NPVariant *argv,
uint32_t argc,
NPVariant *_result)
{
TOTEM_LOG_INVOKE (aIndex, totemConePlaylistItems);
switch (Methods (aIndex)) {
case eClear:
Plugin()-... | false | false | false | false | false | 0 |
cc_set_nickname(CyanChat* cc, const char* nick) {
char* msg = NULL;
if (cc == NULL || cc->socket == -1 || nick == NULL) {
return;
}
msg = malloc(strlen(nick) + 16);
sprintf(msg, "10|%s\r\n", nick);
cc->tmp_nickname = strdup(nick);
write(cc->socket, msg, strlen(msg));
free(ms... | false | false | false | false | false | 0 |
confirm(MsgKind msgno)
{
char buf[80];
/* This is a bit of a hack since we really want to compare the input,
it could be affirmative, but for now any input is NOT! */
printMessage(msgno);
#ifdef USE_READLINE
if (!readline(buf)) return TRUE;
#else
if (gets(buf) == NULL) return TRUE;
#endif
... | false | false | false | false | false | 0 |
record_cond (cond_equivalence *p)
{
struct expr_hash_elt *element = XCNEW (struct expr_hash_elt);
void **slot;
initialize_hash_element_from_expr (&p->cond, p->value, element);
slot = htab_find_slot_with_hash (avail_exprs, (void *)element,
element->hash, INSERT);
if (*slot == NULL)
{
*slot =... | false | false | false | false | false | 0 |
multipart_buffer_read_body(multipart_buffer *self)
{
char buf[FILLUNIT], *out = "";
while(multipart_buffer_read(self, buf, sizeof(buf)))
out = (char*) apr_pstrcat(self->r->pool, out, buf, NULL);
#ifdef DEBUG
ap_log_rerror(MPB_ERROR, "multipart_buffer_read_body: '%s'", out);
#endif
return out;
} | false | false | false | false | false | 0 |
hpsa_wait_for_clear_event_notify_ack(struct ctlr_info *h)
{
int i;
u32 doorbell_value;
unsigned long flags;
/* wait until the clear_event_notify bit 6 is cleared by controller. */
for (i = 0; i < MAX_CLEAR_EVENT_WAIT; i++) {
spin_lock_irqsave(&h->lock, flags);
doorbell_value = readl(h->vaddr + SA5_DOORBELL);
... | false | false | false | false | false | 0 |
cc_mouse_panel_dispose (GObject *object)
{
CcMousePanelPrivate *priv = CC_MOUSE_PANEL (object)->priv;
g_clear_object (&priv->shell_header);
if (priv->prefs_widget)
{
gnome_mouse_properties_dispose (priv->prefs_widget);
priv->prefs_widget = NULL;
}
if (priv->test_widget)
{
gnome_... | false | false | false | false | false | 0 |
addPostInvariant()
{
return (isThis() && vthis && global.params.useInvariants);
} | false | false | false | false | false | 0 |
Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromPCI_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jdoubleArray jarg4) {
jint jresult = 0 ;
OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0... | false | false | false | false | false | 0 |
get_statinfo (const char *pathname, const char *name, struct stat *p)
{
/* Set markers in fields so we have a good idea if the implementation
* didn't bother to set them (e.g., NetBSD st_birthtimespec for MS-DOS
* files)
*/
if (!state.have_stat)
{
set_stat_placeholders(p);
if (0 == (*optio... | false | false | false | false | false | 0 |
createImagesFile()
{
gchar* message = NULL;
gchar* t;
gchar* format;
if(!createFilm)
{
setTextInProgress(" ");
return FALSE;
}
format =get_format_image_from_option();
t = g_strdup_printf(_("The %s%sgab%d.%s file was created"), get_last_directory(),G_DIR_SEPARATOR_S,numFileFilm, format);
if(!strcmp(formatF... | false | false | false | false | false | 0 |
update_used_tables()
{
used_tables_cache= 0;
const_item_cache= 1;
for (uint i= 0; i < arg_count; i++)
{
items[i]->update_used_tables();
used_tables_cache|= items[i]->used_tables();
const_item_cache&= items[i]->const_item();
}
} | false | false | false | false | false | 0 |
InstantiatePrinter(Printer*& p, SystemServices* pSS)
// Instantiate a printer object and return a pointer p based on the previously
// set 'device' variable
{
//ASSERT(p == NULL); // if it's not then we're going to loose memory
FAMILY_HANDLE familyHandle = pPFI->FindDevIdMatch(ModelName[device]);
if (fami... | false | false | false | false | false | 0 |
parse_frame_mjpa(bgav_video_parser_t * parser,
bgav_packet_t * p)
{
uint8_t * ptr;
int i;
uint32_t num = 0;
/* Look for APP1 marker */
ptr = p->data;
for(i = 0; i < p->data_size - 2; i++)
{
num = BGAV_PTR_2_16BE(ptr);
if(num == 0xffe1) // APP1
break;
p... | false | false | false | false | false | 0 |
intel_overlay_do_wait_request(struct intel_overlay *overlay,
struct drm_i915_gem_request *req,
void (*tail)(struct intel_overlay *))
{
int ret;
WARN_ON(overlay->last_flip_req);
i915_gem_request_assign(&overlay->last_flip_req, req);
i915_add_request(req);
overlay->flip_tail = tail;
ret = i915_wait_re... | false | false | false | false | false | 0 |
me2() const {
scale = lastBorn()->lastScale();
double res = 0.0;
if ( apply(mePartonData()[0]) ) {
if ( mePartonData()[0]->coloured() ) {
if ( mePartonData()[1]->coloured() )
res += lastBorn()->pdf2()*sumParton(0);
else
res += sumParton(0);
}
}
if ( apply(mePartonData()[1]) ) {
i... | false | false | false | false | false | 0 |
vmod_set_ip_tos(struct sess *sp, int tos)
{
VTCP_Assert(setsockopt(sp->fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)));
} | false | false | false | false | false | 0 |
removeIPMBasedCompare(MachineInstr *Compare, unsigned SrcReg,
const MachineRegisterInfo *MRI,
const TargetRegisterInfo *TRI) {
MachineInstr *LGFR = nullptr;
MachineInstr *RLL = getDef(SrcReg, MRI);
if (RLL && RLL->getOpcode() == SystemZ::LGFR) {
... | false | false | false | false | false | 0 |
free_sec(struct conf_sec *sec)
{
struct conf_opt *o;
struct conf_sec *s;
if(sec)
{
while(!SLIST_EMPTY(&sec->optlist))
{
o = SLIST_FIRST(&sec->optlist);
SLIST_REMOVE_HEAD(&sec->optlist, entry);
free_opt(o);
}
while... | false | false | false | false | false | 0 |
mc13xxx_led_work(struct work_struct *work)
{
struct mc13xxx_led *led = container_of(work, struct mc13xxx_led, work);
struct mc13xxx_leds *leds = led->leds;
unsigned int reg, bank, off, shift;
switch (led->id) {
case MC13783_LED_MD:
case MC13783_LED_AD:
case MC13783_LED_KP:
reg = 2;
shift = 9 + (led->id - MC... | false | false | false | false | false | 0 |
parse_msg_arg(const struct option *opt, const char *arg, int unset)
{
struct msg_arg *msg = opt->value;
strbuf_grow(&(msg->buf), strlen(arg) + 2);
if (msg->buf.len)
strbuf_addch(&(msg->buf), '\n');
strbuf_addstr(&(msg->buf), arg);
stripspace(&(msg->buf), 0);
msg->given = 1;
return 0;
} | false | false | false | false | false | 0 |
load_program(void)
{
LONG i,j;
UBYTE *buf; /*Will point to memory_ram; */
long Offset=baseaddress;
for(i=0; i<ECW(elfheader->e_shnum); i++)
{
if (ECL(elfsections[i].sh_type)==SHT_PROGBITS)
{
if (ECL(elfsections[i].sh_size)>0)
{
if ((strcmp(§ionnames[ECL(elfsections[... | false | false | false | false | false | 0 |
xdrrec_putint32 (XDR *xdrs, const int32_t *ip)
{
RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
int32_t *dest_ip = (int32_t *) rstrm->out_finger;
if ((rstrm->out_finger += BYTES_PER_XDR_UNIT) > rstrm->out_boundry)
{
/*
* this case should almost never happen so the code is
* inefficient... | false | false | false | false | false | 0 |
mic_smpt_op(struct mic_device *mdev, u64 dma_addr,
int entries, s64 *ref, size_t size)
{
int spt;
int ae = 0;
int i;
unsigned long flags;
dma_addr_t mic_addr = 0;
dma_addr_t addr = dma_addr;
struct mic_smpt_info *smpt_info = mdev->smpt;
spin_lock_irqsave(&smpt_info->smpt_lock, flags);
/* find existi... | false | false | false | false | false | 0 |
usb_led_activity(enum usb_led_event ev)
{
struct led_trigger *trig = NULL;
switch (ev) {
case USB_LED_EVENT_GADGET:
trig = ledtrig_usb_gadget;
break;
case USB_LED_EVENT_HOST:
trig = ledtrig_usb_host;
break;
}
/* led_trigger_blink_oneshot() handles trig == NULL gracefully */
led_trigger_blink_oneshot(tri... | false | false | false | false | false | 0 |
broken()
{
bool res;
// const double crit_nf = (m_nForce/m_max_nForce > 0.0) ? m_nForce/m_max_nForce :0.0;
// const double criterion =
// crit_nf +
// m_shForce/m_max_shForce +
// m_tMoment/m_max_tMoment +
// m_bMoment/m_max_bMoment;
double criterion = m_nForce/m_max_nForce +
... | false | false | false | false | false | 0 |
vhost_net_set_owner(struct vhost_net *n)
{
int r;
mutex_lock(&n->dev.mutex);
if (vhost_dev_has_owner(&n->dev)) {
r = -EBUSY;
goto out;
}
r = vhost_net_set_ubuf_info(n);
if (r)
goto out;
r = vhost_dev_set_owner(&n->dev);
if (r)
vhost_net_clear_ubuf_info(n);
vhost_net_flush(n);
out:
mutex_unlock(&n->de... | false | false | false | false | false | 0 |
discrim_empty(Discrim d)
{
return (d == NULL ? TRUE : (d->u.kids == NULL ? TRUE : FALSE));
} | false | false | false | false | false | 0 |
synchronize (GfsBoundary * bb)
{
GfsBoundaryPeriodic * boundary = GFS_BOUNDARY_PERIODIC (bb);
boundary->sndcount = 0;
if (bb->type == GFS_BOUNDARY_MATCH_VARIABLE)
set_buffers_size (boundary);
} | 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.