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 |
|---|---|---|---|---|---|---|
html_output_tag(file_buff_t *fbuff, char *tag, tag_arguments_t *tags)
{
int i, j, len;
html_output_c(fbuff, '<');
html_output_str(fbuff, (const unsigned char*)tag, strlen(tag));
for (i=0; i < tags->count; i++) {
html_output_c(fbuff, ' ');
html_output_str(fbuff, tags->tag[i], strlen((const char*)tags->tag[i]));... | false | false | false | false | false | 0 |
setPriority(int prio)
{
if (runs) {
if (setpriority(PRIO_PROCESS, pid_, prio))
return false;
} else {
if (prio > 19 || prio < (geteuid() ? getpriority(PRIO_PROCESS, 0) : -20))
return false;
}
d->priority = prio;
return true;
} | false | false | false | false | false | 0 |
ajFeattableAdd(AjPFeattable thys, AjPFeature feature)
{
if(!(feature->Flags & AJFEATFLAG_REMOTEID) &&
!(feature->Flags & AJFEATFLAG_LABEL))
{
thys->Len = AJMAX(thys->Len, feature->Start);
thys->Len = AJMAX(thys->Len, feature->End);
}
ajListPushAppend(thys->Features, feature);
return;
} | false | false | false | false | false | 0 |
sge_bitfield_reset(bitfield *bf)
{
if (bf != NULL) {
if (bf->size > fixed_bits) {
unsigned int char_size = sge_bitfield_get_size_bytes(bf->size);
memset(bf->bf.dyn, 0, char_size);
} else {
bf->bf.dyn = (char *)0;
}
return true;
}
return false;
} | false | false | false | false | false | 0 |
musb_mlc_channel_read(mud_channel *pc, void *buf, int length, int sec_timeout, int *bytes_read)
{
mud_device *pd = &msp->device[pc->dindex];
enum HPMUD_RESULT stat = HPMUD_R_IO_ERROR;
*bytes_read=0;
if (pc->ta.p2hsize==0)
{
BUG("invalid channel_read state\n");
goto bugout;
}
if (pc->rcnt)
{
stat=HPMUD_R... | false | false | false | false | false | 0 |
reg_write(struct tda998x_priv *priv, u16 reg, u8 val)
{
struct i2c_client *client = priv->hdmi;
u8 buf[] = {REG2ADDR(reg), val};
int ret;
mutex_lock(&priv->mutex);
ret = set_page(priv, reg);
if (ret < 0)
goto out;
ret = i2c_master_send(client, buf, sizeof(buf));
if (ret < 0)
dev_err(&client->dev, "Error %... | false | false | false | false | false | 0 |
jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)
{
if (cinfo->global_state != CSTATE_START)
ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
/* Mark all tables to be written */
jpeg_suppress_tables(cinfo, FALSE);
/* (Re)initialize error mgr and destination modules */
(*c... | false | false | false | false | false | 0 |
parent_type_p (tree parent, tree child)
{
int i;
tree binfo, base_binfo;
if (TYPE_BINFO (parent))
for (binfo = TYPE_BINFO (parent), i = 0;
BINFO_BASE_ITERATE (binfo, i, base_binfo); i++)
{
tree binfotype = BINFO_TYPE (base_binfo);
if (binfotype == child)
return true;
else if (parent_type_p (binf... | false | false | false | false | false | 0 |
_nc_find_ext_name(TERMTYPE *tp, char *name, int token_type)
{
unsigned j;
unsigned first = _nc_first_ext_name(tp, token_type);
unsigned last = _nc_last_ext_name(tp, token_type);
for (j = first; j < last; j++) {
if (!strcmp(name, tp->ext_Names[j])) {
return j;
}
}
return -1;
} | false | false | false | false | false | 0 |
unmark() {
if (marked_) {
if (canvas_ != nil) {
do_damage(canvas_, left_, bottom_, right_, top_);
}
marked_ = false;
}
} | false | false | false | false | false | 0 |
b1_release_appl(struct capi_ctr *ctrl, u16 appl)
{
avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
avmcard *card = cinfo->card;
unsigned int port = card->port;
unsigned long flags;
spin_lock_irqsave(&card->lock, flags);
capilib_release_appl(&cinfo->ncci_head, appl);
b1_put_byte(port, SEND_RELEASE);
b... | false | false | false | false | false | 0 |
config_tool_entry_first( BackendDB *be )
{
CfBackInfo *cfb = be->be_private;
BackendInfo *bi = cfb->cb_db.bd_info;
if ( bi && bi->bi_tool_entry_first ) {
return bi->bi_tool_entry_first( &cfb->cb_db );
}
if ( bi && bi->bi_tool_entry_first_x ) {
return bi->bi_tool_entry_first_x( &cfb->cb_db,
NULL, LDAP_SCOPE... | false | false | false | false | false | 0 |
frame_set_compute(gint32 frame_id) {
if(!engine->active_frame[frame_id]) return;
frame[frame_id]->compute = 1;
} | false | false | false | false | false | 0 |
keyboard_command_watch (GIOChannel *source,
GIOCondition condition,
GSWindow *window)
{
gboolean finished = FALSE;
g_return_val_if_fail (GS_IS_WINDOW (window), FALSE);
if (condition & G_IO_IN) {
GIOStatus status;
... | false | false | false | false | false | 0 |
init_hack (struct state *st)
{
int i;
st->start_time = time ((time_t) 0);
st->zoom_box = calloc (st->num_zoom, sizeof (struct zoom_area *));
for (i = 0; i < st->num_zoom; i++) {
st->zoom_box[i] = create_zoom (st);
}
if (st->height && st->orig_map->data)
memcpy (st->buffer_map->data, st->orig_map->... | false | true | false | false | false | 1 |
mmap_file(int fd, char **addr, size_t size, int type)
{
int flags = 0;
*addr = mmap(NULL, size, PROT_READ|PROT_WRITE, flags | type, fd, 0);
if (*addr == MAP_FAILED)
return -1;
return 0;
} | false | false | false | false | false | 0 |
Java_ncsa_hdf_hdflib_HDFDeprecated_DFSDgetfillvalue
( JNIEnv *env,
jclass clss,
jbyteArray fill_value) /* OUT: some kind of number? */
{
intn rval;
jbyte *dat;
jboolean bb;
dat = (jbyte *)ENVPTR->GetByteArrayElements(ENVPAR fill_value,&bb);
if (dat == NULL) {
/* exception */
return... | false | false | false | false | false | 0 |
TimeMsec_CMP(time_t t1, uint16_t offset1, time_t t2, uint16_t offset2 ) {
if ( t1 > t2 )
return 1;
if ( t2 > t1 )
return 2;
// else t1 == t2 - offset is now relevant
if ( offset1 > offset2 )
return 1;
if ( offset2 > offset1 )
return 2;
else
// both times ... | false | false | false | false | false | 0 |
random_level (void)
{
/* tricky bit -- each bit is '1' 75% of the time */
long int bits = FcRandom () | FcRandom ();
int level = 0;
while (++level < FC_CACHE_MAX_LEVEL)
{
if (bits & 1)
break;
bits >>= 1;
}
return level;
} | false | false | false | false | false | 0 |
Refresh()
{
GdkRectangle t_Rect;
t_Rect.x = t_Rect.y = 0;
t_Rect.width = m_Widget->allocation.width;
t_Rect.height = m_Widget->allocation.height;
if (m_Widget->window)
gdk_window_invalidate_rect(m_Widget->window, &t_Rect, true);
} | false | false | false | false | false | 0 |
cache_manager_render_cb(GtkWidget *widget, gpointer data)
{
const gchar *path = layout_get_path(NULL);
if (!path || !*path) path = homedir();
cache_manager_render_dialog(widget, path);
} | false | false | false | false | false | 0 |
gt_gtf_to_gff3_runner(GT_UNUSED int argc, const char **argv,
int parsed_args, void *tool_arguments,
GtError *err)
{
GTFToGFF3Arguments *arguments = tool_arguments;
GtNodeStream *gtf_in_stream = NULL, *gff3_out_stream = NULL;
int had_err;
gt_erro... | false | false | false | false | false | 0 |
ajStrPasteCountK( AjPStr* Pstr, ajlong pos, char chr,
ajulong num)
{
AjPStr thys;
size_t ibegin;
size_t iend;
char* ptr1 = 0;
size_t i;
if(!*Pstr)
*Pstr = ajStrNewResLenC("", 1, 0);
else if((*Pstr)->Use > 1)
ajStrGetuniqueStr(Pstr);
thys = *Pstr... | false | false | false | false | false | 0 |
coeff(int narg, char **arg)
{
int i,j,n;
if (!allocated) allocate();
if (narg != 3 + atom->ntypes)
error->all(FLERR,"Incorrect args for pair coefficients");
// insure I,J args are * *
if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0)
error->all(FLERR,"Incorrect args for pair coefficients");
... | false | false | false | false | false | 0 |
macros_abort(void)
{
for (; playing; playing = playing->suspended)
playing->at = playing->bytes;
} | false | false | false | false | false | 0 |
git_add_config(const char *var, const char *value)
{
if (!strcmp(var, "core.excludesfile")) {
if (!value)
die("core.excludesfile without value");
excludes_file = xstrdup(value);
return 0;
}
return git_default_config(var, value);
} | false | false | false | false | false | 0 |
command_unsubscribe(char * token, Channel * c) {
char type[256];
int err = 0;
Subscription * s = NULL;
LINK * l;
json_read_string(&c->inp, type, sizeof(type));
if (read_stream(&c->inp) != 0) exception(ERR_JSON_SYNTAX);
if (read_stream(&c->inp) != MARKER_EOM) exception(ERR_JSON_SYNTAX);
... | true | true | false | false | false | 1 |
pm_print_active_wakeup_sources(void)
{
struct wakeup_source *ws;
int srcuidx, active = 0;
struct wakeup_source *last_activity_ws = NULL;
srcuidx = srcu_read_lock(&wakeup_srcu);
list_for_each_entry_rcu(ws, &wakeup_sources, entry) {
if (ws->active) {
pr_info("active wakeup source: %s\n", ws->name);
active =... | false | false | false | false | false | 0 |
act_sign(level *l, obstacle *o)
{
const char *message = get_obstacle_extension(l, o, OBSTACLE_EXTENSION_SIGNMESSAGE);
if (!message) {
message = "There is nothing on this sign.";
}
append_new_game_message("%s", message);
} | false | false | false | false | false | 0 |
setConfigItem(const char* tag, const char* value)
{
if (streq(tag, "faxnumber"))
FAXNumber = value;
else if (streq(tag, "localidentifier"))
localIdentifier = value;
else if (streq(tag, "speakervolume")) { // XXX duplicates code elsewhere
if (strcasecmp(value, "off") == 0)
speakerVolume = OFF;
else ... | false | false | false | false | false | 0 |
sd_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct gspca_dev *gspca_dev =
container_of(ctrl->handler, struct gspca_dev, ctrl_handler);
struct sd *sd = (struct sd *)gspca_dev;
gspca_dev->usb_err = 0;
if (!gspca_dev->streaming)
return 0;
switch (ctrl->id) {
case V4L2_CID_BRIGHTNESS:
setbrightness(gspca_dev, ctrl->... | false | false | false | false | false | 0 |
AddPeerCompact(const char *compact_addr,int len) const
{
sockaddr_u a;
if(!a.set_compact(compact_addr,len))
return false;
Enter(parent);
parent->AddPeer(new TorrentPeer(parent,&a,tracker_no));
Leave(parent);
return true;
} | false | false | false | false | false | 0 |
setFilter( const QString &filter )
{
DEBUG_BLOCK;
if( filter == m_filter )
return;
m_filter = filter;
invalidate();
emit changed( BiasPtr(this) );
} | false | false | false | false | false | 0 |
svcraw_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, void *args_ptr)
{
register struct svcraw_private *srp = svcraw_private;
register XDR *xdrs;
if (srp == 0)
return (FALSE);
xdrs = &srp->xdr_stream;
xdrs->x_op = XDR_FREE;
return ((*xdr_args)(xdrs, args_ptr));
} | false | false | false | false | false | 0 |
__vsp1_video_try_format(struct vsp1_video *video,
struct v4l2_pix_format_mplane *pix,
const struct vsp1_format_info **fmtinfo)
{
static const u32 xrgb_formats[][2] = {
{ V4L2_PIX_FMT_RGB444, V4L2_PIX_FMT_XRGB444 },
{ V4L2_PIX_FMT_RGB555, V4L2_PIX_FMT_XRGB555 },
{ V4L2_PIX_FMT_BGR32, V4L2_PIX_FMT_XB... | false | false | false | false | false | 0 |
seen_write(struct seen *seendb, const char *uniqueid, struct seendata *sd)
{
int sz = strlen(sd->seenuids) + 50;
char *data = xmalloc(sz);
int datalen;
int r;
assert(seendb && uniqueid);
if (SEEN_DEBUG) {
syslog(LOG_DEBUG, "seen_db: seen_write %s (%s)",
seendb->user, uniqueid);
}... | false | false | false | false | false | 0 |
init ( void )
{
if ( !initialized ) {
offset = 0;
sx = 10;
sy = 10;
int i;
for ( i = 0; i < sidenum; i++ ) {
sx = 10;
sy = 10;
getnextfield ( sx, sy, i );
dirs[i] = winkel ( 10, 10 );
}
offset = dirs[0];
for ( i = 0; i < sidenum; i... | false | false | false | false | false | 0 |
zd_iowrite16a_locked(struct zd_chip *chip,
const struct zd_ioreq16 *ioreqs, unsigned int count)
{
int r;
unsigned int i, j, t, max;
ZD_ASSERT(mutex_is_locked(&chip->mutex));
zd_usb_iowrite16v_async_start(&chip->usb);
for (i = 0; i < count; i += j + t) {
t = 0;
max = count-i;
if (max > USB... | false | false | false | false | false | 0 |
odf_push_text_p (OOParseState *state, gboolean permanent)
{
oo_text_p_t *ptr;
if (permanent) {
ptr = &(state->text_p_for_cell);
if (ptr->gstr)
g_string_truncate (ptr->gstr, 0);
if (ptr->attrs) {
pango_attr_list_unref (ptr->attrs);
ptr->attrs = NULL;
}
} else {
ptr = g_new0 (oo_text_p_t, 1);
ptr... | false | false | false | false | false | 0 |
MakeDir(Name)
char *Name;
{
struct stat Sb;
if (mkdir(Name, GROUPDIR_MODE) >= 0)
return TRUE;
/* See if it failed because it already exists. */
return stat(Name, &Sb) >= 0 && S_ISDIR(Sb.st_mode);
} | false | false | false | false | false | 0 |
remove_ftrace_ops(struct ftrace_ops **list, struct ftrace_ops *ops)
{
struct ftrace_ops **p;
/*
* If we are removing the last function, then simply point
* to the ftrace_stub.
*/
if (*list == ops && ops->next == &ftrace_list_end) {
*list = &ftrace_list_end;
return 0;
}
for (p = list; *p != &ftrace_list... | false | false | false | false | false | 0 |
compute_image_range(adv_mng_write* mng, unsigned* out_x, unsigned* out_y, unsigned* out_dx, unsigned* out_dy, unsigned char* img_ptr, unsigned img_scanline)
{
unsigned x;
unsigned dx;
unsigned y;
unsigned dy;
x = 0;
while (x < mng->width && col_equal(mng, x, img_ptr, img_scanline))
++x;
dx = mng->width - x;
... | false | false | false | false | false | 0 |
music_button_set_status (GvaMusicButton *music_button,
const gchar *status)
{
g_free (music_button->priv->status);
music_button->priv->status = g_strdup (status);
/* Rate-limit status notifications. */
if (music_button->priv->status_idle_id == 0)
... | false | false | false | false | false | 0 |
strcmp_chomp(char *str1, char *str2)
{
int i;
char s1[PARAMS_SIZE],s2[PARAMS_SIZE];
if(!str1 || !str2)
return 1;
strncpy(s1, str1, PARAMS_SIZE);
strncpy(s2, str2, PARAMS_SIZE);
for (i=strlen(s1)-1; i >=0 && isspace(s1[i]); --i) ;
s1[++i] = '\0';
for (i=strlen(s2)-1; i >=0 && isspace(s2[i]); --i) ;
s2[++i]... | true | true | false | false | false | 1 |
mxf_alaw_write_func (GstBuffer * buffer, GstCaps * caps, gpointer mapping_data,
GstAdapter * adapter, GstBuffer ** outbuf, gboolean flush)
{
ALawMappingData *md = mapping_data;
guint bytes;
guint64 speu =
gst_util_uint64_scale (md->rate, md->edit_rate.d, md->edit_rate.n);
md->error += (md->edit_rate.... | false | true | false | false | false | 1 |
setApplication(Plasma::Applet *applet, const QString &application)
{
KService::Ptr service = KService::serviceByDesktopName(application);
if (service || !KStandardDirs::findExe(application).isNull() || QFile::exists(application)) {
d->applicationNames[applet] = application;
if (!d->urlLists.cont... | false | false | false | false | false | 0 |
amdgpu_vm_manager_fini(struct amdgpu_device *adev)
{
unsigned i;
for (i = 0; i < AMDGPU_NUM_VM; ++i)
fence_put(adev->vm_manager.ids[i].active);
} | false | false | false | false | false | 0 |
gst_quarktv_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
GstCaps * outcaps)
{
GstQuarkTV *filter = GST_QUARKTV (btrans);
GstStructure *structure;
gboolean ret = FALSE;
structure = gst_caps_get_structure (incaps, 0);
GST_OBJECT_LOCK (filter);
if (gst_structure_get_int (structure, "width", &fi... | false | false | false | false | false | 0 |
FormatForPUTOrPost(const char* type, const char* uri, const char* contentType, const char* body, const char* extraHeaders)
{
RakString out;
RakString host;
RakString remotePath;
RakNet::RakString header;
RakString uriRs;
uriRs = uri;
uriRs.SplitURI(header, host, remotePath);
if (host.IsEmpty() || rem... | false | false | false | false | false | 0 |
cfi_intelext_restore_locks(struct mtd_info *mtd)
{
struct mtd_erase_region_info *region;
int block, i;
unsigned long adr;
size_t len;
for (i = 0; i < mtd->numeraseregions; i++) {
region = &mtd->eraseregions[i];
if (!region->lockmap)
continue;
for_each_clear_bit(block, region->lockmap, region->numblocks)... | false | false | false | false | false | 0 |
resize(int X, int Y, int W, int H) {
Fl_Widget::resize(X, Y, W, H);
// move the scrollbars so they can respond to events:
bbox(X,Y,W,H);
scrollbar.resize(
scrollbar.align()&FL_ALIGN_LEFT ? X-scrollbar_width_ : X+W,
Y, scrollbar_width_, H);
hscrollbar.resize(
X, scrollbar.align()&FL_ALIGN_TOP ? Y-scrollbar_... | false | false | false | false | false | 0 |
getVarName(int index) {
if (index < 0 || index > variables.size() - 1) {
return NULL;
} else {
return variables[index].name.c_str();
}
} | false | false | false | false | false | 0 |
sensors_get_label(const sensors_chip_name *name,
const sensors_feature *feature)
{
char *label;
const sensors_chip *chip;
char buf[PATH_MAX];
FILE *f;
int i;
if (sensors_chip_name_has_wildcards(name))
return NULL;
for (chip = NULL; (chip = sensors_for_all_config_chips(name, chip));)
for (i = 0; i < chip... | false | false | false | false | false | 0 |
RFCNB_Call(char *Called_Name, char *Calling_Name, char *Called_Address,
int port)
{ struct RFCNB_Con *con;
struct in_addr Dest_IP;
int Client;
BOOL redirect; struct redirect_addr *redir_addr;
char *Service_Address;
/* Now, we really should look up the port in /etc/services ... */
if (port == 0) port =... | false | false | false | false | false | 0 |
destroy_pattern_tree(struct match_char *pattern_tree) /* pattern tree is a simple binary tree, sort of, so the proper way to destroy it is... recursively! */
{
/* destroy all the alternates */
if (pattern_tree->alt_char) {
destroy_pattern_tree(pattern_tree->alt_char);
pattern_tree->alt_char = 0;
}
/* destroy al... | false | false | false | false | false | 0 |
tg3_validate_rxcpu_state(struct tg3 *tp)
{
const int iters = 1000;
int i;
u32 val;
/* Wait for boot code to complete initialization and enter service
* loop. It is then safe to download service patches
*/
for (i = 0; i < iters; i++) {
if (tr32(RX_CPU_HWBKPT) == TG3_SBROM_IN_SERVICE_LOOP)
break;
udelay... | false | false | false | false | false | 0 |
gtkhash_hash_file_add_source(struct hash_file_s *data)
{
g_mutex_lock(&data->priv.mutex);
g_assert(!data->priv.source);
data->priv.source = g_idle_add((GSourceFunc)gtkhash_hash_file_source_func,
data);
g_mutex_unlock(&data->priv.mutex);
} | false | false | false | false | false | 0 |
receivebits(int buf[], int num_of_bits) {
int cnt, num;
unsigned int lastbits, lastbyte;
unsigned char * cbuf;
int mask = (1 << num_of_bits) -1;
cbuf = ((unsigned char *)buf) + 3 * sizeof(*buf);
cnt = buf[0];
lastbits = (unsigned int) buf[1];
lastbyte = (unsigned int) buf[2];
num =... | false | false | false | false | false | 0 |
plugin_check_features(struct PluginFeature *features) {
int i = 0, j = 0;
GSList *cur = plugins;
if (features == NULL)
return NULL;
for(; cur; cur = cur->next) {
Plugin *p = (Plugin *)cur->data;
struct PluginFeature *cur_features = p->provides();
if (p->unloaded_hidden)
continue;
for (j = 0; cur_featu... | false | false | false | false | false | 0 |
get_and_process_data(int mode, snmp_info_t *su_info_p)
{
bool_t status = FALSE;
upsdebugx(1, "getting data: %s (%s)", su_info_p->info_type, su_info_p->OID);
/* ok, update this element. */
status = su_ups_get(su_info_p);
/* set stale flag if data is stale, clear if not. */
if (status == TRUE) {
if (su_info_p-... | false | false | false | false | false | 0 |
dfltRowColName (char rc, int ndx, unsigned digits) const
{ std::ostringstream buildName ;
if (!(rc == 'r' || rc == 'c' || rc == 'o'))
{ return (invRowColName('u',ndx)) ; }
if (ndx < 0)
{ return (invRowColName(rc,ndx)) ; }
if (digits <= 0)
{ digits = 7 ; }
if (rc == 'o')
{ std::string dfltObjName =... | false | false | false | false | false | 0 |
appledouble_read(struct afp_volume * volume, struct afp_file_info *fp,
char * buf, size_t size, off_t offset, size_t * amount_read,
int * eof)
{
int tocopy;
int ret;
struct afp_comment comment;
*amount_read=0;
*eof=0;
comment.data=malloc(size);
comment.maxsize=size;
switch(fp->resource) {
case AFP_META_RE... | false | false | false | false | true | 1 |
PredictorInverseTransform(const VP8LTransform* const transform,
int y_start, int y_end, uint32_t* data) {
const int width = transform->xsize_;
if (y_start == 0) { // First Row follows the L (mode=1) mode.
int x;
const uint32_t pred0 = Predictor0(data[-1], NULL);
Ad... | false | false | false | false | false | 0 |
am335x_phy_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct am335x_phy *am_phy = platform_get_drvdata(pdev);
phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, true);
if (device_may_wakeup(dev))
phy_ctrl_wkup(am_phy->phy_ctrl, am_phy->id, false);
return 0;
} | false | false | false | false | false | 0 |
is_integer(VALUE x)
{
return (RB_TYPE_P(x, T_FIXNUM) || RB_TYPE_P(x, T_BIGNUM));
} | false | false | false | false | false | 0 |
soap_instantiate_xsd__anyURI(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size)
{
(void)type; (void)arrayType; /* appease -Wall -Werror */
DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_xsd__anyURI(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:""));
struct soap_clist *cp = s... | false | false | false | false | false | 0 |
_bt_checkkeys(IndexScanDesc scan,
Page page, OffsetNumber offnum,
ScanDirection dir, bool *continuescan)
{
ItemId iid = PageGetItemId(page, offnum);
bool tuple_alive;
IndexTuple tuple;
TupleDesc tupdesc;
BTScanOpaque so;
int keysz;
int ikey;
ScanKey key;
*continuescan = true; /* default assu... | false | false | false | false | false | 0 |
win_graphics_redraw(window_t *win)
{
window_graphics_t *dwin = win->data;
int x, y;
int x0 = win->bbox.x0;
int y0 = win->bbox.y0;
if (dwin->dirty || gli_force_redraw)
{
dwin->dirty = 0;
if (!dwin->rgb)
return;
for (y = 0; y < dwin->h; y++)
... | false | false | false | false | false | 0 |
frame(const char *title,const char *btitle)
{
int err = OK;
if (!title && !btitle) {
err = box();
}
else {
err = box();
if (err==OK)
label(title,btitle);
}
OnError(err);
} | false | false | false | false | false | 0 |
libmod_25import_module(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj mod_scm;
ScmModule* mod;
ScmObj imported_scm;
ScmObj imported;
ScmObj prefix_scm;
ScmObj prefix;
ScmObj flags_scm;
u_long flags;
ScmObj SCM_SUBRARGS[6];
int SCM_i;
SCM_ENTER_SUBR("%import-module");
if (SCM_ARGCNT >= 5
... | false | false | false | false | false | 0 |
resolve(const std::vector<CdlConflict>& conflicts, int level)
{
CYG_REPORT_FUNCNAME("CdlTransaction::resolve");
CYG_REPORT_FUNCARG2XV(this, level);
CYG_PRECONDITION_THISC();
std::vector<CdlConflict>::const_iterator conf_i;
for (conf_i = conflicts.begin(); conf_i != conflicts.end(); conf_i++) {
... | false | false | false | false | false | 0 |
applesmc_init_smcreg_try(void)
{
struct applesmc_registers *s = &smcreg;
bool left_light_sensor = 0, right_light_sensor = 0;
unsigned int count;
u8 tmp[1];
int ret;
if (s->init_complete)
return 0;
ret = read_register_count(&count);
if (ret)
return ret;
if (s->cache && s->key_count != count) {
pr_warn(... | false | false | false | false | false | 0 |
_overlay_default_class_content_update(Overlay_Default *ovl,
const Evas_Object *content __UNUSED__)
{
EINA_SAFETY_ON_NULL_RETURN(ovl);
if (ovl->clas_content) evas_object_del(ovl->clas_content);
// Evas_Object can not be duplicated.
//ovl->clas_content = _content_dup(con... | false | false | false | false | false | 0 |
self_vtbl_check(const struct ubi_device *ubi)
{
if (!ubi_dbg_chk_gen(ubi))
return;
if (vtbl_check(ubi, ubi->vtbl)) {
ubi_err(ubi, "self-check failed");
BUG();
}
} | false | false | false | false | false | 0 |
get_command_line(void)
{
FILE *fp;
char *line;
const int sizeof_line = 2048;
line = malloc(sizeof_line);
if (line == NULL)
die("Could not allocate memory to read /proc/cmdline.");
fp = fopen("/proc/cmdline", "r");
if (!fp)
die("Could not open /proc/cmdline.");
if (fgets(line, sizeof_line, fp) == NULL)
... | false | false | false | false | false | 0 |
Clone(FCDEffectParameterSurfaceInit* clone) const
{
if (clone == NULL)
{
clone = FCDEffectParameterSurfaceInitFactory::Create(GetInitType());
return clone != NULL ? Clone(clone) : NULL;
}
else
{
//no member variables to copy in this class, but leave this for future use.
return clone;
}
} | false | false | false | false | false | 0 |
SwapMasterPoint (
Bag bag1,
Bag bag2 )
{
Bag * ptr1;
Bag * ptr2;
if ( bag1 == bag2 )
return;
/* get the pointers */
ptr1 = PTR_BAG(bag1);
ptr2 = PTR_BAG(bag2);
/*... | false | false | false | false | false | 0 |
Matrix_Transpose(wordptr X, N_int rowsX, N_int colsX,
wordptr Y, N_int rowsY, N_int colsY)
{
N_word i;
N_word j;
N_word ii;
N_word ij;
N_word ji;
N_word addii;
N_word addij;
N_word addji;
N_word bitii;
N_word bitij;
N_word bitji;
N_word t... | false | false | false | false | false | 0 |
calculate_minimum_height (GtkWidget *widget,
PanelOrientation orientation)
{
GtkStateFlags state;
GtkStyleContext *style_context;
const PangoFontDescription *font_desc;
PangoContext *pango_context;
PangoFontMetrics *metrics;
GtkBorder padding;
int focus_width = ... | false | false | false | false | false | 0 |
pnpoly(char *polygon_c,int npol,char *p_c) {
int i, j, c = 0;
POINT* pg = (POINT*)polygon_c;
POINT* p = (POINT*)p_c;
int x = p->x;
int y = p->y;
for (i = 0, j = npol-1; i < npol; j = i++) {
if ((((pg[i].y <= y) && (y < pg[j].y)) ||
((pg[j].y <= y) && (y < pg[i].y))) &&
(x < (pg[j].x - pg[i].x) * (y -... | false | false | false | false | false | 0 |
sendTuple(q, s)
queue1_t *q;
space1_t *s;
{
tsh_get_ot2 out ;
int sd ;
/* connect to the requestor */
if ((sd = get_socket()) == -1)
{
printf(" Cannot getsocket for tuple object. Call system operator. \n");
exit (E_SOCKET);
}
i... | false | false | false | false | false | 0 |
iwl_mvm_mac_ctx_send(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
u32 action, bool force_assoc_off,
const u8 *bssid_override)
{
switch (vif->type) {
case NL80211_IFTYPE_STATION:
return iwl_mvm_mac_ctxt_cmd_sta(mvm, vif, action,
force_assoc_off,
bssid_override);
break;
case NL80211_IFTYPE_A... | false | false | false | false | false | 0 |
compute_atomic_domain(
struct isl_codegen_domains *domains, __isl_take isl_set *class_domain)
{
isl_basic_set *bset;
isl_basic_set_list *list;
isl_set *domain, *atomic_domain;
int empty;
domain = isl_set_copy(domains->option[isl_ast_loop_atomic]);
domain = isl_set_intersect(domain, isl_set_copy(class_domain));
... | false | false | false | false | false | 0 |
AcpiDmParseDeferredOps (
ACPI_PARSE_OBJECT *Root)
{
const ACPI_OPCODE_INFO *OpInfo;
ACPI_PARSE_OBJECT *Op = Root;
ACPI_STATUS Status;
ACPI_FUNCTION_ENTRY ();
/* Traverse the entire parse tree */
while (Op)
{
OpInfo = AcpiPsGetOpcodeInfo (Op->Common.A... | false | false | false | false | false | 0 |
publish_start(const QString &instance, const QString &_type, int port, const QMap<QString,QByteArray> &attributes)
{
int id = publishItemList.reserveId();
if(!global->ensure_mul())
{
PublishItem *i = new PublishItem(id, 0);
i->sess = new ObjectSession(this);
publishItemList.insert(i);
i->sess->defer... | false | false | false | false | false | 0 |
SetValues(old, req, w)
GraphWidget old,
req,
w;
{
Boolean newGC = NO_GCS,
redraw = FALSE;
validate(&w->graph);
if (w->graph.leftMarker != old->graph.leftMarker)
{
XtCallCallbacks((Widget) w, XtNleftProc,
(XtPointer) w->graph.leftMarke... | false | false | false | false | true | 1 |
trace_set_clr_event(const char *system, const char *event, int set)
{
struct trace_array *tr = top_trace_array();
if (!tr)
return -ENODEV;
return __ftrace_set_clr_event(tr, NULL, system, event, set);
} | false | false | false | false | true | 1 |
connection_reached_eof(connection_t *conn)
{
switch (conn->type) {
case CONN_TYPE_OR:
return connection_or_reached_eof(TO_OR_CONN(conn));
case CONN_TYPE_AP:
case CONN_TYPE_EXIT:
return connection_edge_reached_eof(TO_EDGE_CONN(conn));
case CONN_TYPE_DIR:
return connection_dir_reached_... | false | false | false | false | false | 0 |
dialog_recent_used (WBCGtk *wbcg)
{
GtkBuilder *gui;
GtkDialog *dialog;
/* Only pop up one copy per workbook */
if (gnumeric_dialog_raise_if_exists (wbcg, RECENT_KEY))
return;
gui = gnm_gtk_builder_load ("recent.ui", NULL, GO_CMD_CONTEXT (wbcg));
if (gui == NULL)
return;
dialog = GTK_... | false | false | false | false | false | 0 |
m_redo(GtkWidget *, cchar *)
{
if (CEF) { // redo active edit
edit_redo(); // v.11.08
return;
}
if (Pundo == Pumax) return;
if (! menulock(1)) return;
Pundo++;
if (KB_A_k... | false | false | false | false | false | 0 |
ipv6_from_asc(unsigned char *v6, const char *in)
{
IPV6_STAT v6stat;
v6stat.total = 0;
v6stat.zero_pos = -1;
v6stat.zero_cnt = 0;
/* Treat the IPv6 representation as a list of values
* separated by ':'. The presence of a '::' will parse
* as one, two or three zero length elements.
*/
if (!CONF_parse_list(... | false | false | false | false | false | 0 |
e1000_ich8_cycle_init(struct e1000_hw *hw)
{
union ich8_hws_flash_status hsfsts;
int32_t error = E1000_ERR_EEPROM;
int32_t i = 0;
DEBUGFUNC("e1000_ich8_cycle_init");
hsfsts.regval = E1000_READ_ICH_FLASH_REG16(hw, ICH_FLASH_HSFSTS);
/* May be check the Flash Des Valid bit in Hw status */
... | false | false | false | false | false | 0 |
aim_chat_getconn(aim_session_t *sess, const char *name)
{
aim_conn_t *cur;
for (cur = sess->connlist; cur; cur = cur->next) {
struct chatconnpriv *ccp = (struct chatconnpriv *)cur->priv;
if (cur->type != AIM_CONN_TYPE_CHAT)
continue;
if (!cur->priv) {
faimdprintf(sess, 0,
"faim: chat: chat connectio... | false | false | false | false | false | 0 |
quietMoveResize(int x, int y,
unsigned int width, unsigned int height) {
m_window.moveResize(x, y, width, height);
m_state.saveGeometry(window().x(), window().y(),
window().width(), window().height());
if (m_tabmode == EXTERNAL) {
switch(m_s... | false | false | false | false | false | 0 |
ptep_test_and_clear_young(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
{
int ret = 0;
if (pte_young(*ptep))
ret = test_and_clear_bit(_PAGE_BIT_ACCESSED,
(unsigned long *) &ptep->pte);
if (ret)
pte_update(vma->vm_mm, addr, ptep);
return ret;
} | false | false | false | false | false | 0 |
trackdir_cleanup(Window win) {
char *suffix[] = {"log", "connect", NULL};
int i=0;
if (!trackdir) {
return;
}
while (suffix[i] != NULL) {
sprintf(tracktmp, "%s/0x%lx.%s", trackdir, win, suffix[i]);
if (appshare_debug && !strcmp(suffix[i], "log")) {
fprintf(stderr, "keeping: %s\n", tracktmp);
ff();
}... | false | true | false | false | false | 1 |
writeall(int fd, char* buf, int count)
{
int origcount = count;
while (count > 0) {
int n = write(fd, buf, count);
if (n < 0) return n;
count -= n;
buf += n;
}
return origcount;
} | false | false | false | false | false | 0 |
_convert_to_string(zval *op ZEND_FILE_LINE_DC) /* {{{ */
{
long lval;
double dval;
switch (Z_TYPE_P(op)) {
case IS_NULL:
Z_STRVAL_P(op) = STR_EMPTY_ALLOC();
Z_STRLEN_P(op) = 0;
break;
case IS_STRING:
break;
case IS_BOOL:
if (Z_LVAL_P(op)) {
Z_STRVAL_P(op) = estrndup_rel("1", 1);
Z_STRLE... | false | false | false | false | false | 0 |
setup_delta_attr_check(struct git_attr_check *check)
{
static struct git_attr *attr_delta;
if (!attr_delta)
attr_delta = git_attr("delta");
check[0].attr = attr_delta;
} | false | false | false | false | false | 0 |
Config_setup(const char *db_file)
{
char *zErrMsg = NULL;
DB_init(db_file);
tns_value_t *res = DB_exec("begin");
check(res != NULL, "Couldn't start transaction.");
tns_value_destroy(res);
int rc = sqlite3_exec(CONFIG_DB, bdata(&CONFIG_SCHEMA), NULL, NULL, &zErrMsg);
check(rc == SQLITE_OK, "... | 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.