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 |
|---|---|---|---|---|---|---|
ns83820_tx_watch(unsigned long data)
{
struct net_device *ndev = (void *)data;
struct ns83820 *dev = PRIV(ndev);
#if defined(DEBUG)
printk("ns83820_tx_watch: %u %u %d\n",
dev->tx_done_idx, dev->tx_free_idx, atomic_read(&dev->nr_tx_skbs)
);
#endif
if (time_after(jiffies, dev_trans_start(ndev) + 1*HZ) &&
d... | false | false | false | false | false | 0 |
nasty(mcast)
struct monst *mcast;
{
register struct monst *mtmp;
register int i, j, tmp;
int castalign = (mcast ? mcast->data->maligntyp : -1);
coord bypos;
int count=0;
if(!rn2(10) && Inhell) {
msummon((struct monst *) 0); /* summons like WoY */
count++;
} else {
tmp = (u.ulevel > 3) ?... | false | false | false | false | false | 0 |
f_winrestview(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
dict_T *dict;
if (argvars[0].v_type != VAR_DICT
|| (dict = argvars[0].vval.v_dict) == NULL)
EMSG(_(e_invarg));
else
{
curwin->w_cursor.lnum = get_dict_number(dict, (char_u *)"lnum");
curwin->w_cursor.col = get_dict_numb... | false | false | false | false | false | 0 |
buffer_probe (GstPad * pad, GstBuffer * buffer, gpointer unused)
{
g_mutex_lock (lock);
while (buf != NULL)
g_cond_wait (cond, lock);
/* increase the refcount because we store it globally for others to use */
buf = gst_buffer_ref (buffer);
g_cond_signal (cond);
g_mutex_unlock (lock);
return TRUE;... | false | false | false | false | false | 0 |
TIFF_Image (const char* filename) {
GraphicComp* comp = nil;
Raster* raster = TIFFRaster::load(filename);
if (raster != nil) {
#ifndef NOREF
raster->ref();
#endif
raster->flush();
comp = new RasterComp(new RasterRect(raster), filename);
}
return comp;
} | false | false | false | false | false | 0 |
dwt_deinterleave_v(OPJ_INT32 *a, OPJ_INT32 *b, OPJ_INT32 dn, OPJ_INT32 sn, OPJ_INT32 x, OPJ_INT32 cas) {
OPJ_INT32 i = sn;
OPJ_INT32 * l_dest = b;
OPJ_INT32 * l_src = a+cas;
while
(i--)
{
*l_dest = *l_src;
l_dest += x;
l_src += 2;
/* b[i*x]=a[2*i+cas]; */
}
l_dest = b + sn * x;
... | false | false | false | false | false | 0 |
linit()
{
struct gentry **gp;
struct ientry **ip;
struct fentry **fp;
llfiles = NULL; /* Zero queue of files to link. */
/*
* Allocate the various data structures that are used by the linker.
*/
lghash = (struct gentry **) tcalloc(ghsize, sizeof(struct gentry *));
lihash = (struct... | false | false | false | false | false | 0 |
action_replay_patch (void)
{
int off1,off2;
uae_u8 *kickmem = kickmemory;
if (armodel != 3 || !kickmem || !armemory_rom)
return;
if (!memcmp (kickmem, kickmem + 262144, 262144)) off1 = 262144; else off1 = 0;
for (;;) {
if (!memcmp (kickmem + off1, ar3patch1, sizeof (ar3patch1)) || off1 == 524288 - sizeof (ar3... | false | false | false | false | false | 0 |
removeTracksFromPlaylist(const FXIntList & queue,FXint playlist){
FXString query;
db.begin();
if (queue.no()==1) {
query.format("DELETE FROM playlist_tracks WHERE playlist == %d AND queue == %d;",playlist,queue[0]);
if (!db.execute(query))
goto error;
// Renumber queue following removed queu... | false | false | false | false | false | 0 |
verity_io_hints(struct dm_target *ti, struct queue_limits *limits)
{
struct dm_verity *v = ti->private;
if (limits->logical_block_size < 1 << v->data_dev_block_bits)
limits->logical_block_size = 1 << v->data_dev_block_bits;
if (limits->physical_block_size < 1 << v->data_dev_block_bits)
limits->physical_block_s... | false | false | false | false | false | 0 |
resolve(Lexer *lexer, int etype, int ninputs, int noutputs, Vector<String> &args, ErrorHandler *errh, const String &landmark)
{
// Try to return an element class, even if it is wrong -- the error messages
// are friendlier
Compound *ct = this;
int closest_etype = -1;
while (ct) {
if (ct->_ninputs == ni... | false | false | false | false | false | 0 |
MD5Update (context, in, inputLen)
MD5_CTX *context;
const void *in;
unsigned int inputLen;
{
unsigned int i, idx, partLen;
const unsigned char *input = in;
/* Compute number of bytes mod 64 */
idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
if ((context->count[0] += ((uint3... | false | false | false | false | false | 0 |
hns_nic_set_settings(struct net_device *net_dev,
struct ethtool_cmd *cmd)
{
struct hns_nic_priv *priv = netdev_priv(net_dev);
struct hnae_handle *h;
u32 speed;
if (!netif_running(net_dev))
return -ESRCH;
if (!priv || !priv->ae_handle || !priv->ae_handle->dev ||
!priv->ae_handle->dev->ops)
return -EN... | false | false | false | false | false | 0 |
write_data (const void *buf, size_t count)
{
if (write (to_daemon_input, buf, count) != count)
g_printerr ("Error writing to daemon: %s\n", strerror (errno));
} | false | false | false | false | false | 0 |
gst_push_file_src_uri_get_uri (GstURIHandler * handler)
{
GstPushFileSrc *src = GST_PUSH_FILE_SRC (handler);
gchar *fileuri, *pushfileuri;
if (src->filesrc == NULL)
return NULL;
fileuri = gst_uri_handler_get_uri (GST_URI_HANDLER (src->filesrc));;
if (fileuri == NULL)
return NULL;
pushfileuri = g_s... | false | false | false | false | false | 0 |
IPrcParse(const pfPrcTag* tag, plResManager* mgr) {
if (tag->getName() == "BinkParams") {
fBinkFilename = tag->getParam("BinkFile", "");
fSgtFilename = tag->getParam("SgtFile", "");
fSubtitleId = tag->getParam("SubtitleId", "");
} else {
plATCAnim::IPrcParse(tag, mgr);
}
} | false | false | false | false | false | 0 |
process_get (ompi_osc_rdma_module_t* module, int target,
ompi_osc_rdma_header_get_t* get_header)
{
char *data = (char *) (get_header + 1);
struct ompi_datatype_t *datatype;
void *source = (unsigned char*) module->baseptr +
((unsigned long) get_header->displacement * mo... | false | false | false | false | false | 0 |
done()
{
struct libmail_gpg_info gi;
std::string passphrase_fd;
memset(&gi, 0, sizeof(gi));
if (ferror(tFile) || fflush(tFile) < 0 ||
fseek(tFile, 0L, SEEK_SET) < 0)
return strerror(errno);
if (encryptionInfo.passphrase.size() > 0)
{
if ((passFd=tmpfile()) == NULL ||
fprintf(passFd, "%s", encryp... | false | false | false | false | true | 1 |
__env_get_backup_config(dbenv, config, valuep)
DB_ENV *dbenv;
DB_BACKUP_CONFIG config;
u_int32_t *valuep;
{
DB_BACKUP *backup;
backup = dbenv->env->backup_handle;
if (backup == NULL)
return (EINVAL);
switch (config) {
case DB_BACKUP_WRITE_DIRECT:
*valuep = F_ISSET(backup, BACKUP_WRITE_DIRECT);
break;
... | false | false | false | false | false | 0 |
task_work_run(void)
{
struct task_struct *task = current;
struct callback_head *work, *head, *next;
for (;;) {
/*
* work->func() can do task_work_add(), do not set
* work_exited unless the list is empty.
*/
do {
work = ACCESS_ONCE(task->task_works);
head = !work && (task->flags & PF_EXITING) ?
... | false | false | false | false | false | 0 |
ConcatLists (struct Item *list1,struct Item *list2)
/* Notes: * Refrain from freeing list2 after using ConcatLists
* list1 must have at least one element in it */
{ struct Item *endOfList1;
if (list1 == NULL)
{
FatalError("ConcatLists: first argument must have at least one element");
}
for (endOf... | false | false | false | false | false | 0 |
CallBack_trade_sub_component(GtkWidget *menuitem) {
gchar *component = gtk_object_get_data( GTK_OBJECT(menuitem), "component" );
gint32 tradeslot = get_trade_slot_with_tradeid( atoi( gtk_object_get_data( GTK_OBJECT(menuitem), "tradeid" ) ) );
if(!component) return;
if(tradeslot < 0) return;
if(! strcmp(compo... | false | false | false | false | false | 0 |
print(const QTextDocument &text, const int papers, bool printDuplicata) const
{
Print::Printer p;
// const QString &name = settings()->value(Constants::S_DEFAULT_PRINTER).toString();
if (!p.getUserPrinter()) {
QPrinter *print = new QPrinter;
print->setResolution(QPrinter::ScreenResolution);
... | false | false | false | false | false | 0 |
dbtext_get_groups(void *handle, const char *qgr, const char *key,
dico_list_t *pgroups)
{
dico_url_t url = handle;
char *dir = dico_url_full_path(url);
char *full_name;
FILE *fp = open_file(dir, qgr, &full_name);
int rc;
dico_list_t groups = NULL;
if (fp) {
char *buf = NULL;
size_... | false | false | false | false | false | 0 |
jitopt_param(jit_State *J, const char *str)
{
const char *lst = JIT_P_STRING;
int i;
for (i = 0; i < JIT_P__MAX; i++) {
size_t len = *(const uint8_t *)lst;
lua_assert(len != 0);
if (strncmp(str, lst+1, len) == 0 && str[len] == '=') {
int32_t n = 0;
const char *p = &str[len+1];
while ... | false | false | false | false | false | 0 |
gretl_matrix_subtract_reversed (const gretl_matrix *a, gretl_matrix *b)
{
int i, n;
if (a->rows != b->rows || a->cols != b->cols) {
return E_NONCONF;
}
n = a->rows * b->cols;
#if defined(_OPENMP)
if (!libset_use_openmp(n)) {
goto st_mode;
}
#pragma omp parallel for private(i)
for (i=0; ... | false | false | false | false | false | 0 |
stream_encoder_read_callback_(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data)
{
FILE *f = (FILE*)client_data;
(void)encoder;
if(*bytes > 0) {
*bytes = fread(buffer, sizeof(FLAC__byte), *bytes, f);
if(ferror(f))
return FLAC__STREAM_ENCODER_READ_STATUS_ABORT;
else if... | false | false | false | false | false | 0 |
menu_insert_delete(const GdkEventKey *event, const MenuInfo *menu_info,
const char *insert_name, const char *delete_name)
{
const char *name;
if (event->keyval == GDK_Insert || event->keyval == GDK_KP_Insert)
name = insert_name;
else if (event->keyval == GDK_Delete || event->keyval == GDK_KP_Delete)
name = del... | false | false | false | false | false | 0 |
cd_sensor_get_sample_cb (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
GError *error = NULL;
GVariant *result;
CdColorXYZ *xyz;
GSimpleAsyncResult *res_source = G_SIMPLE_ASYNC_RESULT (user_data);
result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object),
res,
&erro... | false | false | false | false | false | 0 |
SMS_Finish(struct object *obj)
{
struct storage *sto;
struct vsb *vsb;
CHECK_OBJ_NOTNULL(obj, OBJECT_MAGIC);
sto = VTAILQ_FIRST(&obj->store);
assert(sto->stevedore == &sms_stevedore);
vsb = sto->priv;
AZ(VSB_finish(vsb));
sto->ptr = (void*)VSB_data(vsb);
sto->len = VSB_len(vsb);
sto->space = VSB_len(vsb);
... | false | false | false | true | false | 1 |
OnHelp (Dialog* dialog)
{
dialog->m_App->OnHelp (dialog->m_windowname);
} | false | false | false | false | false | 0 |
scroll_view(struct view *view, enum request request)
{
int lines = 1;
assert(view_is_displayed(view));
switch (request) {
case REQ_SCROLL_FIRST_COL:
view->yoffset = 0;
redraw_view_from(view, 0);
report("");
return;
case REQ_SCROLL_LEFT:
if (view->yoffset == 0) {
report("Cannot scroll beyond the firs... | false | false | false | false | false | 0 |
__indirect_glDeleteFramebuffers(GLsizei n, const GLuint * framebuffers)
{
struct glx_context * const gc = __glXGetCurrentContext();
const GLuint cmdlen = 8 + __GLX_PAD((n * 4));
if (n < 0) {
__glXSetError(gc, GL_INVALID_VALUE);
return;
}
if (__builtin_expect(n >= 0, 1)) {
emit_header... | false | true | false | false | false | 1 |
fpi_drvcb_report_verify_result(struct fp_dev *dev, int result,
struct fp_img *img)
{
fp_dbg("result %d", result);
BUG_ON(dev->state != DEV_STATE_VERIFYING);
if (result < 0 || result == FP_VERIFY_NO_MATCH
|| result == FP_VERIFY_MATCH)
dev->state = DEV_STATE_VERIFY_DONE;
if (dev->verify_cb)
dev->verify_cb(de... | false | false | false | false | false | 0 |
uint16_cmp(uint16_t a, uint16_t b) {
return a == b ? 0 : (a < b ? -1 : 1);
} | false | false | false | false | false | 0 |
stbi_gif_info_raw(stbi *s, int *x, int *y, int *comp)
{
stbi_gif g;
if (!stbi_gif_header(s, &g, comp, 1)) {
stbi_rewind( s );
return 0;
}
if (x) *x = g.w;
if (y) *y = g.h;
return 1;
} | false | false | false | false | false | 0 |
gst_rtp_opus_pay_class_init (GstRtpOPUSPayClass * klass)
{
GstRTPBasePayloadClass *gstbasertppayload_class;
GstElementClass *element_class;
gstbasertppayload_class = (GstRTPBasePayloadClass *) klass;
element_class = GST_ELEMENT_CLASS (klass);
gstbasertppayload_class->set_caps = gst_rtp_opus_pay_setcaps;
g... | false | false | false | false | false | 0 |
TraceEllipse(PrimitiveInfo *primitive_info,const PointInfo start,
const PointInfo stop,const PointInfo degrees)
{
double
delta,
step,
y;
PointInfo
angle,
point;
register PrimitiveInfo
*p;
register long
i;
/*
Ellipses are just short segmented polys.
*/
delta... | false | false | false | false | false | 0 |
zxid_idp_sso_desc(zxid_conf* cf, struct zx_elem_s* father)
{
struct zx_md_IDPSSODescriptor_s* idp_ssod = zx_NEW_md_IDPSSODescriptor(cf->ctx,father);
idp_ssod->WantAuthnRequestsSigned = zx_ref_attr(cf->ctx, &idp_ssod->gg, zx_WantAuthnRequestsSigned_ATTR, cf->want_authn_req_signed?"1":"0");
idp_ssod->errorURL ... | false | false | false | false | false | 0 |
ff_match_code(struct forcefield_pak *ff, gint *atoms, gint n)
{
gint i, match;
g_assert(ff != NULL);
g_assert(n <= FF_MAX_ATOMS);
/* number of atoms match forcefield? */
if (n != ff->atoms_current)
return(FALSE);
/* forward test */
match = TRUE;
for (i=0 ; i<ff->atoms_current ; i++)
{
if (ff->atom[i][0] == 'x'... | false | false | false | false | true | 1 |
bert_print_regex(const bert_data_t *data)
{
printf("{bert, regex, <<%s>>, [",data->regex.source);
unsigned int options = data->regex.options;
unsigned int bit_index = 0;
unsigned int mask;
const char *name;
while (options)
{
mask = ((options & 0x01) << bit_index);
options >>= 1;
++bit_index;
if (mas... | false | false | false | false | false | 0 |
project_load_file(const gchar *locale_file_name)
{
g_return_val_if_fail(locale_file_name != NULL, FALSE);
if (load_config(locale_file_name))
{
gchar *utf8_filename = utils_get_utf8_from_locale(locale_file_name);
ui_set_statusbar(TRUE, _("Project \"%s\" opened."), app->project->name);
ui_add_recent_project_f... | false | false | false | false | false | 0 |
_rl_find_completion_word (fp, dp)
int *fp, *dp;
{
int scan, end, found_quote, delimiter, pass_next, isbrk;
char quote_char, *brkchars;
end = rl_point;
found_quote = delimiter = 0;
quote_char = '\0';
brkchars = 0;
if (rl_completion_word_break_hook)
brkchars = (*rl_completion_word_break_hook) ();... | false | false | false | false | false | 0 |
WrapLabel(const Glib::ustring &text) // IN: The label text
: mWrapWidth(0)
{
get_layout()->set_wrap(Pango::WRAP_WORD_CHAR);
set_alignment(0.0, 0.0);
set_text(text);
} | false | false | false | false | false | 0 |
setup_git_env(void)
{
git_dir = getenv(GIT_DIR_ENVIRONMENT);
if (!git_dir)
git_dir = read_gitfile_gently(DEFAULT_GIT_DIR_ENVIRONMENT);
if (!git_dir)
git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
git_object_dir = getenv(DB_ENVIRONMENT);
if (!git_object_dir) {
git_object_dir = xmalloc(strlen(git_dir) + 9);
sprintf(... | false | false | false | false | false | 0 |
gen_rtx_REG_offset (rtx reg, enum machine_mode mode, unsigned int regno, int offset)
{
rtx new = gen_rtx_REG (mode, regno);
REG_ATTRS (new) = get_reg_attrs (REG_EXPR (reg),
REG_OFFSET (reg) + offset);
return new;
} | false | false | false | false | false | 0 |
add_persistent_cache_entry(const char *filename, filesize_t size,
time_t mtime, const struct sha1 *sha1, const struct tth *tth)
{
char *pathname;
FILE *f;
pathname = make_pathname(settings_config_dir(), "sha1_cache");
f = file_fopen(pathname, "a");
if (f) {
filestat_t sb;
/*
* If we're adding the very fi... | false | false | false | false | false | 0 |
mergeReadFiles(const std::string& readsFile1, const std::string& readsFile2, const std::string& outPrefix)
{
// If the outfile is the empty string, append the reads in readsFile2 into readsFile1
// otherwise cat the files together
std::ostream* pWriter;
if(outPrefix.empty())
{
pWriter = crea... | false | false | false | false | false | 0 |
set_addid(GBDATA *gb_main, const char *addid) {
GB_ERROR error = GB_push_transaction(gb_main);
if (!error) error = GBT_write_string(gb_main, AWAR_NAMESERVER_ADDID, addid ? addid : "");
return GB_end_transaction(gb_main, error);
} | false | false | false | false | false | 0 |
almanah_entry_set_last_edited (AlmanahEntry *self, GDate *last_edited)
{
g_return_if_fail (ALMANAH_IS_ENTRY (self));
g_return_if_fail (last_edited != NULL && g_date_valid (last_edited) == TRUE);
self->priv->last_edited = *last_edited;
} | false | false | false | false | false | 0 |
map_for_each( map_t tree, process_each_func f, void * param)
{
tree->ret_code = 0;
if( tree->avl_root )
process_all( tree, tree->avl_root, f, param);
return tree->ret_code;
} | false | false | false | false | false | 0 |
listen(int backlog)
{
int result = ::listen(impl->sock, backlog);
if (result < 0) throw CL_Error("CL_Socket::listen failed");
} | false | false | false | false | false | 0 |
GetVariance() const
{
if ( m_Parameters.GetSize() != 1 )
{
itkGenericExceptionMacro(
"Invalid number of parameters to describe distribution. Expected 1 parameter, but got "
<< m_Parameters.size()
<< " parameters.");
}
return 2.0 * m_Parameters[0];
} | false | false | false | false | false | 0 |
StartPrepare(GlobalTransaction gxact)
{
TransactionId xid = gxact->proc.xid;
TwoPhaseFileHeader hdr;
TransactionId *children;
RelFileNode *commitrels;
RelFileNode *abortrels;
/* Initialize linked list */
records.head = palloc0(sizeof(XLogRecData));
records.head->buffer = InvalidBuffer;
records.head->len = 0;
... | false | false | false | false | false | 0 |
source_config_dialog_source_removed_cb (ESourceRegistry *registry,
ESource *removed_source,
ESourceConfigDialog *dialog)
{
ESourceConfig *config;
ESource *original_source;
/* If the ESource being edited is removed, cancel the dialog. */... | false | false | false | false | false | 0 |
_fm_template_update_from_file(FmTemplate *templ, FmTemplateFile *file)
{
if(file == NULL)
return;
/* update from less relevant file first */
_fm_template_update_from_file(templ, file->next_in_templ);
if(file->is_desktop_entry) /* desktop entry */
{
GKeyFile *kf = g_key_file_new();
... | false | false | false | false | false | 0 |
kfd_dbgmgr_unregister(struct kfd_dbgmgr *pmgr, struct kfd_process *p)
{
BUG_ON(!p || !pmgr || !pmgr->dbgdev);
/* Is the requests coming from the already registered process? */
if (pmgr->pasid != p->pasid) {
pr_debug("H/W debugger is not registered by calling pasid %d\n",
p->pasid);
return -EINVAL;
}
pmgr... | false | false | false | false | false | 0 |
set_access(char *acc, short access)
{
int idx = 0;
memset(acc, 0, ACCLEN);
if (access & ACC_READ)
acc[idx++] = 'r';
if (access & ACC_WRITE)
acc[idx++] = 'w';
if (access & ACC_MKNOD)
acc[idx++] = 'm';
} | false | false | false | false | true | 1 |
clarity_canvas_set_text_color(ClarityCanvas *self, const gchar *color_string) {
g_return_if_fail(self);
g_return_if_fail(color_string);
ClarityCanvasPrivate *priv = CLARITY_CANVAS_GET_PRIVATE(self);
ClutterColor *ccolor;
ccolor = g_malloc(sizeof(ClutterColor));
clutter_color_from_string(ccolo... | false | false | false | false | false | 0 |
nemo_trash_bar_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
NemoTrashBar *bar;
bar = NEMO_TRASH_BAR (object);
switch (prop_id) {
case PROP_VIEW:
bar->priv->view = g_value_get_object (value);
connect_view_and_update_button (bar);
break;... | false | false | false | false | false | 0 |
group_in_compile_stack (compile_stack_type compile_stack, regnum_t regnum)
{
int this_element;
for (this_element = compile_stack.avail - 1;
this_element >= 0;
this_element--)
if (compile_stack.stack[this_element].regnum == regnum)
return true;
return false;
} | false | false | false | false | false | 0 |
GetColor(char *name)
{
XColor def, sdef;
int st;
if (bwFlag)
return BlackPixel(display, screen);
st = XAllocNamedColor(display, DefaultColormap(display, screen),
name, &sdef, &def);
return (st != BadColor) ? sdef.pixel : BlackPixel(display, screen);
} | false | false | false | false | false | 0 |
IsDisconnected()
{
// return true if DoDisconnect can safely be skipped
return !m_con.get() && !m_desktop.get();
} | false | false | false | false | false | 0 |
ib_uverbs_attach_mcast(struct ib_uverbs_file *file,
struct ib_device *ib_dev,
const char __user *buf, int in_len,
int out_len)
{
struct ib_uverbs_attach_mcast cmd;
struct ib_qp *qp;
struct ib_uqp_object *obj;
struct ib_uverbs_mcast_entry *mcast;
int ... | false | false | false | false | false | 0 |
OnEventTest(wxCommandEvent &event)
// ----------------------------------------------------------------------------
{
#if defined(LOGGING)
LOGIT( _T("CodeSnippetsAppFrame::OnEventTest()"));
#endif
//// CodeSnippetsEvent evt(wxEVT_CODESNIPPETS_SELECT, 15);
//// evt.PostCodeSnippetsEvent(evt);
... | false | false | false | false | false | 0 |
equiv_constant (rtx x)
{
if (REG_P (x)
&& REGNO_QTY_VALID_P (REGNO (x)))
{
int x_q = REG_QTY (REGNO (x));
struct qty_table_elem *x_ent = &qty_table[x_q];
if (x_ent->const_rtx)
x = gen_lowpart (GET_MODE (x), x_ent->const_rtx);
}
if (x == 0 || CONSTANT_P (x))
return x;
if (GE... | false | false | false | false | false | 0 |
ml_coll_memsync_setup(mca_coll_ml_module_t *ml_module)
{
int ret;
/* For barrier syncronization we use barrier topology */
mca_coll_ml_topology_t *topo_info =
&ml_module->topo_list[ml_module->collectives_topology_map[ML_BARRIER][ML_SMALL_MSG]];
ret = mca_coll_ml_build_memsync_schedule(topo_i... | false | false | false | false | false | 0 |
build_selection_list_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer user_data)
{
GList **sel = user_data;
gboolean is_selected;
gtk_tree_model_get (model, iter,
GD_MAIN_CO... | false | false | false | false | false | 0 |
moveRight()
{
if (m_borderPosition!=NO_POSITION) {
if (m_borderPosition<m_columns-1)
m_borderPosition++;
else if ((m_borderPosition>=m_columns+m_rows+1) && (m_borderPosition<2*m_columns+m_rows))
m_borderPosition--;
else if (m_borderPosition>=2*m_columns+m_rows) {
m_boxPosition = m_columns*(2*m_columns+2... | false | false | false | false | false | 0 |
appendable_path (const char *string, const char *path)
{
size_t n;
if (path[0] == '/' && (n=strlen (string)) && string[n-1] == '/')
return path+1;
else
return path;
} | false | false | false | false | false | 0 |
bpf_get_inode(struct super_block *sb,
const struct inode *dir,
umode_t mode)
{
struct inode *inode;
switch (mode & S_IFMT) {
case S_IFDIR:
case S_IFREG:
break;
default:
return ERR_PTR(-EINVAL);
}
inode = new_inode(sb);
if (!inode)
return ERR_PTR(-ENOSPC);
inode->i_ino = get_next_ino();
... | false | false | false | false | false | 0 |
saa7164_api_get_load_info(struct saa7164_dev *dev, struct tmFwInfoStruct *i)
{
int ret;
if (!(saa_debug & DBGLVL_CPU))
return 0;
dprintk(DBGLVL_API, "%s()\n", __func__);
i->deviceinst = 0;
i->devicespec = 0;
i->mode = 0;
i->status = 0;
ret = saa7164_cmd_send(dev, 0, GET_CUR,
GET_FW_STATUS_CONTROL, sizeo... | false | false | false | false | false | 0 |
jpg_mkimage(j_decompress_ptr cinfo)
{
jas_image_t *image;
int cmptno;
jas_image_cmptparm_t cmptparm;
int numcmpts;
image = 0;
numcmpts = cinfo->output_components;
if (!(image = jas_image_create0())) {
goto error;
}
for (cmptno = 0; cmptno < numcmpts; ++cmptno) {
cmptparm.tlx = 0;
cmptparm.tly = 0;
cmp... | false | false | false | false | false | 0 |
xfer_undump(struct xfer_header *xfer)
{
struct xfer_item *item;
int r;
struct mailbox *mailbox = NULL;
char buf[MAX_PARTITION_LEN+HOSTNAME_SIZE+2];
for (item = xfer->items; item; item = item->next) {
r = mailbox_open_irl(item->name, &mailbox);
if (r) {
syslog(LOG_ERR,
"Failed to open ma... | true | true | false | false | false | 1 |
eb_set_keyword(EB_Book *book, const char *input_word, char *word,
char *canonicalized_word, EB_Word_Code *word_code)
{
EB_Error_Code error_code;
LOG(("in: eb_set_keyword(book=%d, input_word=%s)", (int)book->code,
eb_quoted_string(input_word)));
/*
* Make a fixed word and a canonicalized word fro... | false | false | false | false | false | 0 |
configure_event_callback (GtkWidget * widget, GdkEventConfigure * event)
{
if (ball_surface)
cairo_surface_destroy(ball_surface);
if (blank_surface)
cairo_surface_destroy (blank_surface);
boxsize = (event->width - 1) / hfieldsize;
ball_surface = gdk_window_create_similar_surface (gtk_widget_get_window... | false | false | false | false | false | 0 |
SetDefineMode( int bNewDefineMode )
{
/* do nothing if already in new define mode
or if dataset is in read-only mode */
if ( ( bDefineMode == bNewDefineMode ) ||
( GetAccess() == GA_ReadOnly ) )
return CE_None;
CPLDebug( "GDAL_netCDF", "SetDefineMode(%d) old=%d",
bNe... | false | false | false | false | false | 0 |
DoInsertRegionLocked(const Region& region) {
RAW_VLOG(12, "Inserting region %p..%p from %p",
reinterpret_cast<void*>(region.start_addr),
reinterpret_cast<void*>(region.end_addr),
reinterpret_cast<void*>(region.caller()));
RegionSet::const_iterator i = regions_->lower_bound(... | false | false | false | false | false | 0 |
encode_hex_own_buf(const unsigned char *in, long len,
unsigned char terminator, char *buf)
{
long i, j;
char c;
if (len < 0) {
i = 0;
while (in[i] != terminator)
i++;
len = i;
}
for (i = 0, j = 0; i < len; i++, j++) {
c = (in[i] >> 4) & 0xf;
if (c <= 9)
buf[j] = '0' + c;
else
buf[j] =... | false | false | false | false | false | 0 |
HandleStepIn(Handle<JSFunction> function,
Handle<Object> holder,
Address fp,
bool is_constructor) {
// If the frame pointer is not supplied by the caller find it.
if (fp == 0) {
StackFrameIterator it;
it.Advance();
// For constru... | false | false | false | false | false | 0 |
snd_ymfpci_playback_pointer(struct snd_pcm_substream *substream)
{
struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_ymfpci_pcm *ypcm = runtime->private_data;
struct snd_ymfpci_voice *voice = ypcm->voices[0];
if (!(ypcm->running && voice)... | false | false | false | false | false | 0 |
ParseDirectiveSpace() {
CheckForValidSection();
int64_t NumBytes;
if (ParseAbsoluteExpression(NumBytes))
return true;
int64_t FillExpr = 0;
if (getLexer().isNot(AsmToken::EndOfStatement)) {
if (getLexer().isNot(AsmToken::Comma))
return TokError("unexpected token in '.space' directive");
Le... | false | false | false | false | false | 0 |
savesigs(const int saving)
{
int cnt;
#ifdef HAVE_SIGACTION
sigset_t nset;
sigemptyset(&nset);
for (cnt = 0; cnt < sizeof(igsigs); cnt++)
sigaddset(&nset, igsigs[cnt]);
sigprocmask(saving? SIG_BLOCK: SIG_UNBLOCK, &nset, (sigset_t *) 0);
#elif defined(STRUCT_SIG)
int msk = 0;
for (cnt = 0; cnt < sizeof(igs... | false | false | false | false | false | 0 |
catc_open(struct net_device *netdev)
{
struct catc *catc = netdev_priv(netdev);
int status;
catc->irq_urb->dev = catc->usbdev;
if ((status = usb_submit_urb(catc->irq_urb, GFP_KERNEL)) < 0) {
dev_err(&catc->usbdev->dev, "submit(irq_urb) status %d\n",
status);
return -1;
}
netif_start_queue(netdev);
if (... | false | false | false | false | false | 0 |
skipToMatch (const char *const pair)
{
const boolean braceMatching = (boolean) (strcmp ("{}", pair) == 0);
const boolean braceFormatting = (boolean) (isBraceFormat () && braceMatching);
const unsigned int initialLevel = getDirectiveNestLevel ();
const int begin = pair [0], end = pair [1];
const unsigned long input... | false | false | false | false | false | 0 |
TIFFPredictorInit(TIFF* tif)
{
TIFFPredictorState* sp = PredictorState(tif);
assert(sp != 0);
/*
* Merge codec-specific tag information.
*/
if (!_TIFFMergeFields(tif, predictFields,
TIFFArrayCount(predictFields))) {
TIFFErrorExt(tif->tif_clientdata, "TIFFPredictorInit",
"Merging Predictor cod... | false | false | false | false | false | 0 |
my_chown (char *path, uid_t uid, gid_t gid) {
#if defined(HAVE_CHOWN)
if (chown(path,uid,gid)) OS_file_error(STACK_0);
#else
end_blocking_system_call();
pushSTACK(CLSTEXT("~S(~S ~S ~S ~S ~S): this platform lacks ~S"));
pushSTACK(TheSubr(subr_self)->name); pushSTACK(STACK_2);
pushSTACK(O(object_Kuid)); pushSTA... | false | false | false | false | false | 0 |
label_for_bb (basic_block bb)
{
rtx label = BB_HEAD (bb);
if (GET_CODE (label) != CODE_LABEL)
{
if (rtl_dump_file)
fprintf (rtl_dump_file, "Emitting label for block %d\n", bb->index);
label = block_label (bb);
}
return label;
} | false | false | false | false | false | 0 |
cb_expr_shift (int token, cb_tree value)
{
switch (token) {
case 'x':
/* sign ZERO condition */
if (value == cb_zero) {
if (TOKEN (-1) == 'x' || TOKEN (-1) == '!') {
cb_expr_shift_sign ('=');
return;
}
}
/* class condition */
if (CB_REFERENCE_P (value)
&& CB_CLASS_NAME_P (cb_ref (value)... | false | false | false | true | false | 1 |
getOrNewRoutingTEUnlocked(const NetworkPrefix& addr)
{
RoutingMap::iterator it = routes_[addr.getNetworkAddressType()].find(addr);
if(it!=routes_[addr.getNetworkAddressType()].end()) {
return &(it->second);
}
routes_[addr.getNetworkAddressType()].insert(RoutingMap::value_type(addr, 1));
it = routes_[addr... | false | false | false | false | false | 0 |
vi_history_word(EditLine *el, Int c __attribute__((__unused__)))
{
const Char *wp = HIST_FIRST(el);
const Char *wep, *wsp;
int len;
Char *cp;
const Char *lim;
if (wp == NULL)
return CC_ERROR;
wep = wsp = 0;
do {
while (Isspace(*wp))
wp++;
if (*wp == 0)
break;
wsp = wp;
while (*wp && !Isspace(*... | false | false | false | false | false | 0 |
copy_nodes(struct isl_sched_graph *dst, struct isl_sched_graph *src,
int (*node_pred)(struct isl_sched_node *node, int data), int data)
{
int i;
dst->n = 0;
for (i = 0; i < src->n; ++i) {
if (!node_pred(&src->node[i], data))
continue;
dst->node[dst->n].dim = isl_space_copy(src->node[i].dim);
dst->node[dst... | false | false | false | false | false | 0 |
setparams_periods(snd_pcm_t *handle,
snd_pcm_hw_params_t *params,
unsigned int *usecs,
unsigned int *count,
const char *id)
{
int err;
err = snd_pcm_hw_params_set_period_time_near(handle, params, usecs, 0);
if (err < 0) {
fprintf(error_fp, "alsa: Unable to set period time %u for %s... | false | false | false | false | false | 0 |
mbox_test_message_read(struct file *filp, char __user *userbuf,
size_t count, loff_t *ppos)
{
struct mbox_test_device *tdev = filp->private_data;
unsigned long flags;
char *touser, *ptr;
int l = 0;
int ret;
touser = kzalloc(MBOX_HEXDUMP_MAX_LEN + 1, GFP_KERNEL);
if (!touser)
return -ENOMEM;
if (!t... | false | false | false | false | false | 0 |
go_regexec (const GORegexp *gor, const char *txt,
size_t nmatch, GORegmatch *pmatch, int eflags)
{
int eoptions =
((eflags & GO_REG_NOTBOL) ? G_REGEX_MATCH_NOTBOL : 0) |
((eflags & GO_REG_NOTEOL) ? G_REGEX_MATCH_NOTEOL : 0);
size_t i = 0;
gboolean matched;
GMatchInfo *match_info = NULL;
/* We need to tot... | false | false | false | false | false | 0 |
tapeFlush (Tape tape)
{
if (tape->inFp != NULL)
{
checkpointTape (tape) ;
fclose (tape->inFp) ;
}
if (tape->outFp != NULL)
fclose (tape->outFp) ;
initTape (tape) ;
} | false | false | false | false | false | 0 |
midgard_object_update (MidgardObject *self)
{
g_signal_emit(self, MIDGARD_OBJECT_GET_CLASS(self)->signal_action_update, 0);
GError *error = NULL;
gboolean rv = _midgard_object_update(self, OBJECT_UPDATE_NONE, &error);
MidgardConnection *mgd = MGD_OBJECT_CNC (self);
/* If there's workspace enabled, try to create... | false | false | false | false | false | 0 |
number_of_iterations_le (tree type, affine_iv *iv0, affine_iv *iv1,
struct tree_niter_desc *niter, bool exit_must_be_taken,
bounds *bnds)
{
tree assumption;
tree type1 = type;
if (POINTER_TYPE_P (type))
type1 = sizetype;
/* Say that IV0 is the control variable. Then IV0 <= IV1 iff
IV0 < IV1 +... | false | false | false | false | false | 0 |
tg3_write_sig_legacy(struct tg3 *tp, int kind)
{
if (tg3_flag(tp, ENABLE_ASF)) {
switch (kind) {
case RESET_KIND_INIT:
tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
DRV_STATE_START);
break;
case RESET_KIND_SHUTDOWN:
tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX,
DRV_STATE_UNLOAD);
... | false | false | false | false | false | 0 |
switch_bench()
{
if (is_connected) {
bench_mode = !bench_mode;
display_rti = !display_rti;
ResetCaption();
gf_term_set_speed(term, bench_mode ? bench_speed : FIX_ONE);
}
} | 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.