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 |
|---|---|---|---|---|---|---|
jsm_carrier(struct jsm_channel *ch)
{
struct jsm_board *bd;
int virt_carrier = 0;
int phys_carrier = 0;
jsm_dbg(CARR, &ch->ch_bd->pci_dev, "start\n");
if (!ch)
return;
bd = ch->ch_bd;
if (!bd)
return;
if (ch->ch_mistat & UART_MSR_DCD) {
jsm_dbg(CARR, &ch->ch_bd->pci_dev, "mistat: %x D_CD: %x\n",
c... | false | false | false | false | false | 0 |
addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data)
{
int len = RTA_LENGTH(4);
struct rtattr *rta;
if (NLMSG_ALIGN(n->nlmsg_len) + len > maxlen)
return -1;
rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len));
rta->rta_type = type;
rta->rta_len = len;
memcpy(RTA_DATA(rta), &data, 4);
... | false | true | false | false | false | 1 |
update_group_times(struct perf_event *leader)
{
struct perf_event *event;
update_event_times(leader);
list_for_each_entry(event, &leader->sibling_list, group_entry)
update_event_times(event);
} | false | false | false | false | false | 0 |
lan78xx_get_wol(struct net_device *netdev,
struct ethtool_wolinfo *wol)
{
struct lan78xx_net *dev = netdev_priv(netdev);
int ret;
u32 buf;
struct lan78xx_priv *pdata = (struct lan78xx_priv *)(dev->data[0]);
if (usb_autopm_get_interface(dev->intf) < 0)
return;
ret = lan78xx_read_reg(dev, USB_CFG0, &buf... | false | false | false | false | false | 0 |
scalarmax_perform(t_int *w)
{
t_sample *in = (t_sample *)(w[1]);
t_float f = *(t_float *)(w[2]);
t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]);
while (n--)
{
t_sample g = *in++;
*out++ = (f > g ? f : g);
}
return (w+5);
} | false | false | false | false | false | 0 |
setFrameControlExecutionEnabled(const bool enabled)
{
d_pimpl->d_makeFrameControlCalls = enabled;
// default rendering requires _beginFrame and _endFrame calls be made,
// so if we're disabling those we must also disable default rendering.
if (!d_pimpl->d_makeFrameControlCalls)
setRenderingEnab... | false | false | false | false | false | 0 |
constant_color_quadrangle(patch_fill_state_t *pfs, const quadrangle_patch *p, bool self_intersecting)
{
patch_color_t *c[3];
byte *color_stack_ptr = reserve_colors_inline(pfs, c, 3);
int code;
if (color_stack_ptr == NULL)
return_error(gs_error_unregistered); /* Must not happen. */
code = co... | false | false | false | false | false | 0 |
search_cmd(char *arg)
{
int i;
if (! *arg)
return -1;
for (i = 0; i < numberof(ctrl_parms); i++) {
if (strcmp(arg, ctrl_parms[i].longcmd) == 0)
return i;
}
if (arg[1])
return -1;
for (i = 0; i < numberof(ctrl_parms); i++) {
if (*arg == ctrl_parms[i].shortcmd)
return i;
}
return -1;
} | false | false | false | false | false | 0 |
locate( pfs_name *name ) {
struct pfs_stat buf;
pfs_location *loc = NULL;
MYSQL *mysql_cxn = (MYSQL *)pfs_service_connect_cache(name);
debug(D_BXGRID, "locate %s", name->rest);
if (this->_stat(mysql_cxn, name, &buf) >= 0) {
const char *fileid, *replicaid;
char host[PFS_PATH_MAX], path[PFS_PATH_MAX], l... | false | false | false | false | false | 0 |
Command_load(Command *cmd)
{
bstring db_file = option(cmd, "db", "config.sqlite");
bstring conf_file = option(cmd, "config", "mongrel2.conf");
bstring what = NULL;
bstring why = NULL;
check_file(conf_file, "config file", R_OK);
Config_load(bdata(conf_file), bdata(db_file));
what = bfromcst... | false | false | false | false | false | 0 |
data_alloc(struct gfs2_inode *ip)
{
uint64_t x;
x = blk_alloc_i(ip->i_sbd, DATA);
ip->i_di.di_goal_data = x;
bmodified(ip->i_bh);
return x;
} | false | false | false | false | false | 0 |
custom_passwd_check(rfbClientPtr cl, const char *response, int len) {
char *input, *cmd;
char num[16];
int j, i, n, rc;
rfbLog("custom_passwd_check: len=%d\n", len);
if (!passwdfile || strstr(passwdfile, "custom:") != passwdfile) {
return FALSE;
}
cmd = passwdfile + strlen("custom:");
sprintf(num, "%d\n", ... | true | true | false | false | false | 1 |
_xfs_buf_free_pages(
xfs_buf_t *bp)
{
if (bp->b_pages != bp->b_page_array) {
kmem_free(bp->b_pages);
bp->b_pages = NULL;
}
} | false | false | false | false | false | 0 |
parseMappedAttribute(MappedAttribute* attr)
{
kDebug() << "parse:" << attr->localName() << attr->value() << endl;
if (attr->name() == SVGNames::xAttr)
xBaseValue()->parse(attr->value(), this, LengthModeWidth);
else if (attr->name() == SVGNames::yAttr)
yBaseValue()->parse(attr->value(), this,... | false | false | false | false | false | 0 |
coro_times_add (struct coro *c)
{
c->t_real [1] += time_real [1];
if (c->t_real [1] > 1000000000) { c->t_real [1] -= 1000000000; ++c->t_real [0]; }
c->t_real [0] += time_real [0];
c->t_cpu [1] += time_cpu [1];
if (c->t_cpu [1] > 1000000000) { c->t_cpu [1] -= 1000000000; ++c->t_cpu [0]; }
c->t_cpu [0]... | false | false | false | false | false | 0 |
print_cp(ContentParticle cp, FILE16 *f)
{
int i;
switch(cp->type)
{
case CP_pcdata:
Fprintf(f, "#PCDATA");
break;
case CP_name:
Fprintf(f, "%S", cp->name);
break;
case CP_seq:
case CP_choice:
Fprintf(f, "(");
for(i=0; i<cp->nchildren; i++)
{
if(i != 0)
Fprintf(f, cp->type == C... | false | false | false | false | false | 0 |
sysfs_remove_dir(struct kobject *kobj)
{
struct kernfs_node *kn = kobj->sd;
/*
* In general, kboject owner is responsible for ensuring removal
* doesn't race with other operations and sysfs doesn't provide any
* protection; however, when @kobj is used as a symlink target, the
* symlinking entity usually does... | false | false | false | false | false | 0 |
CleanOverviewLevel(int nOvrFactor)
{
CPLString osSQL;
if (nLevel != 0)
return CE_Failure;
/* -------------------------------------------------------------------- */
/* Find the index of the overview matching the overview factor */
/* ------------------------------------------... | false | false | false | false | false | 0 |
in_and_out(const char **jsons) {
char result[256];
ojcVal val;
struct _ojcErr err;
const char **jp;
for (jp = jsons; 0 != *jp; jp++) {
ojc_err_init(&err);
val = ojc_parse_str(&err, *jp, 0, 0);
if (ut_handle_error(&err)) {
return;
}
ojc_fill(&err, val, 0, result, sizeof(result) - 1);
u... | false | false | false | false | false | 0 |
_elapsed_time(long secs, long usecs)
{
long days, hours, minutes, seconds;
long subsec = 0;
char *str = NULL;
if (secs < 0 || secs == (long)NO_VAL)
return NULL;
while (usecs >= 1E6) {
secs++;
usecs -= 1E6;
}
if (usecs > 0) {
/* give me 3 significant digits to tack onto the sec */
subsec = (usecs/... | false | false | false | false | false | 0 |
match(p)
int p;
{
char srcchar, dstchar;
int lev, step;
while((lev = scan(6,'=',core[p],srcpatt)) >= 6 && core[p] != EOL)
p++;
if (lev < 6) {
srcchar = srcpatt[lev];
dstchar = dstpatt[lev];
step = setstep[lev&1];
lev = 0;
while (p >= 0 && p < bufmax) {
p += step;
if (core[p] == srcc... | false | false | false | false | false | 0 |
EmbedGivenNulls(void *cell, char *nulls, RASTER_MAP_TYPE map_type,
int ncols)
{
CELL *c;
FCELL *f;
DCELL *d;
int i;
c = (CELL *) cell;
f = (FCELL *) cell;
d = (DCELL *) cell;
for (i = 0; i < ncols; i++) {
if (nulls[i]) {
switch (map_type) {
case CELL_TYPE:
G_set_c_nu... | false | false | false | false | false | 0 |
SV_CalcPings (void)
{
int i, j;
client_t *cl;
int total, count;
for (i=0 ; i<maxclients->integer ; i++)
{
cl = &svs.clients[i];
if (cl->state != cs_spawned )
continue;
#if 0
if (cl->lastframe > 0)
cl->frame_latency[sv.framenum&(LATENCY_COUNTS-1)] = sv.framenum - cl->lastframe + 1;
... | false | false | false | false | false | 0 |
purge_stale(WU_RESULT& wu_result) {
DB_WORKUNIT wu;
wu.id = wu_result.workunit.id;
if (wu_result.workunit.hr_class) {
char buf[256];
sprintf(buf,
"hr_class=0, target_nresults=target_nresults+1, transition_time=%ld",
time(0)
);
wu.update_field(buf);
... | false | false | false | false | false | 0 |
bfa_ioc_ct2_reg_init(struct bfa_ioc_s *ioc)
{
void __iomem *rb;
int port = bfa_ioc_portid(ioc);
rb = bfa_ioc_bar0(ioc);
ioc->ioc_regs.hfn_mbox = rb + ct2_reg[port].hfn_mbox;
ioc->ioc_regs.lpu_mbox = rb + ct2_reg[port].lpu_mbox;
ioc->ioc_regs.host_page_num_fn = rb + ct2_reg[port].hfn_pgn;
ioc->ioc_regs.hfn_mbox... | false | false | false | false | false | 0 |
gf_dump_config_flags (int fd)
{
int ret = 0;
ret = write (fd, "configuration details:\n", 23);
if (ret == -1)
goto out;
/* have argp */
#ifdef HAVE_ARGP
ret = write (fd, "argp 1\n", 7);
if (ret == -1)
goto out;
#endif
/* ifdef if found backtrace... | false | false | false | false | false | 0 |
gf_mo_is_muted(GF_MediaObject *mo)
{
Bool res = 0;
#ifndef GPAC_DISABLE_VRML
if (!gf_odm_lock_mo(mo)) return 0;
res = mo->odm->media_ctrl ? mo->odm->media_ctrl->control->mute : 0;
gf_odm_lock(mo->odm, 0);
#endif
return res;
} | false | false | false | false | false | 0 |
ssh_chat(gint fd) {
int seen;
gchar lastseen[MAXEXP];
int first_time = 1;
/* We've already got the password here from the mainline, so there's
* no delay between asking for the userid, and the ssh session asking for a
* password. That's why we need the "first_time" variable. If a
* pa... | false | false | false | false | false | 0 |
crackArgv(fxStr& s)
{
u_int i = 0;
do {
while (i < s.length() && !isspace(s[i])) i++;
if (i < s.length()) {
s[i++] = '\0';
u_int j = i;
while (j < s.length() && isspace(s[j])) j++;
if (j > i) {
s.remove(i, j - i);
}
... | false | false | false | false | false | 0 |
xfs_log_commit_cil(
struct xfs_mount *mp,
struct xfs_trans *tp,
xfs_lsn_t *commit_lsn,
bool regrant)
{
struct xlog *log = mp->m_log;
struct xfs_cil *cil = log->l_cilp;
/* lock out background commit */
down_read(&cil->xc_ctx_lock);
xlog_cil_insert_items(log, tp);
/* check we didn't blow the reservation... | false | false | false | false | false | 0 |
gntdev_ioctl_unmap_grant_ref(struct gntdev_priv *priv,
struct ioctl_gntdev_unmap_grant_ref __user *u)
{
struct ioctl_gntdev_unmap_grant_ref op;
struct grant_map *map;
int err = -ENOENT;
if (copy_from_user(&op, u, sizeof(op)) != 0)
return -EFAULT;
pr_debug("priv %p, del %d+%d\n", priv, (int)op.index, (int)... | false | false | false | false | false | 0 |
download_send_udp_push(
const struct array packet, host_addr_t addr, uint16 port)
{
bool success = FALSE;
if (host_is_valid(addr, port)) {
struct gnutella_node *n;
n = node_udp_get_addr_port(addr, port);
if (n) {
success = TRUE;
udp_send_msg(n, packet.data, packet.size);
}
}
return success;
} | false | false | false | false | false | 0 |
getAttribute (std::string name) {
for (unsigned int i = 0 ; i < attributes.size() ; i++) {
if (attributes[i]->name == name) {
return attributes[i]->value ;
}
}
throw XMLException ("No such attribute %s", name.c_str()) ;
} | false | false | false | false | false | 0 |
shell_init(GSList * modules)
{
if (shell) {
g_error("Shell already created");
return;
}
DEBUG("initializing shell");
create_window();
shell_action_set_property("CopyAction", "is-important", TRUE);
shell_action_set_property("RefreshAction", "is-important", TRUE);
shell_action_set_propert... | false | false | false | false | false | 0 |
tfshark_get_frame_ts(void *data, guint32 frame_num)
{
capture_file *cf = (capture_file *) data;
if (ref && ref->num == frame_num)
return &ref->abs_ts;
if (prev_dis && prev_dis->num == frame_num)
return &prev_dis->abs_ts;
if (prev_cap && prev_cap->num == frame_num)
return &prev_cap->abs_ts;
if ... | false | false | false | false | false | 0 |
pch_gbe_napi_poll(struct napi_struct *napi, int budget)
{
struct pch_gbe_adapter *adapter =
container_of(napi, struct pch_gbe_adapter, napi);
int work_done = 0;
bool poll_end_flag = false;
bool cleaned = false;
netdev_dbg(adapter->netdev, "budget : %d\n", budget);
pch_gbe_clean_rx(adapter, adapter->rx_ring... | false | false | false | false | false | 0 |
gst_tag_demux_set_src_caps (GstTagDemux * tagdemux, GstCaps * new_caps)
{
GstCaps *old_caps = tagdemux->priv->src_caps;
if (old_caps == NULL || !gst_caps_is_equal (new_caps, old_caps)) {
GstEvent *event;
guint group_id;
gboolean have_group_id;
gchar *stream_id = gst_pad_create_stream_id (tagdemux->... | false | false | false | false | false | 0 |
mul_sub_row (GelCtx *ctx, GelMatrixW *m, int row, mpw_t mul, int row2)
{
int i, w;
static mpw_t tmp;
static gboolean tmp_inited = FALSE;
gboolean ret = TRUE;
/* no need for this, only used within gauss and matrix is already private
gel_matrixw_make_private(m);*/
if G_UNLIKELY ( ! tmp_inited) {
mpw_init(tmp... | false | false | false | false | false | 0 |
ss__gth_browser_update_sensitivity_cb (GthBrowser *browser)
{
BrowserData *data;
GtkTreeModel *file_store;
gboolean sensitive;
data = g_object_get_data (G_OBJECT (browser), BROWSER_DATA_KEY);
g_return_if_fail (data != NULL);
file_store = gth_file_view_get_model (GTH_FILE_VIEW (gth_browser_get_file_list_vi... | false | false | false | false | false | 0 |
wait_for_response(int timeout)
{
static struct message m;
mout = &m;
while(mout && timeout) {
gui_run_a_little(&timeout);
}
mout = NULL;
return &m;
} | false | false | false | false | false | 0 |
scg_edit_stop (SheetControlGUI *scg)
{
g_return_if_fail (IS_SHEET_CONTROL_GUI (scg));
scg_rangesel_stop (scg, FALSE);
SCG_FOREACH_PANE (scg, pane, gnm_pane_edit_stop (pane););
} | false | false | false | false | false | 0 |
LoadHetTable(TMPQArchive * ha)
{
TMPQExtTable * pExtTable;
TMPQHeader * pHeader = ha->pHeader;
int nError = ERROR_SUCCESS;
// If the HET table position is not NULL, we expect
// both HET and BET tables to be present.
if(pHeader->HetTablePos64 != 0)
{
// Attempt to load the... | false | false | false | false | false | 0 |
AcceptChanged(GtkWidget * UNUSED(pw), movefiltersetupwidget * pmfsw)
{
int fFound;
unsigned int i;
movefilter aamf[MAX_FILTER_PLIES][MAX_FILTER_PLIES];
/* see if current settings match a predefined one */
fFound = FALSE;
MoveFilterSetupGetValues(aamf[0], pmfsw);
for (i = 0; i < NUM_MOVE... | false | false | false | false | false | 0 |
getBInvCol(int col, double* vec)
{
if (!rowArray_[0]) {
printf("ClpSimplexPrimal or ClpSimplexDual must have been called with correct startFinishOption\n");
abort();
}
CoinIndexedVector * rowArray0 = rowArray(0);
CoinIndexedVector * rowArray1 = rowArray(1);
rowArray0->clear(... | false | false | false | false | false | 0 |
checkScale(GraphView const *gv, bool fixed)
{
vector<DeterministicNode *> const &dnodes = gv->deterministicChildren();
set<Node const*> ancestors;
//FIXME: valid for multiple nodes?
#ifdef _RWSTD_NO_MEMBER_TEMPLATES
//Workaround for Solaris libCstd
for (vector<StochasticNode const *>::const_ite... | false | false | false | false | false | 0 |
validate( QString &input, int &pos ) const
{
return input.isEmpty() ? QValidator::Acceptable : QSpinBox::validate( input, pos );
} | false | false | false | false | false | 0 |
page_getlink(struct dentry * dentry, struct page **ppage)
{
char *kaddr;
struct page *page;
struct address_space *mapping = dentry->d_inode->i_mapping;
page = read_mapping_page(mapping, 0, NULL);
if (IS_ERR(page))
return (char*)page;
*ppage = page;
kaddr = kmap(page);
nd_terminate_link(kaddr, dentry->d_inode-... | false | false | false | false | false | 0 |
L23()
{register object *base=vs_base;
register object *sup=base+VM23; VC23
vs_check;
{object V120;
object V121;
V120=(base[0]);
V121=(base[1]);
vs_top=sup;
goto TTL;
TTL:;
{register object x= CMPcar((V121)),V122= ((object)VV[13]);
while(V122!=Cnil)
if(eql(x,V122->c.c_car)){
goto T321;
}else V122=V122->c.c_... | false | false | false | false | false | 0 |
ast_cdr_fork(struct ast_channel *chan, struct ast_flags optflags, char *set)
{
struct ast_cdr *cdr;
struct ast_cdr *newcdr;
struct ast_flags flags = { AST_CDR_FLAG_KEEP_VARS };
cdr = ast_channel_cdr(chan);
while (cdr->next)
cdr = cdr->next;
if (!(newcdr = ast_cdr_dup_unique(cdr)))
return;
/*
* End t... | true | true | false | false | false | 1 |
Strtod(Vector<const char> buffer, int exponent) {
char copy_buffer[kMaxSignificantDecimalDigits];
Vector<const char> trimmed;
int updated_exponent;
TrimAndCut(buffer, exponent, copy_buffer, kMaxSignificantDecimalDigits,
&trimmed, &updated_exponent);
exponent = updated_exponent;
double guess;
... | false | false | false | false | false | 0 |
length_HDB_Ext_PKINIT_cert(const HDB_Ext_PKINIT_cert *data)
{
size_t ret = 0;
{
size_t Top_tag_oldret = ret;
unsigned int n_Top_tag;
ret = 0;
for(n_Top_tag = (data)->len; n_Top_tag > 0; --n_Top_tag){
size_t Top_tag_for_oldret = ret;
ret = 0;
{
size_t Top_tag_S_Of_tag_oldret = ret;
ret = 0;
ret += der_length_octet_strin... | false | false | false | false | false | 0 |
makeCharClass(unsigned char *cclass)
{
unsigned char bits[32];
setter set;
int c, prev= -1;
static char string[256];
char *ptr;
if ('^' == *cclass)
{
memset(bits, 255, 32);
set= charClassClear;
++cclass;
}
else
{
memset(bits, 0, 32);
... | false | false | false | false | false | 0 |
jl_checked_assignment(jl_binding_t *b, jl_value_t *rhs)
{
if (b->constp && b->value != NULL) {
//jl_errorf("cannot redefine constant %s", b->name->name);
ios_printf(ios_stderr, "Warning: redefinition of constant %s ignored\n",
b->name->name);
}
else {
b->value = rh... | false | false | false | false | false | 0 |
lammps_open(int argc, char **argv, MPI_Comm communicator, void **ptr)
{
LAMMPS *lmp = new LAMMPS(argc,argv,communicator);
*ptr = (void *) lmp;
} | false | false | false | false | false | 0 |
password_get_size(const char *filename)
{
size_t ret = 0;
FILE *fp = NULL;
char input[MAX_LINE_LENGTH];
bool do_loop = true;
DENTER(TOP_LAYER, "password_get_size");
fp = fopen(filename, "r");
if (fp != NULL) {
while (do_loop) {
if (get_file_line_size(fp) > MAX_LINE_LENGTH) {
... | true | true | false | false | true | 1 |
caribou_keyboard_model_on_group_changed (CaribouKeyboardModel* self, guint grpid, const gchar* group, const gchar* variant) {
gchar* group_name = NULL;
const gchar* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
gchar* _tmp2_ = NULL;
GeeHashMap* _tmp3_ = NULL;
const gchar* _tmp4_ = NULL;
gpointer _tmp5_ = NULL;
Car... | false | false | false | false | false | 0 |
dv_encode_metadata(uint8_t *target, int isPAL, int is16x9, time_t *datetime, int frame)
{
int numDIFseq;
int ds;
struct tm now_t;
numDIFseq = isPAL ? 12 : 10;
if (frame % (isPAL ? 25 : 30) == 0) {
(*datetime)++;
}
if (localtime_r(datetime, &now_t) != NULL )
{
for (ds = 0; ds < numDIFseq; ds++) {
targ... | false | false | false | false | false | 0 |
setSelected(size_t start, size_t end, bool selected)
{
/// If there are no TextFields, there is nothing to do.
if (_textFields.empty()) return;
start = std::min(start, _count);
end = std::min(end, _count);
TextFields::const_iterator field = _textFields.begin();
size_t totalChars = field->firs... | false | false | false | false | false | 0 |
flagsMint2Host(uint16 flags)
{
int res = O_RDONLY;
/* exclusive */
if (flags & 0x1)
res = O_WRONLY;
if (flags & 0x2)
res = O_RDWR;
if ((flags & 0x3) == 0x3) /* FreeMiNT kernel O_EXEC */
res = O_RDONLY;
if (flags & 0x200)
res |= O_CREAT;
if (flags & 0x400)
res |= O_TRUNC;
if (flags & 0x800)
res |= ... | false | false | false | false | false | 0 |
checkSupportedFormats(GstCaps *caps)
{
gint num_structs;
num_structs = gst_caps_get_size (caps);
bool ok = false;
for (gint i = 0; i < num_structs; i++) {
GstStructure *structure;
//this structure is used to probe the source for information
structure = gst_cap... | false | false | false | false | false | 0 |
allocate()
{
allocated = 1;
int n = atom->ntypes;
memory->create(setflag,n+1,n+1,"pair:setflag");
for (int i = 1; i <= n; i++)
for (int j = i; j <= n; j++)
setflag[i][j] = 0;
memory->create(cutsq,n+1,n+1,"pair:cutsq");
} | false | false | false | false | false | 0 |
app_new(void *handle, BOOL multithread)
{
GSview *a = (GSview *)malloc(sizeof(GSview));
if (a) {
memset(a, 0, sizeof(GSview));
a->handle = handle;
a->multithread = multithread;
app_init(a);
app_ref(a); /* caller has reference to app */
}
return a;
} | false | false | false | false | false | 0 |
try(const char *testCp) {
size_t res;
char *inbuf = (char *)testString;
size_t inbufLen = 2*sizeof(wchar_t);
char outbuf[3];
char *outbufP = outbuf;
size_t outbufLen = 2*sizeof(char);
iconv_t test;
int i;
for(i=0; i < sizeof(asciiTries) / sizeof(asciiTries[0]); i++) {
test = iconv_open(asciiTries[i], testC... | true | true | false | false | false | 1 |
dp_get_selection(DirPane *dp)
{
GSList *sel = NULL;
no_repeat = FALSE;
if(dp->dbclk_row != -1)
sel = append_row(sel, dp, dp->dbclk_row);
else
gtk_tree_selection_selected_foreach(gtk_tree_view_get_selection(GTK_TREE_VIEW(dp->view)), cb_append_row, &sel);
if(sel)
fam_rescan_block();
sel = g_slist_reverse(s... | false | false | false | false | false | 0 |
cbf_require_diffrn_id (cbf_handle handle, const char **diffrn_id, const char *default_id)
{
cbf_failnez (cbf_require_category (handle, "diffrn"));
cbf_failnez (cbf_require_column (handle, "id"));
cbf_failnez (cbf_require_value (handle, diffrn_id, default_id))
return 0;
} | false | false | false | false | false | 0 |
fd_safer_flag (int fd, int flag)
{
if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
{
int f = dup_safer_flag (fd, flag);
int e = errno;
close (fd);
errno = e;
fd = f;
}
return fd;
} | false | false | false | false | false | 0 |
pgstat_recv_tabpurge(PgStat_MsgTabpurge *msg, int len)
{
PgStat_StatDBEntry *dbentry;
int i;
dbentry = pgstat_get_db_entry(msg->m_databaseid, false);
/*
* No need to purge if we don't even know the database.
*/
if (!dbentry || !dbentry->tables)
return;
/*
* Process all table entries in the message.
... | false | false | false | false | false | 0 |
InitTopDown(ARCInstKind Kind, Instruction *I) {
bool NestingDetected = false;
// Don't do retain+release tracking for ARCInstKind::RetainRV, because
// it's
// better to let it remain as the first instruction after a call.
if (Kind != ARCInstKind::RetainRV) {
// If we see two retains in a row on the same ... | false | false | false | false | false | 0 |
select(const int &tableref, const QList<int> &fieldsref, const QHash<int, QString> & conditions) const
{
QString toReturn;
QString tmp;
foreach(const int & i, fieldsref)
tmp += "`" + table(tableref) + "`.`" + fieldName(tableref, i)+ "`, ";
if (tmp.isEmpty())
return QString::null;
tmp... | false | false | false | false | false | 0 |
mwa_config_init(server_rec *server, struct server_config *bconf, apr_pool_t *p)
{
struct server_config *sconf;
int status;
sconf = ap_get_module_config(server->module_config, &webauth_module);
CHECK_DIRECTIVE(keyring_path, Keyring, NULL);
CHECK_DIRECTIVE(keytab_path, Keytab, ... | false | false | false | false | false | 0 |
journal_join_abort(struct reiserfs_transaction_handle *th,
struct super_block *sb)
{
struct reiserfs_transaction_handle *cur_th = current->journal_info;
/*
* this keeps do_journal_end from NULLing out the
* current->journal_info pointer
*/
th->t_handle_save = cur_th;
BUG_ON(cur_th && cur_th->t_refco... | false | false | false | false | false | 0 |
exec_prog(const char *log_file, const char *opt_log_file,
bool throw_error, const char *fmt,...)
{
int result = 0;
int written;
#define MAXCMDLEN (2 * MAXPGPATH)
char cmd[MAXCMDLEN];
FILE *log;
va_list ap;
#ifdef WIN32
static DWORD mainThreadId = 0;
/* We assume we are called from the primary thr... | true | true | false | false | true | 1 |
test_book_use_trading_accounts( Fixture *fixture, gconstpointer pData )
{
const char *slot_path;
/* create correct slot path */
slot_path = (const char *) g_strconcat( KVP_OPTION_PATH, "/", OPTION_SECTION_ACCOUNTS, "/", OPTION_NAME_TRADING_ACCOUNTS, NULL );
g_assert( slot_path != NULL );
g_test_me... | false | false | false | false | false | 0 |
xmlRelaxNGCompareNameClasses(xmlRelaxNGDefinePtr def1,
xmlRelaxNGDefinePtr def2)
{
int ret = 1;
xmlNode node;
xmlNs ns;
xmlRelaxNGValidCtxt ctxt;
memset(&ctxt, 0, sizeof(xmlRelaxNGValidCtxt));
ctxt.flags = FLAGS_IGNORABLE | FLAGS_NOERROR;
if ((def1->type == XM... | false | false | false | false | false | 0 |
atk_object_notify_state_change (AtkObject *accessible,
AtkState state,
gboolean value)
{
const gchar* name;
g_return_if_fail (ATK_IS_OBJECT (accessible));
name = atk_state_type_get_name (state);
g_signal_emit (accessible, atk_object_signals[STA... | false | false | false | false | false | 0 |
da_qif_tran_destroy(QifContext *ctx)
{
GList *qiflist = g_list_first(ctx->q_tra);
while (qiflist != NULL)
{
QIF_Tran *item = qiflist->data;
da_qif_tran_free(item);
qiflist = g_list_next(qiflist);
}
g_list_free(ctx->q_tra);
ctx->q_tra = NULL;
} | false | false | false | false | false | 0 |
big_check_start(DBM *db)
{
DBMBIG *dbg = db->big;
long i;
sdbm_big_check(dbg);
if (-1 == dbg->fd && -1 == big_open(db))
return FALSE;
if (dbg->bitcheck != NULL)
return TRUE;
/*
* The array of bitmaps is zeroed, with all the bits corresponding to each
* bitmap page (the bit 0) set.
*
* Looping over... | false | false | false | false | false | 0 |
iwl_sta_ucode_deactivate(struct iwl_priv *priv, u8 sta_id)
{
lockdep_assert_held(&priv->sta_lock);
/* Ucode must be active and driver must be non active */
if ((priv->stations[sta_id].used &
(IWL_STA_UCODE_ACTIVE | IWL_STA_DRIVER_ACTIVE)) !=
IWL_STA_UCODE_ACTIVE)
IWL_ERR(priv, "removed non active STA... | false | false | false | false | false | 0 |
save_as_ppm(gchar *file,GdkPixbuf * pb)
{
FILE *f;
int w= gdk_pixbuf_get_width(pb);
int h= gdk_pixbuf_get_height(pb);
if( gdk_pixbuf_get_n_channels(pb) != 3) {
show_error
(g_strdup_printf
( " cant save as .ppm :-( the image has %d channels",
gdk_pixbuf_get_n_channels(pb) ));
retu... | false | false | false | false | true | 1 |
getColor( PGVertex *vertex )
{
if (vertex->subformula->type == PT_GFP) {
if (vertex->subformula->AD % 2 == 0) {
return vertex->subformula->AD;
} else {
return vertex->subformula->AD + 1;
}
} else if (vertex->subformula->type == PT_LFP) {
if (vertex->subformula->AD % 2 == 0) {
return vertex->subformul... | false | false | false | false | false | 0 |
tomoyo_encode(const char *str)
{
return str ? tomoyo_encode2(str, strlen(str)) : NULL;
} | false | false | false | false | false | 0 |
sp_color_selector_destroy( GtkObject *object )
{
SPColorSelector *csel = SP_COLOR_SELECTOR( object );
if ( csel->base )
{
delete csel->base;
csel->base = 0;
}
if ( (GTK_OBJECT_CLASS(parent_class))->destroy ) {
(* (GTK_OBJECT_CLASS(parent_class))->destroy)(obj... | false | false | false | false | false | 0 |
check_datamod_command (CMD *cmd, const char *s)
{
cmd->aux = dataset_op_from_string(cmd->param);
if (cmd->aux == DS_NONE) {
cmd->err = E_PARSE;
} else if (cmd->aux != DS_SORTBY && cmd->aux != DS_DSORTBY) {
/* skip param word and space */
s += strcspn(s, " ");
s += strspn(s, " ");
free(cmd->param);
cm... | false | false | false | false | false | 0 |
xps_end_opacity(xps_document *doc, char *base_uri, xps_resource *dict,
char *opacity_att, xml_element *opacity_mask_tag)
{
if (!opacity_att && !opacity_mask_tag)
return;
if (doc->opacity_top > 0)
doc->opacity_top--;
if (opacity_mask_tag)
{
if (strcmp(xml_tag(opacity_mask_tag), "SolidColorBrush"))
fz_pop... | false | false | false | false | false | 0 |
open (const ACE_Addr &remote,
const ACE_Addr &local,
int protocol_family,
int protocol)
{
ACE_TRACE ("ACE_LSOCK_CODgram::open");
if (ACE_SOCK_CODgram::open (remote, local, protocol_family,
protocol) == -1)
r... | false | false | false | false | false | 0 |
s_TellSaveFailed(XAP_Frame * pFrame, const char * fileName, UT_Error errorCode)
{
XAP_String_Id String_id;
switch(errorCode) {
case UT_SAVE_CANCELLED: // We actually don't have a write error
return;
case UT_SAVE_WRITEERROR: // We have a write error
String_id = AP_STRING_ID_MSG_SaveFailedW... | false | false | false | false | false | 0 |
stm_block(RefPortugolAST _t) {
RefPortugolAST stm_block_AST_in = (_t == RefPortugolAST(ASTNULL)) ? RefPortugolAST(ANTLR_USE_NAMESPACE(antlr)nullAST) : _t;
writeInitStms();
try { // for error handling
RefPortugolAST __t37 = _t;
RefPortugolAST tmp15_AST_in = _t;
match(ANTLR_USE_NAMESPACE(antlr)RefAST(_t),... | false | false | false | false | false | 0 |
check_colorcolumn(wp)
win_T *wp;
{
char_u *s;
int col;
int count = 0;
int color_cols[256];
int i;
int j = 0;
if (wp->w_buffer == NULL)
return NULL; /* buffer was closed */
for (s = wp->w_p_cc; *s != NUL && count < 255;)
{
if (*s == '-' || *s == '+')
{
/* -N and +N... | false | false | false | false | false | 0 |
free_memory()
{
//cerr << "FREEING " << commands.size() << " com\n";
for (unsigned int i = 0; i < commands.size(); ++i)
delete commands[i];
} | false | false | false | false | false | 0 |
sfip_ismapped(const sfip_t *ip) {
const unsigned int *p;
ARG_CHECK1(ip, 0);
if(sfip_family(ip) == AF_INET)
return 0;
p = ip->ip32;
if(p[0] || p[1] || (ntohl(p[2]) != 0xffff && p[2] != 0)) return 0;
return 1;
} | false | false | false | false | false | 0 |
pushand(Inst *f, Inst *l)
{
if(andp >= &andstack[NSTACK])
cant("operand stack overflow");
andp->first = f;
andp->last = l;
andp++;
} | false | false | false | false | false | 0 |
add_class(struct Class *classptr)
{
struct Class *tmpptr;
tmpptr = find_class(classptr->class_name);
if(tmpptr == default_class)
{
rb_dlinkAddAlloc(classptr, &class_list);
CurrUsers(classptr) = 0;
}
else
{
MaxUsers(tmpptr) = MaxUsers(classptr);
MaxLocal(tmpptr) = MaxLocal(classptr);
MaxGlobal(tmpptr)... | false | false | false | false | false | 0 |
dispatchMessage(const Message &msg)
{
if (!cancelled()) {
noteMessage(msg);
messenger_->dispatchMessage(msg);
}
} | false | false | false | false | false | 0 |
driverosrdch(L9BYTE* a6)
{
#ifdef L9DEBUG
printf("driver - driverosrdch");
#endif
os_flush();
if (Cheating) {
*a6 = '\r';
} else {
/* max delay of 1/50 sec */
*a6=os_readchar(20);
}
} | false | false | false | false | false | 0 |
get_default_i(int symbol)
{
if(check_symbol(symbol) < 0)
return 0;
switch(table[symbol]->typecode)
{
case CFG_NONE:
return 0;
case CFG_BOOL:
{
cfg_switch_t *k = (cfg_switch_t *)table[symbol];
return k->default_value ? 1 : 0;
}
case CFG_INT:
{
cfg_key_int_t *k = (cfg_key_int_t *)table[symb... | false | false | false | false | false | 0 |
_goc_plugin_services_shutdown (void)
{
g_slist_foreach (refd_plugins, (GFunc) go_plugin_use_unref, NULL);
g_slist_foreach (refd_plugins, (GFunc) g_object_unref, NULL);
g_slist_free (refd_plugins);
if (pending_engines)
g_hash_table_destroy (pending_engines);
if (mime_types)
g_hash_table_destroy (mime_types);
i... | false | false | false | false | false | 0 |
Sync(void) {
int i;
for (i = 0; i < 8; i++) setchr1(i << 10, creg[i]);
setprg8r(0x10, 0x6000, 0);
setprg8(0x8000, preg[0]);
setprg8(0xA000, preg[1]);
setprg8(0xC000, preg[2]);
setprg8(0xE000, ~0);
if (mirr & 2)
setmirror(MI_0);
else
setmirror(mirr & 1);
} | false | false | false | false | false | 0 |
sendMessage(int descriptor, const Message &message)
{
QMutexLocker locker(&m_mutex);
m_messageQueue.enqueue(QPair<int, Message>(descriptor, message));
QMetaObject::invokeMethod(this, "writeMessageQueue", Qt::QueuedConnection);
} | false | false | false | false | false | 0 |
Divide(Real r)
{
REPORT
int i = n; Real* s = store; int d = spacing;
// while (i--) { *s /= r; s += d; }
if (i) for (;;) { *s /= r; if (!(--i)) break; s += d; }
} | false | false | false | false | false | 0 |
searchNode(BTree* tree, uint32_t root, BTKey* searchKey, int *exact, uint32_t *nodeNumber, int *recordNumber) {
BTNodeDescriptor* descriptor;
BTKey* key;
off_t recordOffset;
off_t recordDataOffset;
off_t lastRecordDataOffset;
int res;
int i;
descriptor = readBTNodeDescriptor(root, tree);
if(... | 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.