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 |
|---|---|---|---|---|---|---|
FlipVector(double tuple[3], int mirrorDir[3])
{
for(int j=0; j<3; j++)
{
tuple[j] *= mirrorDir[j];
}
} | false | false | false | false | false | 0 |
fs_rid_set_add(fs_rid_set *s, fs_rid val)
{
if (val == FS_RID_NULL) return;
struct rid_entry *e = &s->entry[FS_RID_ENTRY_HASH(val)];
if (e->val == val) return;
if (e->val == FS_RID_NULL) {
e->val = val;
return;
}
while (e->next) {
if (e->val == val) return;
e = e->next;
}
struct r... | false | false | false | false | false | 0 |
fz_new_pixmap_with_data(fz_context *ctx, fz_colorspace *colorspace, int w, int h, unsigned char *samples)
{
fz_pixmap *pix;
pix = fz_malloc_struct(ctx, fz_pixmap);
FZ_INIT_STORABLE(pix, 1, fz_free_pixmap_imp);
pix->x = 0;
pix->y = 0;
pix->w = w;
pix->h = h;
pix->interpolate = 1;
pix->xres = 96;
pix->yres = 9... | false | false | false | false | false | 0 |
objc_rewrite_function_call (tree function, tree first_param)
{
if (TREE_CODE (function) == NOP_EXPR
&& TREE_CODE (TREE_OPERAND (function, 0)) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (TREE_OPERAND (function, 0), 0))
== FUNCTION_DECL)
{
function = build3 (OBJ_TYPE_REF, TREE_TYPE (function),
... | false | false | false | false | false | 0 |
l1sp_alloc(g, t, n, a, b)
l1sp_ctx *g;
unsigned t;
size_t n;
l1sp **a, **b;
{
l1sp *s;
size_t alloc=0U;
switch(t) {
case L1SP_FORM0:
case L1SP_PROC0:
case L1SP_FORMN:
case L1SP_PROCN:
alloc=sizeof(l1sp_func);
break;
case L1SP_MACRO:
case L1SP_LAMBDA:
case L1SP_PAIR:
alloc=sizeo... | false | false | false | false | false | 0 |
migrateItemList(const ProxyItemList &list)
{
foreach(ProxyItem pi, list) {
d->itemToOptions(pi);
}
} | false | false | false | false | false | 0 |
program()
{
#ifdef BUILTIN_CPP
if (orig_cppmode)
cppscan(0);
else
#endif
{
nextsym();
while (sym != EOFSYM)
{
declspec();
idecllist();
}
}
} | false | false | false | false | false | 0 |
MTX_BITIO_input_bit( register BITIO *t )
{
/*assert( t->ReadOrWrite == 'r' ); */
if ( t->input_bit_count-- == 0 ) {
t->input_bit_buffer = t->mem_bytes[ t->mem_index++ ];
if ( t->mem_index > t->mem_size ) {
longjmp( t->mem->env, ERR_BITIO_end_of_file );
}
++(t->bytes_i... | false | false | false | false | false | 0 |
gcide_open_idx(struct gcide_db *db)
{
int rc = 1;
char *idxname;
idxname = dico_full_file_name(db->idx_dir, "GCIDE.IDX");
if (!idxname) {
dico_log(L_ERR, errno, "gcide_open_idx");
return 1;
}
rc = gcide_access_idx(db, idxname);
if (rc == 1)
rc = run_idxgcide(idxname, db);
... | false | false | false | false | false | 0 |
dspio_read(struct hda_codec *codec, unsigned int *data)
{
int status;
status = dspio_send(codec, VENDOR_DSPIO_SCP_POST_READ_DATA, 0);
if (status == -EIO)
return status;
status = dspio_send(codec, VENDOR_DSPIO_STATUS, 0);
if (status == -EIO ||
status == VENDOR_STATUS_DSPIO_SCP_RESPONSE_QUEUE_EMPTY)
retur... | false | false | false | false | false | 0 |
load(char * rep)
{
erase();
//file which contains font information and cursor
igzstream f;
//path where is the file
string path = WIN_DIRECTORY;
//add win font directory path
path += WIN_FONT_DIRECTORY;
//add theme pass
path += string (rep) + "/";
//add font filename
path += WI... | false | false | false | false | false | 0 |
css_parse_ruleset (GScanner *scanner, GList **selectors)
{
guint token;
MxSelector *selector, *parent;
/* parse the first selector, then keep going until we find left curly */
token = g_scanner_peek_next_token (scanner);
parent = NULL;
selector = NULL;
while (token != G_TOKEN_LEFT_CURLY)
{
swi... | false | false | false | false | false | 0 |
command_print_predicate_values(flickcurl_tag_predicate_value **tag_pvs,
const char* label)
{
int i;
if(label)
fprintf(stdout, "%s: %s\n", program, label);
for(i = 0; tag_pvs[i]; i++) {
flickcurl_tag_predicate_value* tpv = tag_pvs[i];
fprintf(stdout, " #%d) ", i);
i... | false | false | false | false | false | 0 |
fdev_str2type(const char* str, int len)
{
int i;
for (i = 0; i < sizeof(dev_str)/sizeof(*dev_str); i++) {
if (dev_str[i]
&& strlen(dev_str[i]) == len
&& !str_cmp(dev_str[i], len, str, len))
return i;
}
return DEV_NONE;
} | false | false | false | false | false | 0 |
name_interpret(const u_char *in, const u_char *maxbuf, char *out)
{
int ret;
int len;
if (in >= maxbuf)
return(-1); /* name goes past the end of the buffer */
TCHECK2(*in, 1);
len = (*in++) / 2;
*out=0;
if (len > 30 || len < 1)
return(0);
while (len--) {
TCHECK2(*in, 2);
if (in +... | false | false | false | false | false | 0 |
ario_util_format_keyword (const char *keyword)
{
ARIO_LOG_FUNCTION_START;
gchar *tmp;
int i, j;
int length;
gchar *ret;
/* List of modifications done on the keuword used for the search */
const gchar *to_remove[] = {"cd 1", "cd 2", "cd 3", "cd 4", "cd 5",
... | false | false | false | false | false | 0 |
getunknown_old()
{
long i, j, n, ahap, bhap;
thisperson *WITH;
information *WITH1;
locusvalues *WITH2;
for (i = 1; i <= totperson; i++) {
person[i]->unknown = FALSE;
for (j = 0; j < nsystem; j++)
person[i]->thisunknown[j] = FALSE;
}
/*
Next bit modified in late 1994 by Dylan. The if... | false | false | false | false | false | 0 |
ref2BLOCKAGE()
{
struct phref *pPhref;
struct blockage_s *pBlockage;
if (LV_phfig) {
for (pPhref = LV_phfig->PHREF; pPhref != NULL; pPhref = pPhref->NEXT) {
if (!strncmp (pPhref->NAME, "blockage.", 9)) {
pBlockage = newblockage ();
MBK2DEF_blockage (pPhref,
... | false | false | false | false | false | 0 |
z_get_prop_len( zword_t prop_addr )
{
zbyte_t value;
/* This is proper according to an email to the Zmachine list by Graham*/
if ( prop_addr == 0 )
{
store_operand( ( zword_t ) 0 );
return;
}
/* Back up the property pointer to the property id */
prop_addr--;
value = get_byte( prop_... | false | false | false | false | false | 0 |
kinetic_scroll_key_press_cb (G_GNUC_UNUSED ClutterActor *actor,
ClutterKeyEvent *event,
ChamplainView *view)
{
DEBUG_LOG ()
ChamplainViewPrivate *priv = view->priv;
switch (event->keyval)
{
case 65361: /* Left */
champlain_view_scroll (view, -priv->viewport_width / 4.0, 0);
return TR... | false | false | false | false | false | 0 |
rewrite_heap_dead_tuple(RewriteState state, HeapTuple old_tuple)
{
/*
* If we have already seen an earlier tuple in the update chain that
* points to this tuple, let's forget about that earlier tuple. It's in
* fact dead as well, our simple xmax < OldestXmin test in
* HeapTupleSatisfiesVacuum just wasn't enoug... | false | false | false | false | false | 0 |
wait_for_not_busy(struct hfi1_devdata *dd)
{
unsigned long count = 0;
u64 reg;
int ret = 0;
/* starts page mode */
write_csr(dd, ASIC_EEP_ADDR_CMD, CMD_READ_SR1);
while (1) {
udelay(WAIT_SLEEP_US);
usleep_range(WAIT_SLEEP_US - 5, WAIT_SLEEP_US + 5);
count++;
reg = read_csr(dd, ASIC_EEP_DATA);
if ((reg ... | false | false | false | false | false | 0 |
fm_file_action_object_construct_from_key_file (GType object_type, GKeyFile* kf) {
FmFileActionObject * self = NULL;
GKeyFile* _tmp0_;
gchar* _tmp1_ = NULL;
GKeyFile* _tmp2_;
gchar* _tmp3_ = NULL;
GKeyFile* _tmp4_;
gchar* _tmp5_ = NULL;
GKeyFile* _tmp6_;
gchar* _tmp7_ = NULL;
GKeyFile* _tmp8_;
gboolean _tmp9_... | false | false | false | false | false | 0 |
do_host_lookup (result, dns)
struct data_string *result;
struct dns_host_entry *dns;
{
struct hostent *h;
unsigned i, count;
unsigned new_len;
#ifdef DEBUG_EVAL
log_debug ("time: now = %d dns = %d diff = %d",
cur_time, dns -> timeout, cur_time - dns -> timeout);
#endif
/* If the record hasn't timed o... | false | false | false | false | true | 1 |
init_nmea_socket ()
{
struct sockaddr_in server;
struct hostent *server_data;
{
/* open socket to port */
if (sock != -1)
{
close (sock);
sock = -1;
}
sock = socket (AF_INET, SOCK_STREAM, 0);
if (sock < 0)
{
perror (_("can't open socket for port "));
fprintf (stderr, "error:... | false | false | false | false | false | 0 |
computeview( GameMap* gamemap, int player_fieldcount_mask, bool disableShareView, const Context* context )
{
if ( !gamemap || (gamemap->xsize == 0) || (gamemap->ysize == 0))
return 0;
clearvisibility( gamemap );
for ( int a = 0; a < gamemap->getPlayerCount(); a++)
if (gamemap->player[a].exist() )... | false | false | false | false | false | 0 |
be_unlock_napi(struct be_eq_obj *eqo)
{
spin_lock(&eqo->lock); /* BH is already disabled */
WARN_ON(eqo->state & (BE_EQ_POLL | BE_EQ_NAPI_YIELD));
eqo->state = BE_EQ_IDLE;
spin_unlock(&eqo->lock);
} | false | false | false | false | false | 0 |
xfs_sysfs_object_show(
struct kobject *kobject,
struct attribute *attr,
char *buf)
{
struct xfs_sysfs_attr *xfs_attr = to_attr(attr);
return xfs_attr->show ? xfs_attr->show(kobject, buf) : 0;
} | false | false | false | false | false | 0 |
prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
{
int i;
struct tc_prio_qopt *qopt;
struct rtattr *tb[TCA_PRIO_MAX+1];
if (opt == NULL)
return 0;
if (parse_rtattr_nested_compat(tb, TCA_PRIO_MAX, opt, qopt,
sizeof(*qopt)))
return -1;
fprintf(f, "bands %u priomap ", qopt... | false | false | false | true | false | 1 |
_index_thread_search(struct index_state *state,
Thread *thread, int (*searchproc) (MsgData *))
{
Thread *child;
/* test the head node */
if (thread->msgdata && searchproc(thread->msgdata)) return 1;
/* test the children recursively */
child = thread->child;
while (child) {
if (_index_thre... | false | false | false | false | false | 0 |
doInitialization(Module &M) {
bool Changed = false;
dumpArguments();
dumpPasses();
for (ImmutablePass *ImPass : getImmutablePasses())
Changed |= ImPass->doInitialization(M);
for (unsigned Index = 0; Index < getNumContainedManagers(); ++Index)
Changed |= getContainedManager(Index)->doInitialization(... | false | false | false | false | false | 0 |
operator()(wxString const& lhs, wxString const& rhs) const
{
// wxString is CoW, yet it doesn't even do this fast pointer
// comparison in it's less and/or equal operator(s).
return lhs.c_str() == rhs.c_str() || lhs == rhs;
} | false | false | false | false | false | 0 |
globus_fifo_copy (
const globus_fifo_t * fifo)
{
globus_fifo_t * copy;
struct globus_fifo_s * s_copy;
struct globus_fifo_s * s_fifo;
if (fifo == GLOBUS_NULL)
return NULL;
s_fifo ... | false | false | false | false | false | 0 |
navi_frame_widget_time_label_update(FrameWidget *fw)
{
char frame_nr_to_time[20];
GdkColor *bg_color;
GdkColor *fg_color;
bg_color = &naviD->shell->style->bg[GTK_STATE_NORMAL];
fg_color = &naviD->shell->style->fg[GTK_STATE_NORMAL];
if(fw->frame_nr >= 0)
{
navi_calc_frametiming(fw->frame_nr,... | false | false | false | false | false | 0 |
crl_treeview_cursor_changed_cb (GtkTreeView *treeview, gpointer userdata)
{
GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview);
if (gtk_tree_selection_count_selected_rows(selection) == 0)
gtk_widget_set_sensitive (GTK_WIDGET(gtk_builder_get_object (crl_window_gtkb, "crl... | false | false | false | false | false | 0 |
CheckForCFGHazards(const BasicBlock *BB,
DenseMap<const BasicBlock *, BBState> &BBStates,
BBState &MyStates) const {
// If any top-down local-use or possible-dec has a succ which is earlier in
// the sequence, forget it.
for (BBState::ptr_const_iterato... | false | false | false | false | false | 0 |
flags_init(bitflag *flags, const size_t size, ...)
{
int f;
va_list args;
flag_wipe(flags, size);
va_start(args, size);
/* Process each flag in the va-args */
for (f = va_arg(args, int); f != FLAG_END; f = va_arg(args, int))
flag_on(flags, size, f);
va_end(args);
} | false | false | false | false | false | 0 |
copy(dimeModel * const model) const
{
dimeMemHandler *memh = model->getMemHandler();
dimeUnknownClass *u = new(memh) dimeUnknownClass(this->dxfClassName, memh);
if (!this->copyRecords(u, model)) { // check if allocated on heap.
if (!memh) delete u;
u = NULL;
}
return u;
} | false | false | false | false | false | 0 |
tar_close(tarf_t *fp) /* I - File to write to */
{
size_t blocks; /* Number of blocks to write */
int status; /* Return status */
char padding[TAR_BLOCKS * TAR_BLOCK];
/* Padding for tar blocks */
if (fp->blocks > 0)
{
/*
* Zero the padding record...
*/
memset(padding, 0, sizeof... | false | false | false | false | false | 0 |
pg_db_lo_lseek (SV * dbh, int fd, int offset, int whence)
{
dTHX;
D_imp_dbh(dbh);
if (TSTART_slow) TRC(DBILOGFP, "%sBegin pg_db_lo_lseek (fd: %d offset: %d whence: %d)\n",
THEADER_slow, fd, offset, whence);
if (DBIc_has(imp_dbh, DBIcf_AutoCommit)) {
croak("Cannot call pg_lo_lseek when AutoCommit is on");
... | false | false | false | false | false | 0 |
ltc4215_get_voltage(struct device *dev, u8 reg)
{
struct ltc4215_data *data = ltc4215_update_device(dev);
const u8 regval = data->regs[reg];
u32 voltage = 0;
switch (reg) {
case LTC4215_SENSE:
/* 151 uV per increment */
voltage = regval * 151 / 1000;
break;
case LTC4215_SOURCE:
/* 60.5 mV per increment *... | false | false | false | false | false | 0 |
inotifytools_initialize_stats() {
niceassert( init, "inotifytools_initialize not called yet" );
// if already collecting stats, reset stats
if (collect_stats) {
rbwalk(tree_wd, empty_stats, 0);
}
num_access = 0;
num_modify = 0;
num_attrib = 0;
num_close_nowrite = 0;
num_close_write = 0;
num_open = 0;
num... | false | false | false | false | false | 0 |
Apply()
{
for ( vector<PlayerWidgets>::iterator i = playerWidgets.begin(); i != playerWidgets.end(); ++i )
actmap->player[i->pos].email = i->email->GetText();
} | false | false | false | false | false | 0 |
handleEvents() {
SDL_Event event;
while ( SDL_PollEvent(&event) ) {
switch(event.type) {
case SDL_KEYDOWN: {
switch ( event.key.keysym.sym ) {
case SDLK_F5: {
videoserver->toggleFullscreen();
break;
}
case SDLK_F7: {
... | false | false | false | false | false | 0 |
__ham_get_cpage(dbc, mode)
DBC *dbc;
db_lockmode_t mode;
{
DB *dbp;
DB_LOCK tmp_lock;
DB_MPOOLFILE *mpf;
HASH_CURSOR *hcp;
int ret;
dbp = dbc->dbp;
mpf = dbp->mpf;
hcp = (HASH_CURSOR *)dbc->internal;
ret = 0;
/*
* There are four cases with respect to buckets and locks.
* 1. If there is no lock held, t... | false | false | false | false | false | 0 |
CommandWho(GRPENT *pGE, CONSCLIENT *pCLServing, CONSENT *pCEServing,
long tyme)
#else
CommandWho(pGE, pCLServing, pCEServing, tyme)
GRPENT *pGE;
CONSCLIENT *pCLServing;
CONSENT *pCEServing;
long tyme;
#endif
{
CONSCLIENT *pCL;
for (pCL = pCEServing->pCLon; (CONSCLIENT *)0 != pCL;
pCL = pC... | false | false | false | false | false | 0 |
sasl_client_step(sasl_conn_t *conn,
const char *serverin,
unsigned serverinlen,
sasl_interact_t **prompt_need,
const char **clientout,
unsigned *clientoutlen)
{
sasl_client_conn_t *c_conn= (sasl_client_conn_t *) conn;
int result;
if (_sasl_client_active == 0) return SASL_NOTINI... | false | false | false | true | false | 1 |
fc_fcp_pkt_release(struct fc_fcp_pkt *fsp)
{
if (atomic_dec_and_test(&fsp->ref_cnt)) {
struct fc_fcp_internal *si = fc_get_scsi_internal(fsp->lp);
mempool_free(fsp, si->scsi_pkt_pool);
}
} | false | false | false | false | false | 0 |
NeedQuotes(const wxString &str)
{
bool hasSpace = str.Find(_T(' ')) != -1;
bool hasParen = !platform::windows && (str.Find(_T('(')) != -1 || str.Find(_T(')')) != -1);
return !str.IsEmpty() && str.GetChar(0) != _T('"') && (hasSpace || hasParen);
} | false | false | false | false | false | 0 |
logic_term(Term t)
{
return (is_term(t, true_sym(), 0) ||
is_term(t, false_sym(), 0) ||
is_term(t, not_sym(), 1) ||
is_term(t, and_sym(), 2) ||
is_term(t, or_sym(), 2) ||
is_term(t, imp_sym(), 2) ||
is_term(t, impby_sym(), 2) ||
is_term(t, iff_sym(), 2) ||
is_term(t, quant_sym(), 3));
} | false | false | false | false | false | 0 |
gen_traverse(PyGenObject *gen, visitproc visit, void *arg)
{
Py_VISIT((PyObject *)gen->gi_frame);
Py_VISIT(gen->gi_code);
return 0;
} | false | false | false | false | false | 0 |
mouseMoveEvent(QMouseEvent * event)
{
// do this ourselves because when the mouse leaves the app
// we get an enter event (ie underMouse() is true)!!
underMouse_ = geometry().contains(event->globalPos());
if (!underMouse_) {
bottom_ = 0;
right_ = 0;
update();
return;
}
int const r0 = right_;
int const b... | false | false | false | false | false | 0 |
tor_addr_is_v4(const tor_addr_t *addr)
{
tor_assert(addr);
if (tor_addr_family(addr) == AF_INET)
return 1;
if (tor_addr_family(addr) == AF_INET6) {
/* First two don't need to be ordered */
uint32_t *a32 = tor_addr_to_in6_addr32(addr);
if (a32[0] == 0 && a32[1] == 0 && ntohl(a32[2]) == 0x0000ffff... | false | false | false | false | false | 0 |
validate_cache_size(unsigned long long cache_size)
{
long nr_pages = 0;
unsigned long long ram_size;
if(cache_size > IO_CACHE_MAX_SIZE)
{
log_error("Cache size [%lld] exceeds max allowed cache size [%lld]\n",
cache_size, IO_CACHE_MAX_SIZE);
return -1;
}
nr_pages... | false | false | false | false | false | 0 |
IoObject_platformVersion(IoObject *self, IoObject *locals, IoMessage *m)
{
char platformVersion[256];
/*doc System platformVersion
Returns the version id of the OS.
*/
#if defined(_WIN32)
OSVERSIONINFO os;
os.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
GetVersionEx(&os);
snprintf(platformVersion, sizeof... | false | false | false | false | true | 1 |
_cb_radio_changed(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
{
E_Config_Dialog_Data *cfdata;
char path[PATH_MAX];
if (!(cfdata = data)) return;
if (cfdata->fmdir == 1)
e_prefix_data_concat_static(path, "data/backgrounds");
else
e_user_dir_concat_static(path, "backgrounds"... | true | true | false | false | false | 1 |
readConfig()
{
// read in config settings and populate the color table
for (unsigned int i=0; ColorList[i].name != ""; i++) {
QString colortext = appsettings->value(this, ColorList[i].setting, "").toString();
if (colortext != "") {
// color definitions are stored as "r:g:b"
... | false | false | false | false | false | 0 |
v2fact(unsigned number, const char* data, unsigned len)
{
/* Always leave room for a trailing zero type byte. */
if (cvm_module_outbuflen + len + 3 > BUFSIZE) {
cvm_module_outbuflen = BUFSIZE;
return 0;
}
cvm_module_outbuflen += len + 2;
*outbufptr++ = number;
*outbufptr++ = len;
memcpy(outbufptr,... | false | true | false | false | false | 1 |
snd_wl1273_fm_set_i2s_mode(struct wl1273_core *core,
int rate, int width)
{
struct device *dev = &core->client->dev;
int r = 0;
u16 mode;
dev_dbg(dev, "rate: %d\n", rate);
dev_dbg(dev, "width: %d\n", width);
mutex_lock(&core->lock);
mode = core->i2s_mode & ~WL1273_IS2_WIDTH & ~WL1273_IS2_RATE;
swi... | false | false | false | false | false | 0 |
test_index_filemodes__untrusted(void)
{
git_index *index;
bool can_filemode = cl_is_chmod_supported();
cl_repo_set_bool(g_repo, "core.filemode", false);
cl_git_pass(git_repository_index(&index, g_repo));
cl_assert((git_index_caps(index) & GIT_INDEXCAP_NO_FILEMODE) != 0);
/* 1 - add 0644 over existing 0644 -> e... | false | false | false | false | false | 0 |
buffering_write(int fd, char *buffer, long num)
{
if (fd != bw_fd) {
/* clean up after buffering for some other file */
if (bw_fd >= 0 && bw_pos > 0) {
if (blocking_write(bw_fd, bw_outbuf, bw_pos)) {
perror("write (in buffering_write, flushing)");
}
}
bw_fd = fd;
bw_pos = 0;
}
... | false | false | false | false | false | 0 |
_test_box_in_grid(int dim, int curr,
int *start, int *end, int dims)
{
int i;
int start_curr = curr;
for (i=start[dim]; i<=end[dim]; i++) {
curr = start_curr + (i * offset[dim]);
if (dim == (dims-1)) {
if (!bit_test(bit_grid, curr))
return false;
} else {
if (!_test_box_in_grid(dim+1, curr, star... | false | false | false | false | false | 0 |
mg_next(struct mg_server *s, struct mg_connection *c) {
struct ns_connection *nc = ns_next(&s->ns_mgr, c == NULL ? NULL :
MG_CONN_2_CONN(c)->ns_conn);
if (nc != NULL && nc->user_data != NULL) {
return & ((struct connection *) nc->user_data)->mg_conn;
} else {
return NU... | false | false | false | false | false | 0 |
getDeclGroupStrAndRemove(DeclGroupRef DGR,
std::string &Str)
{
if (DGR.isSingleDecl()) {
Decl *D = DGR.getSingleDecl();
VarDecl *VD = dyn_cast<VarDecl>(D);
TransAssert(VD && "Bad VarDecl!");
// We need to get the outermost TypeLocEnd instead of the StartLoc of
... | false | false | false | false | false | 0 |
rtbl_get_column_by_id (rtbl_t table, unsigned int id)
{
size_t i;
for(i = 0; i < table->num_columns; i++)
if(table->columns[i]->column_id == id)
return table->columns[i];
return NULL;
} | false | false | false | false | false | 0 |
fs_stream_pad_removed (FsStream *stream, GstPad *pad)
{
GList *item;
FS_STREAM_LOCK (stream);
item = g_list_find (stream->priv->src_pads, pad);
if (item)
{
stream->priv->src_pads = g_list_delete_link (stream->priv->src_pads, item);
gst_object_unref (pad);
stream->priv->src_pads_cookie++;
}
FS... | false | false | false | false | false | 0 |
ex_call(eap)
exarg_T *eap;
{
char_u *arg = eap->arg;
char_u *startarg;
char_u *name;
char_u *tofree;
int len;
typval_T rettv;
linenr_T lnum;
int doesrange;
int failed = FALSE;
funcdict_T fudi;
if (eap->skip)
{
/* trans_function_name() doesn't work well when skipp... | false | false | false | false | false | 0 |
wp_msgsnd (int msqid, const void *ptr, size_t nbytes, int flag)
{
int n;
if ((n = msgsnd (msqid, ptr, nbytes, flag)) == -1)
wp_sys_func_warning();
return n;
} | false | false | false | false | false | 0 |
debug_bitmap_file (file, head)
FILE *file;
bitmap head;
{
bitmap_element *ptr;
fprintf (file, "\nfirst = ");
fprintf (file, HOST_PTR_PRINTF, (PTR) head->first);
fprintf (file, " current = ");
fprintf (file, HOST_PTR_PRINTF, (PTR) head->current);
fprintf (file, " indx = %u\n", head->indx);
for ... | false | false | false | false | false | 0 |
instw_makedirls(instw_t *instw) {
int rcod=0;
int status=0;
struct stat translinfo;
struct stat dirlsinfo;
char wdirname[NAME_MAX+1];
#if DEBUG
debug(2,"instw_makedirls(%p)\n",instw);
#endif
/*
* if library incompletely initialized or if translation
* is inactive, nothing to do
*/
if( !(instw... | false | false | false | false | false | 0 |
gf_oci_event_set_duration(OCIEvent *event, u8 Hours, u8 Minutes, u8 Seconds, u8 HundredSeconds)
{
if (!event || (Hours >= 100) || (Minutes >= 100) || (Seconds >= 100) || (HundredSeconds >= 100) )
return GF_BAD_PARAM;
event->duration[0] = Hours;
event->duration[1] = Minutes;
event->duration[2] = Seconds;
event->... | false | false | false | false | false | 0 |
autohelperendpat70(int trans, int move, int color, int action)
{
int a;
UNUSED(color);
UNUSED(action);
a = AFFINE_TRANSFORM(683, trans, move);
return is_marginal_eye_space(move) && max_eye_value(move)>0&& !safe_move(a, color) && !obvious_false_eye(a, OTHER_COLOR(color));
} | false | false | false | false | false | 0 |
OidFunctionCall6Coll(Oid functionId, Oid collation, Datum arg1, Datum arg2,
Datum arg3, Datum arg4, Datum arg5,
Datum arg6)
{
FmgrInfo flinfo;
FunctionCallInfoData fcinfo;
Datum result;
fmgr_info(functionId, &flinfo);
InitFunctionCallInfoData(fcinfo, &flinfo, 6, collation, NULL, NULL);
fcinfo.arg[... | false | false | false | false | false | 0 |
__dbreg_new_id(dbp, txn)
DB *dbp;
DB_TXN *txn;
{
DB_LOG *dblp;
ENV *env;
FNAME *fnp;
LOG *lp;
int32_t id;
int ret;
env = dbp->env;
dblp = env->lg_handle;
lp = dblp->reginfo.primary;
fnp = dbp->log_filename;
/* The mtx_filelist protects the FNAME list and id management. */
MUTEX_LOCK(env, lp->mtx_filelis... | false | false | false | false | false | 0 |
log_job_resources(uint32_t job_id,
job_resources_t *job_resrcs_ptr)
{
int bit_inx = 0, bit_reps, i;
int array_size, node_inx;
int sock_inx = 0, sock_reps = 0;
if (job_resrcs_ptr == NULL) {
error("log_job_resources: job_resrcs_ptr is NULL");
return;
}
info("====================");
info("job_id:%u n... | false | false | false | false | false | 0 |
ipr_set_supported_devs(struct ipr_cmnd *ipr_cmd)
{
struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
struct ipr_supported_device *supp_dev = &ioa_cfg->vpd_cbs->supp_dev;
struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
struct ipr_resource_entry *res = ipr_cmd->u.res;
ipr_cmd->job_step = ipr_ioa_reset_done;
list_for_... | false | false | false | false | false | 0 |
sv_is_singleton_selected (SheetView const *sv)
{
#warning FIXME Should we be using the selection rather than the cursor?
if (sv->cursor.move_corner.col == sv->cursor.base_corner.col &&
sv->cursor.move_corner.row == sv->cursor.base_corner.row)
return &sv->cursor.move_corner;
return NULL;
} | false | false | false | false | false | 0 |
qlge_isr(int irq, void *dev_id)
{
struct rx_ring *rx_ring = dev_id;
struct ql_adapter *qdev = rx_ring->qdev;
struct intr_context *intr_context = &qdev->intr_context[0];
u32 var;
int work_done = 0;
spin_lock(&qdev->hw_lock);
if (atomic_read(&qdev->intr_context[0].irq_cnt)) {
netif_printk(qdev, intr, KERN_DEBUG... | false | false | false | false | false | 0 |
tolua_typename (lua_State* L, int lo)
{
int tag = lua_type(L,lo);
if (tag == LUA_TNONE)
lua_pushstring(L,"[no object]");
else if (tag != LUA_TUSERDATA && tag != LUA_TTABLE)
lua_pushstring(L,lua_typename(L,tag));
else if (tag == LUA_TUSERDATA)
{
if (!lua_getmetatable(L,lo))
lua_pushstring(L,lua_typename(L,... | false | false | false | false | false | 0 |
gst_caps_transform_to_string (const GValue * src_value, GValue * dest_value)
{
g_return_if_fail (G_IS_VALUE (src_value));
g_return_if_fail (G_IS_VALUE (dest_value));
g_return_if_fail (G_VALUE_HOLDS (src_value, GST_TYPE_CAPS));
g_return_if_fail (G_VALUE_HOLDS (dest_value, G_TYPE_STRING)
|| G_VALUE_HOLDS (d... | false | false | false | false | false | 0 |
gst_jpegenc_term_destination (j_compress_ptr cinfo)
{
GstJpegEnc *jpegenc = (GstJpegEnc *) (cinfo->client_data);
GST_DEBUG_OBJECT (jpegenc, "gst_jpegenc_chain: term_source");
/* Trim the buffer size and push it. */
GST_BUFFER_SIZE (jpegenc->output_buffer) =
GST_BUFFER_SIZE (jpegenc->output_buffer) - jpeg... | false | false | false | false | false | 0 |
i2c_set_status(struct saa7134_dev *dev,
enum i2c_status status)
{
i2c_dbg(2, "i2c stat => %s\n", str_i2c_status[status]);
saa_andorb(SAA7134_I2C_ATTR_STATUS,0x0f,status);
} | false | false | false | false | false | 0 |
i830_setup(void)
{
phys_addr_t reg_addr;
reg_addr = pci_resource_start(intel_private.pcidev, I810_MMADR_BAR);
intel_private.registers = ioremap(reg_addr, KB(64));
if (!intel_private.registers)
return -ENOMEM;
intel_private.gtt_phys_addr = reg_addr + I810_PTE_BASE;
return 0;
} | false | false | false | false | false | 0 |
fill_rarentry(struct archive *arch, struct entry *ent,
struct rar_entinfo *ei)
{
struct rarnode *info;
struct archnode *nod;
int isdir = AV_ISDIR(rar_get_mode(ei, 0));
nod = av_arch_new_node(arch, ent, isdir);
nod->st.mode = rar_get_mode(ei, nod->st.mode);
nod->st.mtim... | false | false | false | false | false | 0 |
nma_mobile_providers_database_new_sync (const gchar *country_codes,
const gchar *service_providers,
GCancellable *cancellable,
GError **error)
{
GObject *out;
out = g_initable_new (NMA_TYPE_MOBILE_... | false | false | false | false | false | 0 |
amdgpu_irq_update(struct amdgpu_device *adev,
struct amdgpu_irq_src *src, unsigned type)
{
unsigned long irqflags;
enum amdgpu_interrupt_state state;
int r;
spin_lock_irqsave(&adev->irq.lock, irqflags);
/* we need to determine after taking the lock, otherwise
we might disable just enabled interrupts ... | false | false | false | false | false | 0 |
checkend(s)
char* s;
/* returns 1 if we are at the end of the line 0 otherwise */
/* used when we encounter '\' '*' or other special line end characters */
{
char* p;
int atend;
p = s;
skipspace(&p);
if (*p == '\0') {
atend = 1;
} else {
atend = 0;
};
return(atend);
} | false | false | false | false | false | 0 |
belowmouse(Fl_Widget *o) {
if (grab()) return; // don't do anything while grab is on
Fl_Widget *p = belowmouse_;
if (o != p) {
belowmouse_ = o;
int old_event = e_number;
e_number = dnd_flag ? FL_DND_LEAVE : FL_LEAVE;
for (; p && !p->contains(o); p = p->parent()) {
p->handle(e_number);
}
... | false | false | false | false | false | 0 |
ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure (gpointer src, MonoReflectionType *type)
{
MonoClass *klass;
MONO_CHECK_ARG_NULL (src,);
MONO_CHECK_ARG_NULL (type,);
klass = mono_class_from_mono_type (type->type);
if (!mono_class_init (klass)) {
mono_set_pending_exception (mono_class_get_exce... | false | false | false | false | false | 0 |
prepare_sdp_description(FFStream *stream, uint8_t **pbuffer,
struct in_addr my_ip)
{
AVFormatContext *avc;
AVStream avs[MAX_STREAMS];
int i;
avc = avformat_alloc_context();
if (avc == NULL) {
return -1;
}
av_metadata_set(&avc->metadata, "title",
... | false | false | false | false | false | 0 |
set_damage(object *op, int type, int val) {
if (!op->discrete_damage) {
op->discrete_damage = calloc(1, sizeof(sint16)*NROFATTACKS);
}
op->discrete_damage[type] = val;
} | false | false | false | false | true | 1 |
writeMbelow()
{
if (fMbelow != 0) {
writeChar(fMbelow, fMbelowIndex, fMatraFeatures);
}
} | false | false | false | false | false | 0 |
ColorInt_SetFraction(GF_Node *node, GF_Route *route)
{
u32 i;
Fixed frac;
M_ColorInterpolator *_this = (M_ColorInterpolator *)node;
if (! _this->key.count) return;
if (_this->keyValue.count != _this->key.count) return;
// The given fraction is less than the specified range
if (_this->set_fraction < _this->ke... | false | false | false | false | false | 0 |
sci_port_link_down(struct isci_port *iport,
struct isci_phy *iphy)
{
enum sci_port_states state;
state = iport->sm.current_state_id;
switch (state) {
case SCI_PORT_SUB_OPERATIONAL:
sci_port_deactivate_phy(iport, iphy, true);
/* If there are no active phys left in the port, then
* transition the port t... | false | false | false | false | false | 0 |
epr_compute_scene_height(const EPR_SProductId* product_id) {
EPR_SDSD* dsd = NULL;
uint min_num_mds_recs = 0;
uint dsd_index;
if (product_id == NULL) {
epr_set_err(e_err_null_pointer,
"epr_compute_scene_height: product ID must not be NULL");
return (uint)0;
}
... | false | false | false | false | false | 0 |
show_VarAlloc(Bintree *bintree) {
if (bintree == NULL) {
return;
}
if(bintree->entry->kind == ENTRY_KIND_PROC
&& bintree->entry->u.procEntry.size_local_vars != PREDEF_PROC) {
printf("\nVariable allocation for procedure '%s'\n", symToString(bintree->sym));
show_args(bintree->entry->u.procEntry.pa... | false | false | false | false | false | 0 |
ct_describe(CS_COMMAND * cmd, CS_INT item, CS_DATAFMT * datafmt)
{
TDSSOCKET *tds;
TDSRESULTINFO *resinfo;
TDSCOLUMN *curcol;
int len;
tdsdump_log(TDS_DBG_FUNC, "ct_describe(%p, %d, %p)\n", cmd, item, datafmt);
if (!cmd->con || !cmd->con->tds_socket)
return CS_FAIL;
tds = cmd->con->tds_socket;
resinfo = td... | false | true | false | false | false | 1 |
get_current_balance(char * account, char * currency, int year)
{
int retval,col,cols;
char database_filename[STRING_BLOCK];
char query[STRING_BLOCK_LONG];
double total=0;
sqlite3_stmt *stmt;
sqlite3 *handle;
if (account_exists(account)==0) {
return 0;
}
if (year <= 0) {
sprintf((char*)query,... | true | true | false | false | false | 1 |
eina_hash_direct_add(Eina_Hash *hash, const void *key, const void *data)
{
int key_length;
int key_hash;
EINA_SAFETY_ON_NULL_RETURN_VAL(hash, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(hash->key_hash_cb, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(dat... | false | false | false | false | false | 0 |
e2_widget_add_table (GtkWidget *box, gint rows, gint cols,
gboolean homogen, gboolean exp, guint pad)
{
GtkWidget *table;
table = gtk_table_new (rows, cols, homogen);
if (box != NULL)
gtk_box_pack_start (GTK_BOX (box), table, exp, TRUE, pad);
gtk_widget_show (table);
return table;
} | 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.