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 |
|---|---|---|---|---|---|---|
execute()
{
//cout << "*** INVALID INSTRUCTION ***\n";
#ifdef __DEBUG_VERBOSE__
debug();
#endif
/* Don't know what to do, so just plow through like nothing happened */
if(cpu_pic)
cpu_pic->pc->increment();
} | false | false | false | false | false | 0 |
config_free_instance(instance_t *instance)
{
if (instance->hostname) xmlFree(instance->hostname);
if (instance->password) xmlFree(instance->password);
if (instance->user) xmlFree(instance->user);
if (instance->mount) xmlFree(instance->mount);
if (instance->queue)
{
thread_mutex_destroy(... | false | false | false | false | false | 0 |
globus_gram_job_manager_rsl_extract_relation(
globus_rsl_t * rsl,
const char * attribute)
{
globus_list_t ** operand_ref;
globus_list_t * node;
if(! globus_rsl_is_boolean_and(rsl))
{
return GLOBUS_NULL;
... | false | false | false | false | false | 0 |
get_letter_spacing(BFont_Info *font) {
if (font == FPS_Display_BFont || font == Blue_BFont || font == Red_BFont)
return -2;
else if (font == Menu_BFont)
return -4;
else
return 0;
} | false | false | false | false | false | 0 |
_ctl_diag_unregister(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
{
struct mpt3_diag_unregister karg;
void *request_data;
dma_addr_t request_data_dma;
u32 request_data_sz;
u8 buffer_type;
if (copy_from_user(&karg, arg, sizeof(karg))) {
pr_err("failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
... | false | false | false | false | false | 0 |
gtk_plot_dt_real_add_node(GtkPlotDT *data, GtkPlotDTnode node)
{
gint i;
GtkPlotDTnode *n;
#ifdef DELAUNAY_DEBUG
fprintf(stderr,"delaunay: adding node %d\n",data->node_cnt);
#endif
if (!data) return FALSE;
for (i=0, n= data->nodes; i<data->node_cnt; i++, n++) {
/* test for multiple insertions */
if (n... | false | false | false | false | false | 0 |
del_iddef(APTR data)
{
HSCIDD *iddef = (HSCIDD *) data;
ufreestr(iddef->name);
del_caller(iddef->caller);
if (iddef->fpos)
del_infilepos(iddef->fpos);
ufree(iddef);
} | false | false | false | false | false | 0 |
splice_grow_spd(const struct pipe_inode_info *pipe, struct splice_pipe_desc *spd)
{
unsigned int buffers = ACCESS_ONCE(pipe->buffers);
spd->nr_pages_max = buffers;
if (buffers <= PIPE_DEF_BUFFERS)
return 0;
spd->pages = kmalloc(buffers * sizeof(struct page *), GFP_KERNEL);
spd->partial = kmalloc(buffers * size... | false | false | false | false | false | 0 |
translate(UString::Rep *& location, const UCharBuffer& buf, unsigned hash)
{
UChar *d = static_cast<UChar *>(fastMalloc(sizeof(UChar) * buf.length));
for (unsigned i = 0; i != buf.length; i++)
d[i] = buf.s[i];
UString::Rep *r = UString::Rep::create(d, buf.length).releaseRef();
... | false | false | false | false | false | 0 |
InitializeList(IntervalTree **list,int *number_nodes,IntervalTree *node)
{
if (node == (IntervalTree *) NULL)
return;
if (node->child == (IntervalTree *) NULL)
list[(*number_nodes)++]=node;
InitializeList(list,number_nodes,node->sibling);
InitializeList(list,number_nodes,node->child);
} | false | false | false | false | false | 0 |
comparetup_index_btree(const SortTuple *a, const SortTuple *b,
Tuplesortstate *state)
{
/*
* This is similar to _bt_tuplecompare(), but we have already done the
* index_getattr calls for the first column, and we need to keep track of
* whether any null fields are present. Also see the special treatment
... | false | false | false | false | false | 0 |
connection_ap_process_transparent(entry_connection_t *conn)
{
socks_request_t *socks;
tor_assert(conn);
tor_assert(conn->socks_request);
socks = conn->socks_request;
/* pretend that a socks handshake completed so we don't try to
* send a socks reply down a transparent conn */
socks->command = SOCKS_COM... | false | false | false | false | false | 0 |
glob_braces(record* rec,dlist* list,const char * dir,
const char *rem, const char* obrace, const char* cbrace,
dstring* new)
{
const char *elt;
const char *ptr;
int len;
if (!cbrace || // no closing '}' ?
dstring_append(new, rem, obrace - rem) == -1)
{
dstring_free(new);
return -1;
... | false | false | false | false | false | 0 |
writeApplePartitionMap(int pNum, AbstractFile* file, Partition* partitions, unsigned int BlockSize, ChecksumFunc dataForkChecksum, void* dataForkToken, ResourceKey **resources, NSizResource** nsizIn) {
AbstractFile* bufferFile;
BLKXTable* blkx;
ChecksumToken uncompressedToken;
Partition* buffer;
NSizResource*... | true | true | false | false | false | 1 |
save_fixed_argument_area (int reg_parm_stack_space, rtx argblock, int *low_to_save, int *high_to_save)
{
int low;
int high;
/* Compute the boundary of the area that needs to be saved, if any. */
high = reg_parm_stack_space;
#ifdef ARGS_GROW_DOWNWARD
high += 1;
#endif
if (high > highest_outgoing_arg_in_use... | false | false | false | false | false | 0 |
nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index)
{
bool is_iomem;
u32 *mem = ttm_kmap_obj_virtual(&nvbo->kmap, &is_iomem);
mem = nouveau_bo_mem_index(nvbo, index, mem);
if (is_iomem)
return ioread32_native((void __force __iomem *)mem);
else
return *mem;
} | false | false | false | false | false | 0 |
knh_NameSpace_getConstNULL(CTX ctx, kNameSpace *ns, kbytes_t name)
{
L_TAIL:
if(DP(ns)->constDictCaseMapNULL != NULL) {
kindex_t idx = knh_DictMap_index(DP(ns)->constDictCaseMapNULL, name);
if(idx != -1) return knh_DictMap_valueAt(DP(ns)->constDictCaseMapNULL, idx);
}
if(ns->parentNULL != NULL) {
ns = ns->par... | false | false | false | false | false | 0 |
r_is_ex_oper(const ref *rp)
{
return (r_has_attr(rp, a_executable) &&
(r_btype(rp) == t_operator || r_type(rp) == t_oparray));
} | false | false | false | false | false | 0 |
drawRadiusBox(QPainter *p)
{
p->save();
p->setWindow(0, 0, 800, 600);
p->setRenderHint(QPainter::Antialiasing, true);
p->setPen(QPen(Qt::black));
p->setBrush(QBrush(QColor(193, 193, 193, 127)));
p->drawRoundRect(10, 540, 160, 50, 10, 20);
QFont font("Arial", 16);
font.setUnderline(true)... | false | false | false | false | false | 0 |
list_ready_cb (GList *files,
GError *error,
gpointer user_data)
{
DialogData *data = user_data;
data->loading_list = FALSE;
if (data->cancelling) {
gth_file_list_cancel (GTH_FILE_LIST (data->file_list), cancel_done, data);
}
else if (error != NULL) {
_gtk_error_dialog_from_gerror_show (... | false | false | false | false | false | 0 |
ttm_pages_put(struct page *pages[], unsigned npages)
{
unsigned i;
if (set_pages_array_wb(pages, npages))
pr_err("Failed to set %d pages to wb!\n", npages);
for (i = 0; i < npages; ++i)
__free_page(pages[i]);
} | false | false | false | false | false | 0 |
nouveau_device_open(const char *busid, struct nouveau_device **pdev)
{
int ret = -ENODEV, fd = drmOpen("nouveau", busid);
if (fd >= 0) {
ret = nouveau_device_wrap(fd, 1, pdev);
if (ret)
drmClose(fd);
}
return ret;
} | false | false | false | false | false | 0 |
ConnectCallback(jack_port_id_t a, jack_port_id_t b, int connect)
{
jack_info("JackNetMaster::ConnectCallback a = %d b = %d connect = %d", a, b, connect);
if (connect) {
jack_connect(fClient, jack_port_name(jack_port_by_id(fClient, a)), "system:playback_1");
}
} | false | false | false | false | false | 0 |
do_features(const sensors_chip_name *chip,
const FeatureDescriptor *feature, int action)
{
char *label;
const char *formatted;
int i, alrm, beep, ret;
double val[MAX_DATA];
/* If only scanning, take a quick exit if alarm is off */
alrm = get_flag(chip, feature->alarmNumber);
if (alrm == -1)
return -1... | false | false | false | false | false | 0 |
resolveMIPS64Relocation(const SectionEntry &Section,
uint64_t Offset, uint64_t Value,
uint32_t Type, int64_t Addend,
uint64_t SymOffset,
SID... | false | false | false | false | false | 0 |
resolve_handler_create()
{
private_resolve_handler_t *this;
struct stat st;
INIT(this,
.public = {
.handler = {
.handle = _handle,
.release = _release,
.create_attribute_enumerator = _create_attribute_enumerator,
},
.destroy = _destroy,
},
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
.fil... | false | false | false | false | false | 0 |
sge_parse_execd(lList **ppcmdline, lList **ppreflist,
u_long32 *help)
{
stringT str;
lList *alp = NULL;
int usageshowed = 0;
DENTER(TOP_LAYER, "sge_parse_execd");
/* Loop over all options. Only valid options can be in the
ppcmdline list.
*/
while(lGetNumberOf... | false | false | false | false | false | 0 |
writeExpr(const Expr& array, const Expr& index, const Expr& newValue)
{
return Expr(WRITE, array, index, newValue);
} | false | false | false | false | false | 0 |
findCubesToMove (Move * c2m, const Player player,
const Player * owners, const int * values,
const int * maxValues)
{
int index, n;
int opponent = (player == One) ? Two : One;
int moves = 0;
int min = VeryHighValue;
bool beginner = (m... | false | false | false | false | false | 0 |
SetHMName(const std::string &name)
{
std::string::size_type idx=name.find(':');
if (idx != std::string::npos)
{
m_OriginAlternative = atoi (name.c_str () + idx + 1);
m_HM = name.substr (0, idx);
} else
m_HM = name;
} | false | false | false | false | false | 0 |
_nc_synchook(WINDOW *win)
/* hook to be called after each window change */
{
if (win->_immed)
wrefresh(win);
if (win->_sync)
wsyncup(win);
} | false | false | false | false | false | 0 |
get_voltageNS(byte ch, float* v) // get_voltage, without entering SLEEP mode
{
u16 iv;
byte res;
res = read_adcNS(ch, &iv);
if(res != 0) return res; // Error return
*v = m12[ch] * iv + c[ch];
return 0;
} | false | false | false | false | false | 0 |
is_git_directory(const char *suspect)
{
char path[PATH_MAX];
size_t len = strlen(suspect);
strcpy(path, suspect);
if (getenv(DB_ENVIRONMENT)) {
if (access(getenv(DB_ENVIRONMENT), X_OK))
return 0;
}
else {
strcpy(path + len, "/objects");
if (access(path, X_OK))
return 0;
}
strcpy(path + len, "/refs... | false | false | false | false | false | 0 |
insert_branch(new_branch, extract_first)
branch *new_branch;
boolean extract_first;
{
branch *curr, *prev;
long new_val, curr_val, prev_val;
if (extract_first) {
for (prev = 0, curr = branches; curr; prev = curr, curr = curr->next)
if (curr == new_branch) break;
if (!curr) panic("insert_branc... | false | false | false | false | false | 0 |
is_leaf_node_in_tnc(struct ubifs_info *c, union ubifs_key *key,
int lnum, int offs)
{
struct ubifs_zbranch *zbr;
struct ubifs_znode *znode, *zn;
int n, found, err, nn;
const int unique = !is_hash_key(c, key);
found = ubifs_lookup_level0(c, key, &znode, &n);
if (found < 0)
return found; /* Error code ... | false | false | false | false | false | 0 |
ganv_canvas_base_unmap(GtkWidget* widget)
{
GanvCanvasBase* canvas;
g_return_if_fail(GANV_IS_CANVAS_BASE(widget));
canvas = GANV_CANVAS_BASE(widget);
shutdown_transients(canvas);
/* Unmap items */
if (GANV_ITEM_GET_CLASS(canvas->root)->unmap) {
(*GANV_ITEM_GET_CLASS(canvas->root)->unmap)(canvas->root);
}
... | false | false | false | false | false | 0 |
get_memory_block_size(void)
{
unsigned long block_sz;
block_sz = memory_block_size_bytes();
/* Validate blk_sz is a power of 2 and not less than section size */
if ((block_sz & (block_sz - 1)) || (block_sz < MIN_MEMORY_BLOCK_SIZE)) {
WARN_ON(1);
block_sz = MIN_MEMORY_BLOCK_SIZE;
}
return block_sz;
} | false | false | false | false | false | 0 |
deactivate() {
omni_tracedmutex_lock sync(pd_lock);
pd_shutdown = 1;
wakeUp();
} | false | false | false | false | false | 0 |
server3_3_symlink (rpcsvc_request_t *req)
{
server_state_t *state = NULL;
call_frame_t *frame = NULL;
gfs3_symlink_req args = {{0,},};
int ret = -1;
int op_errno =... | false | false | false | false | false | 0 |
addExpansions(UChar32 start, UChar32 end) {
if(unreversedPrefix.isEmpty() && suffix == NULL) {
if(expansions != NULL) {
expansions->add(start, end);
}
} else {
addStrings(start, end, expansions);
}
} | false | false | false | false | false | 0 |
instantiate_object( Chuck_VM * vm, Chuck_VM_Shred * shred,
Chuck_Type * type )
{
t_CKUINT *& reg_sp = (t_CKUINT *&)shred->reg->sp;
// allocate the VM object
Chuck_Object * object = instantiate_and_initialize_object( type, shred );
if( !object ) goto error;
// push t... | false | false | false | false | false | 0 |
e_fwin_reload_all(void)
{
Eina_List *l, *ll, *lll;
E_Container *con;
E_Manager *man;
E_Fwin *fwin;
E_Zone *zone;
/* Reload/recreate zones cause of property changes */
EINA_LIST_FOREACH(fwins, l, fwin)
{
if (!fwin) continue; //safety
if (fwin->zone)
e_fwin_zone_shutd... | false | false | false | false | false | 0 |
spl_fixedarray_object_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */
{
spl_fixedarray_object *intern;
intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC);
if (intern->fptr_count) {
zval *rv;
zend_call_method_with_0_params(&object, intern->std.ce, &intern->fptr_count,... | false | false | false | false | false | 0 |
hdp_get_dcpsm_cb(uint16_t dcpsm, gpointer user_data, GError *err)
{
struct hdp_tmp_dc_data *hdp_conn = user_data;
struct hdp_channel *hdp_chann = hdp_conn->hdp_chann;
GError *gerr = NULL;
uint8_t mode;
if (err != NULL) {
hdp_conn->cb(hdp_chann->mdl, err, hdp_conn);
return;
}
if (hdp_chann->config == HDP_RE... | false | false | false | false | false | 0 |
gt_ggc_mx_tree_statement_list_node (void *x_p)
{
struct tree_statement_list_node * x = (struct tree_statement_list_node *)x_p;
struct tree_statement_list_node * xlimit = x;
while (ggc_test_and_set_mark (xlimit))
xlimit = ((*xlimit).next);
if (x != xlimit)
for (;;)
{
struct tree_statement_li... | false | false | false | true | false | 1 |
testensure_buffer_stack () \
{
int num_to_alloc;
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
num_to_alloc = 1;
(yy_buff... | false | false | false | false | false | 0 |
reporting_create_host_record(lList **answer_list,
const lListElem *host,
u_long32 report_time)
{
bool ret = true;
DENTER(TOP_LAYER, "reporting_create_host_record");
if (mconf_get_do_reporting() && host != NULL) {
dstring load_dstring = DSTRING_I... | false | false | false | false | false | 0 |
gnm_expr_new_funcall2 (GnmFunc *func,
GnmExpr const *arg0,
GnmExpr const *arg1)
{
GnmExprConstPtr *argv = g_new (GnmExprConstPtr, 2);
argv[0] = arg0;
argv[1] = arg1;
return gnm_expr_new_funcallv (func, 2, argv);
} | false | false | false | false | false | 0 |
getTypeByIDOrNull(unsigned ID) {
if (ID >= TypeList.size())
TypeList.resize(ID+1);
return TypeList[ID];
} | false | false | false | false | false | 0 |
gee_collection_remove_all_int_array (GeeCollection* coll, gint* arr, int arr_length1) {
gboolean result = FALSE;
gboolean changed = FALSE;
gint* _tmp0_ = NULL;
gint _tmp0__length1 = 0;
g_return_val_if_fail (coll != NULL, FALSE);
changed = FALSE;
_tmp0_ = arr;
_tmp0__length1 = arr_length1;
{
gint* el_collecti... | false | false | false | false | false | 0 |
paramvalues_to_string(option_t *opt, char **paramvalues)
{
int i;
param_t *param;
dstr_t *res = create_dstr();
char *data;
if (opt->param_count < 1) {
free (res);
return NULL;
}
if (opt->param_count == 1) {
param = opt->paramlist;
dstrcpyf(res, "Custom.%s", ... | false | false | false | false | false | 0 |
FlushMultifields(
void *theEnv)
{
struct multifield *theSegment, *nextPtr, *lastPtr = NULL;
unsigned long newSize;
theSegment = MultifieldData(theEnv)->ListOfMultifields;
while (theSegment != NULL)
{
nextPtr = theSegment->next;
if ((theSegment->depth > EvaluationData(theEnv)->CurrentEv... | false | false | false | false | false | 0 |
getTextureOption(bool &clamp)
{
m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd);
//If there is any more texture option
while (!isEndOfBuffer(m_DataIt, m_DataItEnd) && *m_DataIt == '-')
{
const char *pPtr( &(*m_DataIt) );
//skip option key and value
int skipToken = 1;
if (!ASSIMP_strincmp(pPtr,... | false | false | false | false | false | 0 |
OnOptions(wxCommandEvent& WXUNUSED(event)) {
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnOptions - Function Begin"));
m_pBackgroundPanel->SetDlgOpen(true);
// TODO: Create simple language selection dialog
CDlgOptions dlg(this);
dlg.ShowModal();
m_pBackgroundPanel->SetDlgOpen(false);
... | false | false | false | false | false | 0 |
reset_bonus_mode (int mode)
{
int i;
bonus_proba_sum = 0;
for (i = 0; i < 17; i++)
bonus_proba_sum =
bonus_proba[i] = bonus_density[mode][i] + bonus_proba_sum;
} | false | false | false | false | false | 0 |
create_memmapsdata (ProcmanApp *app)
{
GtkWidget *tree;
GtkListStore *model;
guint i;
const gchar * const titles[] = {
N_("Filename"),
// xgettext: virtual memory start
N_("VM Start"),
// xgettext: virtual memory end
N_("VM End"),
// xgettext: virtual mem... | false | false | false | false | false | 0 |
inner_block_has_hmdf(Block *head)
{
Block *bpt;
for (bpt = head; bpt != NULL; bpt = bpt->next) {
if (bpt->kind != SB) {
if (bpt->hmdf != NULL)
return TRUE;
} else {
Module_table *sb = sb_callee(bpt);
if (sb_has_hmdf(sb))
... | false | false | false | false | false | 0 |
fasta_print_alignment_default(struct alignment *algn, char *filename) {
struct seq_col *scol = algn->scol;
unsigned int slen = scol->length;
unsigned int j,s,proc, max;
struct seq* sq;
struct algn_pos **ap = algn->algn;
prepare_alignment(algn);
max = algn->max_pos;
struct algn_pos *ap1;
FILE *fp;
... | false | false | false | false | false | 0 |
finalize (GObject *obj)
{
AnjutaClassGenPlugin *cg_plugin;
cg_plugin = ANJUTA_PLUGIN_CLASS_GEN (obj);
g_free (cg_plugin->top_dir);
if(cg_plugin->window != NULL)
g_object_unref(G_OBJECT(cg_plugin->window));
if(cg_plugin->generator != NULL)
g_object_unref(G_OBJECT(cg_plugin->generator));
G_OBJECT_CLASS (paren... | false | false | false | false | false | 0 |
wlc_phy_get_chan_freq_range_nphy(struct brcms_phy *pi, uint channel)
{
int freq;
const struct chan_info_nphy_radio2057 *t0 = NULL;
const struct chan_info_nphy_radio205x *t1 = NULL;
const struct chan_info_nphy_radio2057_rev5 *t2 = NULL;
const struct chan_info_nphy_2055 *t3 = NULL;
if (channel == 0)
channel = CH... | false | false | false | false | false | 0 |
big_datfno(DBM *db)
{
STATIC_ASSERT(BIG_BLKSIZE == DBM_BBLKSIZ);
sdbm_big_check(db->big);
return db->big->fd;
} | false | false | false | false | false | 0 |
import_fifo_init(ImportJob *job)
{
ldbm_instance *inst = job->inst;
/* Work out how big the entry fifo can be */
if (inst->inst_cache.c_maxentries > 0)
job->fifo.size = inst->inst_cache.c_maxentries;
else
job->fifo.size = inst->inst_cache.c_maxsize / 1024; /* guess */
/* byte limit that... | false | false | false | false | false | 0 |
scrollfront(struct vc_data *vc, int lines)
{
if (!lines)
lines = vc->vc_rows / 2;
scrolldelta(lines);
} | false | false | false | false | false | 0 |
print_var(void)
{
efi_variable_t var;
int fd, r, i;
check_proc_efi(0);
fd = open(elilo_altvar, O_RDONLY);
if (fd == -1) {
fatal_error("variable not defined\n");
}
memset(&var, 0, sizeof(var));
r = read(fd, &var, sizeof(var));
if (r != sizeof(var)) {
fatal_error("Variable %s defined but invalid content... | false | true | false | false | true | 1 |
gwh_settings_widget_boolean_sync (GwhSettings *self,
GParamSpec *pspec,
const GValue *old_value,
GtkWidget *widget)
{
gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
if (g_value_g... | false | false | false | false | false | 0 |
smk_copy_relabel(struct list_head *nhead, struct list_head *ohead,
gfp_t gfp)
{
struct smack_known_list_elem *nklep;
struct smack_known_list_elem *oklep;
INIT_LIST_HEAD(nhead);
list_for_each_entry(oklep, ohead, list) {
nklep = kzalloc(sizeof(struct smack_known_list_elem), gfp);
if (nklep == NULL) {
smk... | false | false | false | false | false | 0 |
glom_show_dialog_invalid_data(Field::glom_field_type glom_type)
{
Dialog_InvalidData* dialog = 0;
Utils::get_glade_widget_derived_with_warning(dialog);
if(!dialog) //Unlikely and it already warns on stderr.
return false;
dialog->set_example_data(glom_type);
//dialog->set_transient_for(*this);
const... | false | false | false | false | false | 0 |
ext2_set_de_type(ext2_dirent *de, struct inode *inode)
{
umode_t mode = inode->i_mode;
if (EXT2_HAS_INCOMPAT_FEATURE(inode->i_sb, EXT2_FEATURE_INCOMPAT_FILETYPE))
de->file_type = ext2_type_by_mode[(mode & S_IFMT)>>S_SHIFT];
else
de->file_type = 0;
} | false | false | false | false | false | 0 |
BgWriterShmemInit(void)
{
bool found;
BgWriterShmem = (BgWriterShmemStruct *)
ShmemInitStruct("Background Writer Data",
BgWriterShmemSize(),
&found);
if (BgWriterShmem == NULL)
ereport(FATAL,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("not enough shared memory for background writer")));
if (... | false | false | false | false | false | 0 |
asd_update_port_links(struct asd_ha_struct *asd_ha, struct asd_phy *phy)
{
const u8 phy_mask = (u8) phy->asd_port->phy_mask;
u8 phy_is_up;
u8 mask;
int i, err;
unsigned long flags;
spin_lock_irqsave(&asd_ha->hw_prof.ddb_lock, flags);
for_each_phy(phy_mask, mask, i)
asd_ddbsite_write_byte(asd_ha, 0,
... | false | false | false | false | false | 0 |
send_converted_effect(struct nrpn_conv_table *table, int num_tables,
struct snd_emux_port *port,
struct snd_midi_channel *chan,
int type, int val, int mode)
{
int i, cval;
for (i = 0; i < num_tables; i++) {
if (table[i].control == type) {
cval = table[i].convert(val);
snd_emux_send_effect(port,... | false | false | false | false | false | 0 |
runTestWithDriver(E_DRIVER_TYPE driverType)
{
IrrlichtDevice *device = createDevice( driverType, dimension2d<u32>(160, 120), 32);
if (!device)
return true; // Treat a failure to create a driver as benign; this saves a lot of #ifdefs
IVideoDriver* driver = device->getVideoDriver();
bool result = true;
driver->... | false | false | false | false | false | 0 |
test_invalid_modules (Test *test, gconstpointer unused)
{
GckModule *invalid;
GError *error = NULL;
/* Shouldn't be able to load modules */
invalid = gck_module_initialize ("blah-blah-non-existant", NULL, &error);
g_assert_error (error, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM);
g_assert (invalid == NULL);
g_cle... | false | false | false | false | false | 0 |
detect_xenix(struct sysv_sb_info *sbi, struct buffer_head *bh)
{
struct xenix_super_block *sbd = (struct xenix_super_block *)bh->b_data;
if (*(__le32 *)&sbd->s_magic == cpu_to_le32(0x2b5544))
sbi->s_bytesex = BYTESEX_LE;
else if (*(__be32 *)&sbd->s_magic == cpu_to_be32(0x2b5544))
sbi->s_bytesex = BYTESEX_BE;
el... | false | false | false | false | false | 0 |
dib7000p_autosearch_start(struct dvb_frontend *demod)
{
struct dtv_frontend_properties *ch = &demod->dtv_property_cache;
struct dib7000p_state *state = demod->demodulator_priv;
struct dtv_frontend_properties schan;
u32 value, factor;
u32 internal = dib7000p_get_internal_freq(state);
schan = *ch;
schan.modulatio... | false | false | false | false | false | 0 |
tfrc_is_data_limited_received_feedback (TfrcIsDataLimited *idl, guint64 now,
guint64 last_packet_timestamp, guint rtt)
{
gboolean ret;
guint64 t_old;
idl->t_new = last_packet_timestamp;
t_old = idl->t_new - rtt;
idl->t_next = now;
if ((t_old < idl->not_limited_1 && idl->not_limited_1 <= idl->t_new) ||
... | false | false | false | false | false | 0 |
interrupt()
{
lock();
// Don't try to interrupt the last item removed from the queue if
// it's not currently being played.
//printf("interrupt: myPlayingSomething=%d\n", myPlayingSomething);
if(myPlayingSomething)
myLastItem.interrupt();
myPlayingSomething = false;
unlock();
} | false | false | false | false | false | 0 |
snd_hda_add_new_path(struct hda_codec *codec, hda_nid_t from_nid,
hda_nid_t to_nid, int anchor_nid)
{
struct hda_gen_spec *spec = codec->spec;
struct nid_path *path;
if (from_nid && to_nid && !is_reachable_path(codec, from_nid, to_nid))
return NULL;
/* check whether the path has been already added */
pa... | false | false | false | false | false | 0 |
VasyMultiWaitDestroyVpnTrans( VpnFigure, VpnProc, BeginTrans )
vpnfig_list *VpnFigure;
vpnproc_list *VpnProc;
vpntrans_list *BeginTrans;
{
vasywaitinfo *WaitInfo;
vpnplace_list *BeginPlace;
vpntrans_list *DefTrans;
vpntrans_list *AsgTrans;
vpnarc *VpnArc;
chain_list *ScanChain;
if (... | false | false | false | false | false | 0 |
daa_a(void)
{
if ((R.A & 0x0f) > 0x09 || (R.PSW & A_FLAG))
R.A += 0x06;
if ((R.A & 0xf0) > 0x90 || (R.PSW & C_FLAG))
{
R.A += 0x60;
SET(C_FLAG);
} else CLR(C_FLAG);
} | false | false | false | false | false | 0 |
dec_rawsigpass(jpc_dec_t *dec, jpc_bitstream_t *in, int bitpos, int vcausalflag,
jas_matrix_t *flags, jas_matrix_t *data)
{
int i;
int j;
int k;
int one;
int half;
int oneplushalf;
int vscanlen;
int width;
int height;
jpc_fix_t *fp;
int frowstep;
int fstripestep;
jpc_fix_t *fstripestart;
jpc_fix_t *fvsc... | false | false | false | false | false | 0 |
create_passcontrol( Operation *op, int exptime, int grace, LDAPPasswordPolicyError err )
{
BerElementBuffer berbuf, bb2;
BerElement *ber = (BerElement *) &berbuf, *b2 = (BerElement *) &bb2;
LDAPControl c = { 0 }, *cp;
struct berval bv;
BER_BVZERO( &c.ldctl_value );
ber_init2( ber, NULL, LBER_USE_DER );
ber_pri... | false | false | false | false | false | 0 |
y1 (double x)
{
if (__builtin_expect (islessequal (x, 0.0) || isgreater (x, X_TLOSS), 0)
&& _LIB_VERSION != _IEEE_)
{
if (x < 0.0)
{
/* d = zero/(x-x) */
feraiseexcept (FE_INVALID);
return __kernel_standard (x, x, 11);
}
else if (x == 0.0)
{
/* d = -one/(x-x) */
feraiseexcept (... | false | false | false | false | false | 0 |
parse_select_type_param(char *select_type_parameters, uint16_t *param)
{
int rc = SLURM_SUCCESS;
char *str_parameters, *st_str = NULL;
int param_cnt = 0;
*param = 0;
st_str = xstrdup(select_type_parameters);
str_parameters = strtok(st_str,",");
while (str_parameters) {
if (!strcasecmp(str_parameters, "CR_Sock... | false | false | false | false | false | 0 |
hud_check_reticle_list()
{
reticle_list *rl, *temp;
// cull dying objects from reticle list
rl = GET_FIRST(&Reticle_cur_list);
while( rl !=END_OF_LIST(&Reticle_cur_list) ) {
temp = GET_NEXT(rl);
if ( rl->objp->flags & OF_SHOULD_BE_DEAD ) {
list_remove( &Reticle_cur_list, rl );
rl->flags = 0;
}
rl = t... | false | false | false | false | false | 0 |
ReparseModifiedFiles()
{
if ( !Done() )
{
wxString msg(_T("Parser::ReparseModifiedFiles : The Parser is not done."));
msg += NotDoneReason();
CCLogger::Get()->DebugLog(msg);
TRACE(_T("Parser::ReparseModifiedFiles(): Starting m_ReparseTimer."));
m_ReparseTimer.Start(Parse... | false | false | false | false | false | 0 |
mgt_SHM_Size_Adjust(void)
{
AN(heritage.vsm);
if (mgt_vsm_l == mgt_shm_size())
return;
mgt_SHM_Destroy(0);
mgt_SHM_Create();
} | false | false | false | false | false | 0 |
HasSyncSource() const
{
ProcessingsMap::const_iterator it;
for(it=BeginProcessings(); it!=EndProcessings(); it++)
if(it->second->IsSyncSource())
return true;
return false;
} | false | false | false | false | false | 0 |
P_FireWeapon(player_t * player)
{
statenum_t attackState;
if (!P_CheckMana(player))
{
return;
}
P_SetMobjState(player->mo, PStateAttack[player->class]); // S_PLAY_ATK1);
if (player->class == PCLASS_FIGHTER && player->readyweapon == WP_SECOND
&& player->mana[MANA_1] > 0)
{... | false | false | false | false | false | 0 |
qsort_FDecreasing(const void *xp1, const void *xp2)
{
float x1 = * (float *) xp1;
float x2 = * (float *) xp2;
if (x1 > x2) return -1;
if (x1 < x2) return 1;
return 0;
} | false | false | false | false | false | 0 |
extract_retry_after(struct download *d, const header_t *header)
{
const char *buf;
uint32 delay;
int error;
download_check(d);
/*
* A Retry-After header is either a full HTTP date, such as
* "Fri, 31 Dec 1999 23:59:59 GMT", or an amount of seconds.
*/
buf = header_get(header, "Retry-After");
if (!buf)
... | false | false | false | false | false | 0 |
calc_minmax(void)
{
int i;
unsigned char * samp_uc;
short int * samp_s16le;
samp_s16le = (short int *) samp;
samp_uc = (unsigned char *) samp;
if(i_sampfmt == U8){
i_minsamp=255;
i_maxsamp=0;
for(i=0;i<sampnr;i++){
if ( samp_uc[i-1] > i_maxsamp ) ... | false | false | false | false | true | 1 |
nemo_connect_server_dialog_display_location_async (NemoConnectServerDialog *self,
GFile *location,
GAsyncReadyCallback callback,
gpointer user_data)
{
GError *error;
GdkAppLaunchContext *launch_context;
gchar *uri;
display_location_res = g_simple_async_result_new (G_OBJECT (s... | false | false | false | false | false | 0 |
xml_to_sha1_rule(xnode_t *xn, void *data)
{
const struct sha1 *sha1 = NULL;
const char *filename = NULL;
const char *buf;
rule_t *rule;
filter_t *target, *filter = data;
guint16 flags;
int error;
g_assert(xn != NULL);
g_assert(xnode_element_name(xn) != NULL);
g_assert(filter != NUL... | false | false | false | false | false | 0 |
matrix_remove_dimensions(pk_internal_t* pk,
bool destructive,
matrix_t* mat,
ap_dimchange_t* dimchange)
{
matrix_t* nmat;
size_t i,dimsup;
dimsup = dimchange->intdim + dimchange->realdim;
nmat =
destructive ?
mat :
matrix_alloc(mat->nbrows, mat->nbcolumns-dimsup, false);
f... | false | false | false | false | false | 0 |
e_source_mail_identity_set_name (ESourceMailIdentity *extension,
const gchar *name)
{
g_return_if_fail (E_IS_SOURCE_MAIL_IDENTITY (extension));
g_mutex_lock (&extension->priv->property_lock);
if (extension->priv->name != NULL &&
g_strcmp0 (extension->priv->name, name) == 0) {
... | false | false | false | false | false | 0 |
trpgTestArchive(trpgr_Archive &archive)
{
int numLod;
trpg2iPoint tileSize;
trpgSceneGraphParser parse;
trpgReadNode *scene;
trpgSceneGraphParser::GroupMap gmap;
if (!archive.isValid()) return false;
const trpgHeader *head = archive.GetHeader();
head->GetNumLods(numLod);
// Iterat... | false | false | false | false | false | 0 |
clean_bookeeper(event_bookeeper *eb, seq* sequencer)
{
event_list *el = eb->last_events;
while(el->length != 0)
{
seq_delete_event(sequencer,eb->step,el->events[0]);
free(el->events[0]);
event_list_remove(el,el->events[0]);
}
} | false | false | false | false | true | 1 |
rw_interrupt(void)
{
int eoc;
int ssize;
int heads;
int nr_sectors;
if (R_HEAD >= 2) {
/* some Toshiba floppy controllers occasionnally seem to
* return bogus interrupts after read/write operations, which
* can be recognized by a bad head number (>= 2) */
return;
}
if (!DRS->first_read_date)
DRS->f... | false | false | false | false | false | 0 |
property(const QString &key) const
{
if(!d->loaded)
{
kDebug(11000) << "No arena file has been loaded. ArenaSettings::load() or ArenaSettings::loadDefault() must be called.";
return QString();
}
KConfig arenaConfig(path(), KConfig::SimpleConfig);
KConfigGroup group = arenaConfig.grou... | 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.