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 |
|---|---|---|---|---|---|---|
_gss_spnego_release_name
(OM_uint32 * minor_status,
gss_name_t * input_name
)
{
*minor_status = 0;
if (*input_name != GSS_C_NO_NAME) {
OM_uint32 junk;
spnego_name name = (spnego_name)*input_name;
_gss_free_oid(&junk, &name->type);
gss_release_buffer(&junk, &name->value);
... | false | false | false | false | false | 0 |
mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port)
{
if (mlx4_is_mfunc(dev))
return mlx4_PROMISC(dev, qpn, MLX4_MC_STEER, 0, port);
return remove_promisc_qp(dev, port, MLX4_MC_STEER, qpn);
} | false | false | false | false | false | 0 |
git_config_write_cb (GiggleGit *git,
GiggleJob *job,
GError *error,
gpointer user_data)
{
GiggleGitConfigTask *task = user_data;
GiggleGitConfigPriv *priv = GET_PRIV (task->config);
gboolean success = !error;
if (!success)
task->success = FALSE;
g_object_unref (priv->curre... | false | false | false | false | false | 0 |
channels_close()
{
write_channels();
free_udef(udef);
if (lastdeletedmask)
nfree(lastdeletedmask);
rem_builtins(H_chon, my_chon);
rem_builtins(H_dcc, C_dcc_irc);
rem_tcl_commands(channels_cmds);
rem_tcl_strings(my_tcl_strings);
rem_tcl_ints(my_tcl_ints);
rem_tcl_coups(mychan_tcl_coups);
del_hook... | false | false | false | false | false | 0 |
get_symbol_from_map(Elf_Ehdr *hdr, FILE *f, char *name,
struct sym *s)
{
char l[LINE_SIZE];
char *w, *p, *n;
s->size = 0;
s->address = 0;
s->offset = 0;
if (fseek(f, 0, SEEK_SET) != 0) {
perror("File seek failed");
exit(EXIT_FAILURE);
}
while (fgets(l, LINE_SIZE, f)) {
p = strchr(l, '\n');
if (!p) ... | false | false | false | false | true | 1 |
compute_exp_strategy(uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS],
uint8_t exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2],
int ch, int is_lfe)
{
int i, j;
int exp_diff;
/* estimate if the exponent variation & decide if they should be
reus... | false | false | false | false | false | 0 |
gt_splicedseq_pos_is_border(const Splicedseq *ss, unsigned long pos)
{
gt_assert(ss &&
gt_str_length(ss->splicedseq) == gt_array_size(ss->positionmapping));
gt_assert(pos < gt_str_length(ss->splicedseq)); /* legal position */
if (ss->forward && pos + 1 < gt_array_size(ss->positionmapping) &&
*(unsi... | false | false | false | false | false | 0 |
save_int(Picklerobject *self, PyObject *args)
{
char c_str[32];
long l = PyInt_AS_LONG((PyIntObject *)args);
Py_ssize_t len = 0;
if (!self->bin
#if SIZEOF_LONG > 4
|| l > 0x7fffffffL
|| l < -0x80000000L
#endif
) {
/* Text-mode pickle, or long too big to fit in the 4-byt... | true | true | false | false | false | 1 |
fitstable_write_row(fitstable_t* table, ...) {
int ret;
va_list ap;
if (!table->table)
fitstable_create_table(table);
va_start(ap, table);
ret = write_one(table, NULL, TRUE, &ap);
va_end(ap);
return ret;
} | false | false | false | false | false | 0 |
ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
u32 device_type, u32 *data)
{
u32 gssr = IXGBE_GSSR_PHY1_SM | IXGBE_GSSR_PHY0_SM;
u32 command, error;
s32 ret;
ret = hw->mac.ops.acquire_swfw_sync(hw, gssr);
if (ret)
return ret;
ret = ixgbe_iosf_wait(hw, NULL);
if (ret)
goto out;
... | false | false | false | false | false | 0 |
CalcLargestMarkerHeight() {
largestMarkerHeight = 0;
for (int m = 0; m <= MARKER_MAX; ++m) {
switch (markers[m].markType) {
case SC_MARK_PIXMAP:
if (markers[m].pxpm->GetHeight() > largestMarkerHeight)
largestMarkerHeight = markers[m].pxpm->GetHeight();
break;
case SC_MARK_RGBAIMAGE:
if (markers[m].... | false | false | false | false | false | 0 |
volume_id_get_uuid(struct volume_id *id, const char **uuid)
{
if (id == NULL)
return 0;
if (uuid == NULL)
return 0;
if (id->usage_id == VOLUME_ID_UNUSED)
return 0;
*uuid = id->uuid;
return 1;
} | false | false | false | false | false | 0 |
ads1015_reg_to_mv(struct i2c_client *client, unsigned int channel,
s16 reg)
{
struct ads1015_data *data = i2c_get_clientdata(client);
unsigned int pga = data->channel_data[channel].pga;
int fullscale = fullscale_table[pga];
const int mask = data->id == ads1115 ? 0x7fff : 0x7ff0;
return DIV_ROUND_CLOSEST(r... | false | false | false | false | false | 0 |
glp_cpx_basis(glp_prob *lp)
{ if (lp->m == 0 || lp->n == 0)
glp_std_basis(lp);
else
cpx_basis(lp);
return;
} | false | false | false | false | false | 0 |
valueForProgress(QScriptContext *ctx, QScriptEngine *eng)
{
DECLARE_SELF(QEasingCurve, valueForProgress);
if (ctx->argumentCount() < 1 || !ctx->argument(0).isNumber()) {
return eng->undefinedValue();
}
return self->valueForProgress(ctx->argument(0).toNumber());
} | false | false | false | false | false | 0 |
OnNull(const Mark& mark, anchor_t anchor)
{
Node& node = Push(anchor);
node.Init(NodeType::Null, mark, "");
Pop();
} | false | false | false | false | false | 0 |
dsp3780I_WriteDStore(unsigned short usDspBaseIO, void __user *pvBuffer,
unsigned uCount, unsigned long ulDSPAddr)
{
unsigned long flags;
unsigned short __user *pusBuffer = pvBuffer;
PRINTK_5(TRACE_3780I,
"3780i::dsp3780D_WriteDStore entry usDspBaseIO %x, pusBuffer %p, uCount %x, ulDSPAdd... | false | false | false | false | false | 0 |
gwy_recent_file_thumbnail_name(const gchar *uri,
const gchar *sizename,
ThumbnailSize size)
{
static const gchar *hex2digit = "0123456789abcdef";
guchar md5sum[16];
gchar buffer[37], *p;
gsize i;
gwy_md5_get_digest(uri, -1, md5sum);
... | false | false | false | false | false | 0 |
fileio_puts(const fn_call& fn)
{
// GNASH_REPORT_FUNCTION;
string str = fn.arg(0).to_string();
return as_value(::puts(str.c_str()));
} | false | false | false | false | false | 0 |
check_data (void)
{
static const struct {
int base;
const char *f;
long want;
} data[] = {
{ 10, "0", 0L },
{ 10, "1", 1L },
{ 10, "-1", -1L },
{ 10, "2", 2L },
{ 10, "-2", -2L },
{ 10, "12345", 12345L },
{ 10, "-12345", -12345L },
... | false | false | false | false | false | 0 |
dotrans(char *name)
{
static char new[MaxPathLen];
char *cp1, *cp2 = new;
int i, ostop, found;
for (ostop = 0; *(ntout + ostop) && ostop < 16; ostop++)
continue;
for (cp1 = name; *cp1; cp1++) {
found = 0;
for (i = 0; *(ntin + i) && i < 16; i++) {
if (*cp1 == *(ntin + i)) {
found++;
if (i < ostop)... | false | false | false | false | false | 0 |
clear_diff_vsge(list old, list new, virtual_server_t * old_vs)
{
virtual_server_group_entry_t *vsge;
element e;
for (e = LIST_HEAD(old); e; ELEMENT_NEXT(e)) {
vsge = ELEMENT_DATA(e);
if (!vsge_exist(vsge, new)) {
log_message(LOG_INFO, "VS [[%s]:%d:%d:%d] in group %s no longer exist"
, inet_sockaddr... | false | false | false | false | false | 0 |
tuplerepeat(PyTupleObject *a, Py_ssize_t n)
{
Py_ssize_t i, j;
Py_ssize_t size;
PyTupleObject *np;
PyObject **p, **items;
if (n < 0)
n = 0;
if (Py_SIZE(a) == 0 || n == 1) {
if (PyTuple_CheckExact(a)) {
/* Since tuples are immutable, we can return a shared
... | false | false | false | false | true | 1 |
isp1760_udc_init(struct isp1760_udc *udc)
{
u16 scratch;
u32 chipid;
/*
* Check that the controller is present by writing to the scratch
* register, modifying the bus pattern by reading from the chip ID
* register, and reading the scratch register value back. The chip ID
* and scratch register contents must... | false | false | false | false | false | 0 |
write_xml_variables (FILE *f, GGobiData *d, ggobid *gg, XmlWriteInfo *xmlWriteInfo)
{
gint j;
if (gg->save.column_ind == ALLCOLS) {
fprintf(f,"<variables count=\"%d\">\n", d->ncols);
for(j = 0; j < d->ncols; j++) {
write_xml_variable (f, d, gg, j, xmlWriteInfo);
fprintf(f,"\n");
}
} else... | false | false | false | false | false | 0 |
GetSystemList(DataStructures::List<SystemAddress> &addresses, DataStructures::List<RakNetGUID> &guids) const
{
addresses.Clear(false, _FILE_AND_LINE_);
guids.Clear(false, _FILE_AND_LINE_);
if ( remoteSystemList == 0 || endThreads == true )
return;
unsigned int i;
for (i=0; i < activeSystemListSize; i+... | false | false | false | false | false | 0 |
hfs_bnode_unlink(struct hfs_bnode *node)
{
struct hfs_btree *tree;
struct hfs_bnode *tmp;
__be32 cnid;
tree = node->tree;
if (node->prev) {
tmp = hfs_bnode_find(tree, node->prev);
if (IS_ERR(tmp))
return;
tmp->next = node->next;
cnid = cpu_to_be32(tmp->next);
hfs_bnode_write(tmp, &cnid, offsetof(stru... | false | false | false | false | false | 0 |
list_add_beginning(list_t *list, void *data) {
list_t new_;
if (!list) {
errno = EFAULT;
return NULL;
}
new_ = xmalloc(sizeof(struct list));
new_->next = *list;
*list = new_;
new_->data = data;
return new_->data;
} | false | false | false | false | false | 0 |
show_slave_running(THD *thd, SHOW_VAR *var, char *buff)
{
var->type= SHOW_MY_BOOL;
mysql_mutex_lock(&LOCK_active_mi);
var->value= buff;
*((my_bool *)buff)= (my_bool) (active_mi &&
active_mi->slave_running == MYSQL_SLAVE_RUN_CONNECT &&
active_mi-... | false | false | false | false | false | 0 |
ldns_rdf_print(FILE *output, const ldns_rdf *rdf)
{
char *str = ldns_rdf2str(rdf);
if (str) {
fprintf(output, "%s", str);
} else {
fprintf(output, ";Unable to convert rdf to string\n");
}
LDNS_FREE(str);
} | false | false | false | false | false | 0 |
initMenuBar()
{
QMenu * menuFile = menuBar()->addMenu( tr( "&File" ) );
QMenu * menuGame = menuBar()->addMenu( tr( "&Game" ) );
menuFile->addAction( _actions[ ACTION_LOADSCENARIO ] );
menuFile->addAction( _actions[ ACTION_LOADCAMPAIGN ] );
menuFile->insertSeparator(_actions[ ACTION_LOADCAMPAIGN ]);
menuFile->add... | false | false | false | false | false | 0 |
segsumdown3(first,second,fslength)
unsigned first, second, fslength;
{
int g1, g2, g3, g4; /*indices to store gene numbers*/
int f1, f2, s1, s2; /*indices to store haplotype numbers*/
int index; /*counter for combined isozygote equivalence class,
will range from 0 to fslength-1*/
int index2; /*u... | false | false | false | false | false | 0 |
qname_to_shortname (const gchar *qname)
{
gchar **pieces;
gchar *name = NULL;
gint i;
for (i = 0; NAMESPACES[i].namespace != NULL; i++) {
if (g_str_has_prefix (qname, NAMESPACES[i].uri)) {
pieces = split_qname (qname, NULL);
name = g_strdup_printf ("%s:%s",
NAMESPACES[i].nam... | false | false | false | false | false | 0 |
em28xx_ctrl_notify(struct v4l2_ctrl *ctrl, void *priv)
{
struct em28xx *dev = priv;
/*
* In the case of non-AC97 volume controls, we still need
* to do some setups at em28xx, in order to mute/unmute
* and to adjust audio volume. However, the value ranges
* should be checked by the corresponding V4L subdriver... | false | false | false | false | false | 0 |
alloc_buffers(
unsigned MaxB3Connection,
unsigned MaxB3Blks,
unsigned MaxSizeB3)
{
struct applinfo *ap;
unsigned nbufs = 2 + MaxB3Connection * (MaxB3Blks + 1);
size_t recvbuffersize = 128 + MaxSizeB3;
unsigned i;
size_t size;
if (recvbuffersize < 2048)
recvbuffersize = 2048;
size = sizeof(struct applinfo)... | false | false | false | false | false | 0 |
ParseInputFile(const std::string &Filename,
LLVMContext& Ctxt) {
SMDiagnostic Err;
Module *Result = ParseIRFile(Filename, Err, Ctxt);
if (!Result)
Err.print("bugpoint", errs());
// If we don't have an override triple, use the first one to configure
// bugpoint, or use the hos... | false | false | false | false | false | 0 |
jacobian_double(struct jacobian_point *p, const struct domain_params *dp)
{
if (gcry_mpi_cmp_ui(p->z, 0)) {
if (gcry_mpi_cmp_ui(p->y, 0)) {
gcry_mpi_t t1, t2;
t1 = gcry_mpi_snew(0);
t2 = gcry_mpi_snew(0);
gcry_mpi_mulm(t1, p->x, p->x, dp->m);
gcry_mpi_addm(t2, t1, t1, dp->m);
g... | false | false | false | false | false | 0 |
Plink_new(){
struct plink *newlink;
if( plink_freelist==0 ){
int i;
int amt = 100;
plink_freelist = (struct plink *)calloc( amt, sizeof(struct plink) );
if( plink_freelist==0 ){
fprintf(stderr,
"Unable to allocate memory for a new follow-set propagation link.\n");
exit(1);
}
... | false | false | false | false | false | 0 |
Run(int argc, char* argv[]) {
// parse command line arguments
Options::Parse(argc, argv, 1);
if(!BamSortCriteria::isTagValid(m_settings->SortCriteria)){
cerr << "bamtools sort ERROR: The tag "<<m_settings->SortCriteria<<" is not valid...Aborting"<<endl;
return 1;
}
// run inter... | false | false | false | false | false | 0 |
handle_menu_signals (GOOptionMenu *option_menu, gboolean connect)
{
GList *children = gtk_container_get_children
(GTK_CONTAINER (option_menu->menu));
while (children) {
GtkWidget *child = children->data;
children = g_list_remove (children, child);
if (GTK_IS_MENU_ITEM (child)) {
GtkWidget *sub =
gtk_... | false | false | false | false | false | 0 |
_I_J(Class *class, MethodBlock *mb, uintptr_t *ostack) {
if(!initJNILrefs())
return NULL;
*(int64_t*)ostack = (*(int64_t (*)(void*, void*, uintptr_t))mb->code) (
&jni_env,
(void*)ostack[0],
*(uintptr_t *)&ostack[1]);
return ostack + 2;
} | false | false | false | false | false | 0 |
clear() {
unsigned int i,n;
n = ads.size();
for(i=0;i<n;i++)
delete(ads[i]);
ads.clear();
boxid = -1;
// contentUpdated();
rehover();
repaint();
} | false | false | false | false | false | 0 |
find_missing_files (GList *pre, GList *post)
{
GHashTable *hash;
GList *ret = NULL;
GList *node;
hash = g_hash_table_new (g_file_hash, (GEqualFunc) g_file_equal);
node = pre;
while (node)
{
g_hash_table_insert (hash, node->data, node->data);
node = g_list_next (node);
}
node = post;
while (node)
{
if... | false | false | false | false | false | 0 |
erath2_chunk_sieve_small(char* chunk, bucket_list* list, uint32_t maximum)
{
llong chunk_size = list->chunk_size;
uint32_t p = 0;
for (presieved_prime* pp = list->small.begin; (p = pp->p) < maximum; ++pp)
{
llong i = pp->offset;
for (; i < chunk_size; i += p)
{
bitse... | false | false | false | false | false | 0 |
spiftool_split(const spif_charptr_t delim, const spif_charptr_t str)
{
spif_charptr_t *slist;
register spif_charptr_t pstr;
register spif_charptr_t pdest;
char quote = 0;
unsigned short cnt = 0;
unsigned long len;
REQUIRE_RVAL(str != NULL, (spif_charptr_t *) NULL);
if ((slist = (spif_c... | false | true | false | false | true | 1 |
_pcomm_add_input_fd( list_t *list, int fd, int check_only,
pcomm_callback_ready ready_callback,
pcomm_callback_io io_callback,
pcomm_callback_ready close_callback )
{
pcomm_fd_t *fd_context = NULL;
pcomm_resul... | false | false | false | false | false | 0 |
os_set_fdlimit(unsigned int max_descriptors)
{
#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_FD_MAX)
struct rlimit limit;
if (!getrlimit(RLIMIT_FD_MAX, &limit)) {
if (limit.rlim_max < max_descriptors)
return limit.rlim_max;
limit.rlim_cur = limit.rlim_max; /* make soft limit the max */
return ... | false | false | false | false | false | 0 |
ipvlan_port_create(struct net_device *dev)
{
struct ipvl_port *port;
int err, idx;
if (dev->type != ARPHRD_ETHER || dev->flags & IFF_LOOPBACK) {
netdev_err(dev, "Master is either lo or non-ether device\n");
return -EINVAL;
}
if (netif_is_macvlan_port(dev)) {
netdev_err(dev, "Master is a macvlan port.\n");
... | false | false | false | false | false | 0 |
break_feature_node_check(const ParseNode *node, G_GNUC_UNUSED gpointer gdata)
{
if (!strcmp((const char *) node->value, "breakpoint-notifications"))
break_async = TRUE;
} | false | false | false | false | false | 0 |
tree(void)
{
set_color(treescrn, COLOR_GREEN);
mvwaddch(treescrn, 1, 11, (chtype) '/');
mvwaddch(treescrn, 2, 11, (chtype) '/');
mvwaddch(treescrn, 3, 10, (chtype) '/');
mvwaddch(treescrn, 4, 9, (chtype) '/');
mvwaddch(treescrn, 5, 9, (chtype) '/');
mvwaddch(treescrn, 6, 8, (chtype) '/');
... | false | false | false | false | false | 0 |
IsAcceptedKey(wxKeyEvent& event)
{
if ( wxSheetCellEditorRefData::IsAcceptedKey(event) )
{
int keycode = event.GetKeyCode();
switch ( keycode )
{
case WXK_NUMPAD0:
case WXK_NUMPAD1:
case WXK_NUMPAD2:
case WXK_NUMPAD3:
case WXK_N... | false | false | false | false | false | 0 |
m92_screenrefresh(struct mame_bitmap *bitmap,const struct rectangle *cliprect)
{
fillbitmap(priority_bitmap,0,cliprect);
if (pf3_enable) {
tilemap_draw(bitmap,cliprect,pf3_wide_layer,TILEMAP_BACK,0);
tilemap_draw(bitmap,cliprect,pf3_layer,TILEMAP_BACK,0);
}
else
fillbitmap(bitmap,Machine->pens[0],cl... | false | false | false | false | false | 0 |
ql_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
{
struct ql_adapter *qdev = netdev_priv(ndev);
unsigned short ssys_dev = qdev->pdev->subsystem_device;
/* WOL is only supported for mezz card. */
if (ssys_dev == QLGE_MEZZ_SSYS_ID_068 ||
ssys_dev == QLGE_MEZZ_SSYS_ID_180) {
wol->supported = WAKE... | false | false | false | false | false | 0 |
run_on(container_node& n) {
if (n.accept(*this, true)) {
for (node_riterator N, I = n.rbegin(), E = n.rend(); I != E; I = N) {
N = I;
++N;
if (I->is_container()) {
container_node *c = static_cast<container_node*>(*I);
run_on(*c);
} else {
I->accept(*this, true);
I->accept(*this, false);... | false | false | false | false | false | 0 |
adapter_create_device(DBusConnection *conn,
struct btd_adapter *adapter,
const char *address,
uint8_t bdaddr_type)
{
struct btd_device *device;
const char *path;
DBG("%s", address);
device = device_create(conn, adapter, address, bdaddr_type);
if (!device)
return NULL;
device_set_temporary(d... | false | false | false | false | false | 0 |
Scm_StringPosition(ScmString *str, int offset)
{
return Scm_StringBodyPosition(SCM_STRING_BODY(str), offset);
} | false | false | false | false | false | 0 |
isns_socket_get_local_addr(const isns_socket_t *sock,
struct sockaddr_storage *addr)
{
socklen_t alen;
if (sock->is_desc < 0)
return 0;
if (getsockname(sock->is_desc,
(struct sockaddr *) addr, &alen) < 0) {
isns_error("getsockname: %m\n");
return 0;
}
return 1;
} | false | false | false | false | false | 0 |
ov965x_write(struct i2c_client *client, u8 addr, u8 val)
{
u8 buf[2] = { addr, val };
int ret = i2c_master_send(client, buf, 2);
v4l2_dbg(2, debug, client, "%s: 0x%02x @ 0x%02X (%d)\n",
__func__, val, addr, ret);
return ret == 2 ? 0 : ret;
} | false | false | false | false | false | 0 |
read_row(const cpl_matrix *matrix, double *row, cpl_size pos)
{
cpl_size i;
for (i = 0, pos *= matrix->nc; i < matrix->nc; i++, pos++)
row[i] = matrix->m[pos];
} | false | false | false | false | false | 0 |
cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
{
int i = 0;
if (!outfile)
{
fprintf (stderr, "%s: cannot dump options to stream\n", CMDLINE_PARSER_PACKAGE);
return EXIT_FAILURE;
}
if (args_info->help_given)
write_into_file(outfile, "help", 0, 0 );
if (args_in... | false | false | false | false | false | 0 |
techniqueEventRaised(MaterialSerializer* ser,
MaterialSerializer::SerializeEvent event,
bool& skip, const Technique* tech)
{
// Pre technique write event.
if (event == MaterialSerializer::MSE_PRE_WRITE)
{
co... | false | false | false | false | false | 0 |
compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
{
j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec;
c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private;
JDIMENSION MCU_col_num; /* index of current MCU within row */
JDIMENSION MCU_count; /* number of MCUs encoded */
/* JDIMENSION last... | false | false | false | false | false | 0 |
CheckpointWriteDelay(int flags, double progress)
{
static int absorb_counter = WRITES_PER_ABSORB;
/* Do nothing if checkpoint is being executed by non-bgwriter process */
if (!am_bg_writer)
return;
/*
* Perform the usual bgwriter duties and take a nap, unless we're behind
* schedule, in which case we just t... | false | false | false | false | false | 0 |
e_mod_illume_config_select_window(E_Illume_Select_Window_Type type)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "_config_illume_select_window")) return;
v = E_NEW(E_Config_Dialog_View, 1);
if (!v) return;
stype = type;
v->create_cfdata = _e_mod_illume_config_s... | false | false | false | false | false | 0 |
module_file_deinit_gmodule(MODULE_FILE_REC *file)
{
/* call the module's deinit() function */
if (file->module_deinit != NULL)
file->module_deinit();
if (file->defined_module_name != NULL) {
settings_remove_module(file->defined_module_name);
commands_remove_module(file->defined_module_name);
signals_... | false | false | false | false | false | 0 |
OP_STR_P_ROR_IMM_OFF(armcpu_t *cpu)
{
u32 i = cpu->instruction;
u32 adr;
u32 shift_op;
ROR_IMM;
adr = cpu->R[REG_POS(i,16)] + shift_op;
WRITE32(cpu->mem_if->data, adr, cpu->R[REG_POS(i,12)]);
return 2 + MMU.MMU_WAIT32[cpu->proc_ID][(adr>>24)&0xF];
} | false | false | false | false | false | 0 |
ocfs2_dx_root_sanity_check(struct ocfs2_extent_tree *et)
{
struct ocfs2_dx_root_block *dx_root = et->et_object;
BUG_ON(!OCFS2_IS_VALID_DX_ROOT(dx_root));
return 0;
} | false | false | false | false | false | 0 |
check_group_delete (OobsGroup *group)
{
GtkWidget *parent;
GtkWidget *dialog;
gint reply;
parent = gst_dialog_get_widget (tool->main_dialog, "group_settings_dialog");
if (oobs_group_get_gid (group) == 0) {
dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
... | false | false | false | false | false | 0 |
artwork_get_screensize(int *width, int *height)
{
if (artwork_list)
{
*width = screenrect.max_x - screenrect.min_x + 1;
*height = screenrect.max_y - screenrect.min_y + 1;
}
else
{
*width = Machine->drv->screen_width;
*height = Machine->drv->screen_height;
}
} | false | false | false | false | false | 0 |
euidaccess(const char *filename, int type)
{
int apt = 0;
int e;
funcptr __euidaccess;
auto_apt_setup();
again:
DPRINT(("euidaccess: filename=%s \n", filename));
if (!apt && detectdb_file) detect_package(filename, __FUNCTION__);
__euidaccess = load_library_symbol("euidaccess");
if ... | false | false | false | false | false | 0 |
ves_icall_System_Threading_Thread_Interrupt_internal (MonoThread *this_obj)
{
MonoInternalThread *current;
gboolean throw_;
MonoInternalThread *thread = this_obj->internal_thread;
LOCK_THREAD (thread);
current = mono_thread_internal_current ();
thread->thread_interrupt_requested = TRUE;
throw_ = current != th... | false | false | false | false | false | 0 |
snd_riptide_hw_free(struct snd_pcm_substream *substream)
{
struct snd_riptide *chip = snd_pcm_substream_chip(substream);
struct pcmhw *data = get_pcmhwdev(substream);
struct cmdif *cif = chip->cif;
if (cif && data) {
if (data->lbuspath)
freelbuspath(cif, data->source, data->lbuspath);
data->lbuspath = NULL;... | false | false | false | false | false | 0 |
main( int argc, char *argv[] )
{
int i, buf_width, buf_height, num_canvases, r, g;
int buf_size;
unsigned long* buf;
/* Assign red-green ramp to the canvas pixels */
num_canvases = 2;
for (i = 0; i < num_canvases; i++)
{
buf_width = Canvases[i].Width;
buf_height = Canvases[i].Height;
buf_size... | false | true | false | false | false | 1 |
gst_apexsink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstApExSink *sink = GST_APEX_SINK (object);
switch (prop_id) {
case APEX_PROP_HOST:
if (sink->gst_apexraop == NULL) {
g_free (sink->host);
sink->host = g_value_dup_string (value);
... | false | false | false | false | false | 0 |
set_path_command(char *command)
{ int i, j; char *path_to_set = NULL, *new_value;
for (i=0; (command[i]!=0) && (command[i]!='=');i++) ;
if (command[i]==0) { new_value=command; path_to_set=Include_Path; }
else
{ char pathname[PATHLEN];
if (i>=PATHLEN) i=PATHLEN-1;
new_value = command... | true | true | false | false | false | 1 |
parse_data(struct strbuf *sb)
{
strbuf_reset(sb);
if (prefixcmp(command_buf.buf, "data "))
die("Expected 'data n' command, found: %s", command_buf.buf);
if (!prefixcmp(command_buf.buf + 5, "<<")) {
char *term = xstrdup(command_buf.buf + 5 + 2);
size_t term_len = command_buf.len - 5 - 2;
strbuf_detach(&com... | false | false | false | false | false | 0 |
readwrite(wsym,strom)
truc wsym; /* writesym or writlnsym */
truc *strom;
{
truc *savptr;
truc fun;
truc obj;
int tok, chk;
int n = 0;
savptr = argStkPtr;
tok = nexttok(strom,1); /* ueberlese linke Klammer */
while(tok != RPARENTOK) {
obj = readexpr(strom,0);
if... | false | false | false | false | false | 0 |
removeBoard(string boardName)
{
list <IBNode *> matchedNodes;
// we assume system name is followed by "/" by board to get the node name:
string sysNodePrefix = name + string("/") + boardName + string("/");
// go through all the system nodes.
for (map_str_pnode::iterator nI = p_fabric->NodeByName.be... | false | false | false | false | false | 0 |
dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres, DWT1DFN dwt_1D) {
dwt_t h;
dwt_t v;
opj_tcd_resolution_t* tr = tilec->resolutions;
OPJ_UINT32 rw = tr->x1 - tr->x0; /* width of the resolution level computed */
OPJ_UINT32 rh = tr->y1 - tr->y0; /* height of the resolution level computed */
O... | false | true | false | false | false | 1 |
compare_block_data_application_(const FLAC__StreamMetadata_Application *block1, const FLAC__StreamMetadata_Application *block2, unsigned block_length)
{
FLAC__ASSERT(0 != block1);
FLAC__ASSERT(0 != block2);
FLAC__ASSERT(block_length >= sizeof(block1->id));
if(0 != memcmp(block1->id, block2->id, sizeof(block1->id))... | false | false | false | false | false | 0 |
put(unsigned int new_value)
{
int diff = (value.get() ^ new_value);
if(diff & (T3CCP1 | T3CCP2)) {
switch(new_value & (T3CCP1 | T3CCP2)) {
case 0:
ccpr1l->assign_tmr(tmr1l); // Both CCP modules use TMR1 as their source
ccpr2l->assign_tmr(tmr1l);
break;
case T3CCP1:
ccpr1l->a... | false | false | false | false | false | 0 |
construct(const GameObject* const pGo)
{
const GameObjectDisplayInfoEntry* info = sGameObjectDisplayInfoStore.LookupEntry(pGo->GetDisplayId());
if (!info)
return NULL;
GameObjectModel* mdl = new GameObjectModel();
if (!mdl->initialize(pGo, info))
{
delete mdl;
return NULL;
... | false | false | false | false | false | 0 |
fix_enclosed_note_lengths(struct feature* chordplace,
int chord_n, int chord_m, int * base, int * base_exp)
{
struct feature* f;
struct note* anote;
if (chord_n ==1 && chord_m ==1) return;
f = chordplace->next;
anote = f->item;
/* remove old note length from barcount */
addfractions(&cv->barcount, -anote->len.num... | false | false | false | false | false | 0 |
Sort(INDEX start, INDEX end) {
if (start == end) return;
INDEX mid = (start+end+1)/2;
Sort( start, mid-1 );
Sort( mid, end );
// merge
int i = start;
int j = mid;
int k = 0;
int length = end-start+1;
while( k<length )
{
if (i == mid )
{
m_buffer[ k++ ] = m_index[ j++ ];
}
else if (j > end )
{... | false | false | false | false | false | 0 |
ReadMatchDistances(UInt32 &lenRes, UInt32 &numDistancePairs)
{
lenRes = 0;
RINOK(_matchFinder->GetMatches(_matchDistances));
numDistancePairs = _matchDistances[0];
if (numDistancePairs > 0)
{
lenRes = _matchDistances[1 + numDistancePairs - 2];
if (lenRes == _numFastBytes)
lenRes += _matchFinder-... | false | false | false | false | false | 0 |
add_5tuple( ntuple_list out, double v1, double v2,
double v3, double v4, double v5 )
{
/* check parameters */
if( out == NULL ) error("add_5tuple: invalid n-tuple input.");
if( out->dim != 5 ) error("add_5tuple: the n-tuple must be a 5-tuple.");
/* if needed, alloc more tuples to 'out' */
if... | false | false | false | false | false | 0 |
_e_spectrum_smart_clip_set(Evas_Object *o, Evas_Object *o_clip)
{
E_Spectrum *sp;
sp = evas_object_smart_data_get(o);
if (!sp) return;
evas_object_clip_set(sp->o_spectrum, o_clip);
evas_object_clip_set(sp->o_event, o_clip);
evas_object_clip_set(sp->o_cursor, o_clip);
} | false | false | false | false | false | 0 |
applicable0(const solver *ego_, const problem *p_)
{
const problem_rdft *p = (const problem_rdft *) p_;
UNUSED(ego_);
return (1
&& p->sz->rnk == 1
&& p->vecsz->rnk <= 1
&& p->kind[0] == REDFT00
&& p->sz->dims[0].n > 1 /* n == 1 is not well-defined */
);
} | false | false | false | false | false | 0 |
_layout_paragraph_new(Ctxt *c, Evas_Object_Textblock_Node_Text *n,
Eina_Bool append)
{
Evas_Object_Textblock_Paragraph *rel_par = c->par;
c->par = calloc(1, sizeof(Evas_Object_Textblock_Paragraph));
if (append || !rel_par)
c->paragraphs = (Evas_Object_Textblock_Paragraph *)
eina_inlist_app... | false | false | false | false | false | 0 |
vmac_update(struct shash_desc *pdesc, const u8 *p,
unsigned int len)
{
struct crypto_shash *parent = pdesc->tfm;
struct vmac_ctx_t *ctx = crypto_shash_ctx(parent);
int expand;
int min;
expand = VMAC_NHBYTES - ctx->partial_size > 0 ?
VMAC_NHBYTES - ctx->partial_size : 0;
min = len < expand ? len : expand;
... | false | true | false | false | false | 1 |
P_PlayerInSpecialSector (player_t* player)
{
sector_t* sector;
sector = player->mo->subsector->sector;
// Falling, not all the way down yet?
if (player->mo->z != sector->floorheight)
return;
// Has hitten ground.
switch (sector->special)
{
case 5:
// HELLSLIME DAMAGE
if (!playe... | false | false | false | false | false | 0 |
sqlstate2to3(char *state)
{
char *p = state;
if (p[0] == 'S' && p[1] == '0' && p[2] == '0') {
p[0] = '4';
p[1] = '2';
p[2] = 'S';
return;
}
/* TODO optimize with a switch */
SQLS_MAP("01S03", "01001");
SQLS_MAP("01S04", "01001");
SQLS_MAP("22003", "HY019");
SQLS_MAP("22008", "22007");
SQLS_MAP("22005... | true | true | false | false | false | 1 |
gfarm_initialize(int *argcp, char ***argvp)
{
gfarm_error_t e;
struct gfm_connection *gfm_server;
enum gfarm_auth_method auth_method;
#ifdef HAVE_GSI
int saved_auth_verb;
#endif
gflog_initialize();
e = gfarm_set_local_user_for_this_local_account();
if (e != GFARM_ERR_NO_ERROR) {
gflog_debug(GFARM_MSG_1000982... | false | false | false | false | true | 1 |
next_online_pgdat(int node)
{
char buf[BUFSIZE];
ulong pgdat;
/*
* Default -- look for type: struct pglist_data node_data[]
*/
if (LKCD_KERNTYPES()) {
if (!kernel_symbol_exists("node_data"))
goto pgdat2;
/*
* Just index into node_data[] without checking that it is
* an array; kerntype... | true | true | false | false | true | 1 |
multipath_map (struct mpconf *conf)
{
int i, disks = conf->raid_disks;
/*
* Later we do read balancing on the read side
* now we use the first available disk.
*/
rcu_read_lock();
for (i = 0; i < disks; i++) {
struct md_rdev *rdev = rcu_dereference(conf->multipaths[i].rdev);
if (rdev && test_bit(In_sync,... | false | false | false | false | false | 0 |
Tensurerecordfile(void) {
const char *fdstr;
int fd;
int chars;
unsigned long sec, usec;
if (Tinputfile) return;
Tinputfile= stdin;
fdstr= getenv("ADNS_TEST_IN_FD");
if (fdstr) {
fd= atoi(fdstr);
Tinputfile= fdopen(fd,"r"); if (!Tinputfile) Tfailed("fdopen ADNS_TEST_IN_FD");
}
setvbuf(Tinput... | false | false | false | false | true | 1 |
node_free(ofps *s, node *p) {
//printf("~1 freeing node ix %d and all contents\n",p->ix);
/* Free up list of Voronoi verticies */
if (p->vv != NULL) {
free(p->vv);
p->vv = NULL;
p->nvv = p->_nvv = 0;
}
/* Free up list of voronoi node indexes */
if (p->vn != NULL) {
while (p->nvn > 0) {
if (p->mm[--p-... | false | false | false | false | false | 0 |
setViewMode (ViewMode vm)
{
bool bPrevWeb= (m_viewMode == VIEW_WEB);
m_viewMode = vm;
UT_return_if_fail( m_pLayout );
UT_DEBUGMSG(("View mode set calling updateviewonmodechange \n"));
m_pLayout->updateOnViewModeChange();
if(bPrevWeb)
{
rebuildLayout();
m_pLayout->formatAll();
_generalUpdate();
}
else
... | false | false | false | false | false | 0 |
execlists_context_queue(struct drm_i915_gem_request *request)
{
struct intel_engine_cs *ring = request->ring;
struct drm_i915_gem_request *cursor;
int num_elements = 0;
if (request->ctx != ring->default_context)
intel_lr_context_pin(request);
i915_gem_request_reference(request);
spin_lock_irq(&ring->execlist... | false | false | false | false | false | 0 |
CanReadFile(const char* filename)
{
// Make sure file names have been specified
std::string strFileName = filename;
std::vector<std::string> fileList = SplitFileNames(strFileName);
if (fileList.empty())
{
return false;
}
// Make sure all file names have the same extension
if( !VerifyExtensions(... | 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.