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 |
|---|---|---|---|---|---|---|
parseFontFaceSrc()
{
CSSValueListImpl* values = new CSSValueListImpl(CSSValueListImpl::Comma);
Value* val;
bool expectComma = false;
bool allowFormat = false;
bool failed = false;
CSSFontFaceSrcValueImpl* uriValue = 0;
while ((val = valueList->current())) {
CSSFontFaceSrcValueImpl* p... | false | false | false | false | false | 0 |
_dmalloc_strcasecmp(const char *file, const int line,
const char *s1, const char *s2)
{
if (BIT_IS_SET(_dmalloc_flags, DEBUG_CHECK_FUNCS)) {
if ((! dmalloc_verify_pnt(file, line, "strcasecmp", s1,
0 /* not exact */, -1))
|| (! dmalloc_verify_pnt(file, line, "strcasecmp", s2,
0 /* not exact *... | false | true | false | false | false | 1 |
prepare_eh_type (tree type)
{
if (type == NULL_TREE)
return type;
if (type == error_mark_node)
return error_mark_node;
/* peel back references, so they match. */
type = non_reference (type);
/* Peel off cv qualifiers. */
type = TYPE_MAIN_VARIANT (type);
/* Functions and arrays decay to pointe... | false | false | false | false | false | 0 |
bzm_finput(fp,mat)
FILE *fp;
ZMAT *mat;
{
u_int i,j,m,n,dummy;
int io_code;
/* get dimension */
skipjunk(fp);
if ((io_code=fscanf(fp," ComplexMatrix: %u by %u",&m,&n)) < 2 ||
m>MAXDIM || n>MAXDIM )
error(io_code==EOF ? E_EOF : E_FORMAT,"bzm_finput");
/* ... | false | false | false | false | false | 0 |
trace_benchmark_reg(void)
{
bm_event_thread = kthread_run(benchmark_event_kthread,
NULL, "event_benchmark");
WARN_ON(!bm_event_thread);
} | false | false | false | false | false | 0 |
brasero_session_cfg_get_output_format (BraseroBurnSession *session)
{
BraseroBurnSessionClass *klass;
BraseroSessionCfgPrivate *priv;
BraseroImageFormat format;
klass = BRASERO_BURN_SESSION_CLASS (brasero_session_cfg_parent_class);
format = klass->get_output_format (session);
if (format != BRASERO_IMAGE_FORMAT_... | false | false | false | false | false | 0 |
gray2bi_getActualTraits (
IP_XFORM_HANDLE hXform, /* in: handle for xform */
DWORD dwInputAvail, /* in: # avail bytes in input buf */
PBYTE pbInputBuf, /* in: ptr to input buffer */
PDWORD pdwInputUsed, /* out: # bytes used from input buf */
PDWORD... | false | false | false | false | false | 0 |
_process_event_usage(pgsql_conn_t *pg_conn, char *cluster, time_t start,
time_t end, List cu_list)
{
DEF_VARS;
int seconds = 0;
local_cluster_usage_t *c_usage = NULL;
char *ge_fields = "node_name,cpu_count,time_start,time_end";
enum {
F_NAME,
F_CPU,
F_START,
F_END,
F_COUNT
};
/* events with ma... | false | false | false | false | false | 0 |
div(knumber_base *rhs) {
if(rhs->is_zero()) {
if(sign() < 0) {
delete this;
return new knumber_error(knumber_error::ERROR_NEG_INFINITY);
} else {
delete this;
return new knumber_error(knumber_error::ERROR_POS_INFINITY);
}
}
if(knumber_integer *const p = dynamic_cast<knumber_integer *>(rhs)) {
k... | false | false | false | false | false | 0 |
test_reader_empty (void)
{
const gchar * strings[] = { "", "value", "/value", ".", NULL};
GError *error = NULL;
GvdbTable *table;
gchar **names;
gint n_names;
gint i;
table = gvdb_table_new (SRCDIR "/gvdbs/empty_gvdb", TRUE, &error);
g_assert_no_error (error);
g_assert (table != NULL);
g_assert (g... | false | false | false | false | false | 0 |
R3Distance(const R3Box& box1, const R3Box& box2)
{
// Find axial distances from box1 to box2
RNLength dx, dy, dz;
if (RNIsGreater(box1.XMin(), box2.XMax())) dx = box1.XMin() - box2.XMax();
else if (RNIsGreater(box2.XMin(), box1.XMax())) dx = box2.XMin() - box1.XMax();
else dx = 0.0;
if (RNIsGrea... | false | false | false | false | false | 0 |
push_env_temp_dir (void)
{
const char *tmpdir = get_cvs_tmp_dir ();
if (tmpdir_env && strcmp (tmpdir_env, tmpdir))
setenv (TMPDIR_ENV, tmpdir, 1);
} | false | false | false | false | false | 0 |
__of_attach_node_sysfs(struct device_node *np)
{
const char *name;
struct kobject *parent;
struct property *pp;
int rc;
if (!IS_ENABLED(CONFIG_SYSFS))
return 0;
if (!of_kset)
return 0;
np->kobj.kset = of_kset;
if (!np->parent) {
/* Nodes without parents are new top level trees */
name = safe_name(&of... | false | false | false | false | false | 0 |
main(int argc, char **argv) {
namespace s = fst::script;
using fst::script::FstClass;
string usage = "Prints out information about an FST.\n\n Usage: ";
usage += argv[0];
usage += " [in.fst]\n";
std::set_new_handler(FailedNewHandler);
SET_FLAGS(usage.c_str(), &argc, &argv, true);
if (argc > 2) {
... | false | false | false | false | false | 0 |
_gth_file_store_reorder (GthFileStore *file_store)
{
int *new_order;
int i, j;
_gth_file_store_sort (file_store, file_store->priv->all_rows, file_store->priv->tot_rows);
/* compute the new position for each row */
new_order = g_new (int, file_store->priv->num_rows);
for (i = 0, j = -1; i < file_store->priv->t... | false | false | false | false | false | 0 |
resv_nick_fnc(const char *mask, const char *reason, int temp_time)
{
struct Client *client_p, *target_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
char *nick;
char note[NICKLEN+10];
if (!ConfigFileEntry.resv_fnc)
return;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
{
client_p = ptr->data;
... | true | true | false | false | false | 1 |
kvp_frame_set_value_nc (KvpFrame * frame, const char * key_path,
KvpValue * value)
{
char *last_key;
frame = get_trailer_make (frame, key_path, &last_key);
if (!frame) return NULL;
kvp_frame_set_slot_destructively(frame, last_key, value);
return frame;
} | false | false | false | false | false | 0 |
ShowTransactionStateRec(TransactionState s)
{
StringInfoData buf;
initStringInfo(&buf);
if (s->nChildXids > 0)
{
int i;
appendStringInfo(&buf, "%u", s->childXids[0]);
for (i = 1; i < s->nChildXids; i++)
appendStringInfo(&buf, " %u", s->childXids[i]);
}
if (s->parent)
ShowTransactionStateRec(s->pa... | false | false | false | false | false | 0 |
setFont(qint32 value)
{
m_state.active_codepage = value;
if (value < m_codepages.count()) {
setCodec(m_codepages[value]);
} else {
setCodec(0);
m_codepages.resize(value + 1);
}
if (m_codec == 0) {
setCodec(m_codepage);
}
} | false | false | false | false | false | 0 |
index_create(void)
{
struct index_node *node;
node = NOFAIL(calloc(sizeof(struct index_node), 1));
node->prefix = NOFAIL(strdup(""));
node->first = INDEX_CHILDMAX;
return node;
} | false | false | false | false | false | 0 |
qmonCplxSelectAttr(Widget w, XtPointer cld, XtPointer cad)
{
XbaeMatrixSelectCellCallbackStruct *cbs =
(XbaeMatrixSelectCellCallbackStruct*) cad;
int i;
String str;
int type, relop;
DENTER(GUI_LAYER, "qmonCplxSelectAttr");
if (cbs->num_params && !strcmp(cbs->params[0], "begin")) {
... | false | false | false | false | false | 0 |
scan_ip(char *s)
{
struct hostent *he;
struct in_addr *ina;
u_long addr = 0;
u_int n;
int dns, shift;
char *t;
/* if there is anything ascii in here, this may be a hostname */
for (dns = 0, t = s; *t; ++t) {
if (islower((int)*t) || isupper((int)*t)) {
dns = 1;
break;
}
}
if (dn... | false | false | false | false | false | 0 |
solo_set_fmt_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
struct solo_dev *solo_dev = video_drvdata(file);
if (vb2_is_busy(&solo_dev->vidq))
return -EBUSY;
/* For right now, if it doesn't match our running config,
* then fail */
return solo_try_fmt_cap(file, priv, f);
} | false | false | false | false | false | 0 |
au6610_i2c_msg(struct dvb_usb_device *d, u8 addr,
u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen)
{
u8 request;
u8 wo = (rbuf == NULL || rlen == 0); /* write-only */
if (wo) {
request = AU6610_REQ_I2C_WRITE;
} else { /* rw */
request = AU6610_REQ_I2C_READ;
}
return au6610_usb_msg(d, request, addr, wbuf, wlen, ... | false | false | false | false | false | 0 |
globrearrange()
{ /* does global rearrangements */
tree globtree;
tree oldtree;
int i,j,k,num_sibs,num_sibs2;
node *where,*sib_ptr,*sib_ptr2;
double oldbestyet = curtree.likelihood;
int success = false;
alloctree(&globtree.nodep,nonodes2);
alloctree(&oldtree.nodep,nonodes2);
setuptree(&globtree,non... | false | false | false | false | false | 0 |
_lldpctl_do_something(lldpctl_conn_t *conn,
int state_send, int state_recv, const char *state_data,
enum hmsg_type type,
void *to_send, struct marshal_info *mi_send,
void **to_recv, struct marshal_info *mi_recv)
{
ssize_t rc;
if (conn->state == CONN_STATE_IDLE) {
/* We need to build the message to ... | false | false | false | false | false | 0 |
build_vtt (tree t)
{
tree inits;
tree type;
tree vtt;
tree index;
/* Build up the initializers for the VTT. */
inits = NULL_TREE;
index = size_zero_node;
build_vtt_inits (TYPE_BINFO (t), t, &inits, &index);
/* If we didn't need a VTT, we're done. */
if (!inits)
return;
/* Figure out the t... | false | false | false | false | false | 0 |
cmd_slot_bindings(hypervisor_conn_t *conn,int argc,char *argv[])
{
struct cisco_card *card,*sc;
vm_instance_t *vm;
int i,j;
if (!(vm = hypervisor_find_object(conn,argv[0],OBJ_TYPE_VM)))
return(-1);
for(i=0;i<vm->nr_slots;i++) {
if (!(card = vm_slot_get_card_ptr(vm,i)))
continue;
... | false | false | false | false | false | 0 |
reset_child (GstElement * child, GValue * ret G_GNUC_UNUSED, gpointer user_data)
{
GnlComposition *comp = GNL_COMPOSITION (user_data);
GnlCompositionEntry *entry;
GST_DEBUG_OBJECT (child, "unlocking state");
gst_element_set_locked_state (child, FALSE);
entry = COMP_ENTRY (comp, child);
if (entry->nomorepa... | false | false | false | false | false | 0 |
finish_lambda_scope (void)
{
tree_int *p = &lambda_scope_stack->last ();
if (lambda_scope != p->t)
{
lambda_scope = p->t;
lambda_count = p->i;
}
lambda_scope_stack->pop ();
} | false | false | false | false | false | 0 |
SwapRTMx(T_RTMx *Mx_a, T_RTMx *Mx_b)
{
int i;
T_RTMx BufMx;
for (i = 0; i < 12; i++) BufMx.a[i] = Mx_a->a[i];
for (i = 0; i < 12; i++) Mx_a->a[i] = Mx_b->a[i];
for (i = 0; i < 12; i++) Mx_b->a[i] = BufMx.a[i];
} | false | false | false | false | false | 0 |
cafebabe_annotation_parse(struct cafebabe_annotation *a, struct cafebabe_stream *s)
{
int err;
err = cafebabe_stream_read_uint16(s, &a->type_index);
if (err)
goto out;
err = cafebabe_stream_read_uint16(s, &a->num_element_value_pairs);
if (err)
goto out;
a->element_value_pairs = calloc(a->num_element_value_... | false | false | false | false | false | 0 |
read(String* string)
{
// String is stored as a uint32 character count, then string
uint32 len;
read(&len);
string->resize(len);
if (len)
read(&(*string->begin()), len);
} | false | false | false | false | false | 0 |
checkEmptyParameter(bool allowNoParameter) throw(GsmException)
{
int c = nextChar();
if (c == ',' || c == -1)
{
if (allowNoParameter)
{
putBackChar();
return true;
}
else
throwParseException(_("expected parameter"));
putBackChar();
}
return false;
} | false | false | false | false | false | 0 |
inconsistent()
{
gboolean vl=false;
if (type != Check) return false;
g_object_get (G_OBJECT(widget),"inconsistent",&vl,(void *)NULL);
return vl;
} | false | false | false | false | false | 0 |
set_tracer_flag(struct trace_array *tr, unsigned int mask, int enabled)
{
/* do nothing if flag is already set */
if (!!(tr->trace_flags & mask) == !!enabled)
return 0;
/* Give the tracer a chance to approve the change */
if (tr->current_trace->flag_changed)
if (tr->current_trace->flag_changed(tr, mask, !!enab... | false | false | false | false | false | 0 |
flow_reverse_top_sort_order_compute (rts_order)
int *rts_order;
{
edge *stack;
int sp;
int postnum = 0;
sbitmap visited;
/* Allocate stack for back-tracking up CFG. */
stack = (edge *) xmalloc ((n_basic_blocks + 1) * sizeof (edge));
sp = 0;
/* Allocate bitmap to track nodes that have been visite... | false | false | false | false | false | 0 |
H5Z_scaleoffset_log2(unsigned long long num)
{
unsigned v = 0;
unsigned long long lower_bound = 1; /* is power of 2, largest value <= num */
unsigned long long val = num;
while(val >>= 1) {
v++;
lower_bound <<= 1;
}
if(num == lower_bound)
return v;
else
return v + 1;
} | false | false | false | false | false | 0 |
readOnSocket(void)
{
int bytesTransfered;
char *buff = new char[4096];
bytesTransfered = this->m_socket->recv(buff, 4096);
if (bytesTransfered < 0)
{
delete [] buff;
return (-1);
}
this->m_rcBuffer.insert(buff, bytesTransfered);
delete [] buff;
return (bytesTran... | false | false | false | false | false | 0 |
Log4jUdpAppender(const tstring& host_, int port_)
: socket()
, host(host_)
, port(port_)
{
layout.reset (new PatternLayout (DCMTK_LOG4CPLUS_TEXT ("%m")));
openSocket();
} | false | false | false | false | false | 0 |
gm107_ltc_intr(struct nvkm_ltc *ltc)
{
struct nvkm_device *device = ltc->subdev.device;
u32 mask;
mask = nvkm_rd32(device, 0x00017c);
while (mask) {
u32 s, c = __ffs(mask);
for (s = 0; s < ltc->lts_nr; s++)
gm107_ltc_lts_isr(ltc, c, s);
mask &= ~(1 << c);
}
} | false | false | false | false | false | 0 |
primary_get_cb(GtkClipboard *clipboard,
GtkSelectionData *data, guint info,
gpointer user_data) {
GtkHex *gh = GTK_HEX(user_data);
if(gh->selection.start != gh->selection.end) {
gint start_pos;
gint end_pos;
guchar *text;
start_pos = MIN(gh->selection.start, gh->selection.end);
end_pos =... | false | false | false | false | false | 0 |
posix_fork(PyObject *self, PyObject *noargs)
{
pid_t pid;
int result = 0;
_PyImport_AcquireLock();
pid = fork();
if (pid == 0) {
/* child: this clobbers and resets the import lock. */
PyOS_AfterFork();
} else {
/* parent: release the import lock. */
result = _PyIm... | false | false | false | false | false | 0 |
afs_volume_cache_get_key(const void *cookie_netfs_data,
void *buffer, uint16_t bufmax)
{
const struct afs_volume *volume = cookie_netfs_data;
uint16_t klen;
_enter("{%u},%p,%u", volume->type, buffer, bufmax);
klen = sizeof(volume->type);
if (klen > bufmax)
return 0;
memcpy(buffer, &volume->type, sizeof(... | false | true | false | false | false | 1 |
mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes)
{
mp_err rv = MP_YES;
while (nPrimes-- > 0 && rv == MP_YES) {
rv = mpp_fermat(a, *primes++);
}
return rv;
} | false | false | false | false | false | 0 |
ges_timeline_filesource_create_track_object (GESTimelineObject * obj,
GESTrack * track)
{
GESTimelineFileSourcePrivate *priv = GES_TIMELINE_FILE_SOURCE (obj)->priv;
GESTrackObject *res;
if (!(priv->supportedformats & track->type)) {
GST_DEBUG ("We don't support this track format");
return NULL;
}
... | false | false | false | false | false | 0 |
nextIndex(const QModelIndex& idx) const
{
// If the given index is invalid, return the index of the first item on the
// list.
if (!idx.isValid())
return index(0, 0, QModelIndex());
// Do not go past the last item.
if (idx.row() >= (rowCount() - 1))
return QModelIndex();
// Return the index of the next item... | false | false | false | false | false | 0 |
nilfs_recovery_copy_block(struct the_nilfs *nilfs,
struct nilfs_recovery_block *rb,
struct page *page)
{
struct buffer_head *bh_org;
void *kaddr;
bh_org = __bread(nilfs->ns_bdev, rb->blocknr, nilfs->ns_blocksize);
if (unlikely(!bh_org))
return -EIO;
kaddr = kmap_atomic(page);
memcpy(kaddr + ... | false | false | false | false | false | 0 |
moxa_start(struct tty_struct *tty)
{
struct moxa_port *ch = tty->driver_data;
if (ch == NULL)
return;
if (!test_bit(TXSTOPPED, &ch->statusflags))
return;
MoxaPortTxEnable(ch);
clear_bit(TXSTOPPED, &ch->statusflags);
} | false | false | false | false | false | 0 |
gfs_server_pwrite(struct gfp_xdr *client)
{
gfarm_int32_t fd;
size_t size;
gfarm_int64_t offset;
ssize_t rv;
int save_errno = 0;
char buffer[GFS_PROTO_MAX_IOSIZE];
gfs_server_get_request(client, "pwrite", "ibl",
&fd, sizeof(buffer), &size, buffer, &offset);
/*
* We truncate i/o size bigger than GFS_PRO... | false | false | false | false | false | 0 |
press(int button)
{
st_menu_base_t::press(button);
switch (button)
{
case BTN_UP:
case BTN_DOWN:
menu->set_skill(menu->selected()->tag - 10);
menu->rebuild();
break;
}
} | false | false | false | false | false | 0 |
list_pop(List *list)
{
void *item;
int err;
if (!list)
return set_errnull(EINVAL);
if ((err = list_wrlock(list)))
return set_errnull(err);
item = list_pop_unlocked(list);
if ((err = list_unlock(list)))
return set_errnull(err);
return item;
} | false | false | false | false | false | 0 |
pr_temp_table(FILE *fp, Temp_table *t_head)
{
Temp_table *tpt;
tpt = t_head;
if (t_head != NULL) {
fputs(" %% *** Temporary Table ***\n", fp);
fputs(" temp {\n", fp);
}
while (tpt != NULL) {
if (tpt->type_entry != NULL) {
if (tpt->type_entry->type == TYPE_STRUCT || tpt->type_entry->type =... | false | false | false | false | false | 0 |
cell_draw_v_extension_markers (cairo_t *cr,
int x1, int y1,
int width, int height,
int h_center)
{
if (h_center == -1)
h_center = width / 2;
cell_draw_extension_mark_bottom (cr, x1, y1, height, h_center);
} | false | false | false | false | false | 0 |
have_request(pack_opt_t *options)
{
if (options->all_filter || options->all_layout || options->op_tbl->nelems)
return 1;
return 0;
} | false | false | false | false | false | 0 |
encodingFromContentType(const QString& type)
{
QString encoding;
int index = type.indexOf(';');
if (index > -1)
encoding = type.mid( index+1 ).remove(QRegExp("charset[ ]*=[ ]*", Qt::CaseInsensitive)).trimmed();
return encoding;
} | false | false | false | false | false | 0 |
gst_udpsink_set_uri (GstUDPSink * sink, const gchar * uri)
{
gst_multiudpsink_remove (GST_MULTIUDPSINK (sink), sink->uri.host,
sink->uri.port);
if (gst_udp_parse_uri (uri, &sink->uri) < 0)
goto wrong_uri;
gst_multiudpsink_add (GST_MULTIUDPSINK (sink), sink->uri.host,
sink->uri.port);
return T... | false | false | false | false | false | 0 |
virtio_gpu_dirty_update(struct virtio_gpu_framebuffer *fb,
bool store, int x, int y,
int width, int height)
{
struct drm_device *dev = fb->base.dev;
struct virtio_gpu_device *vgdev = dev->dev_private;
bool store_for_later = false;
int bpp = fb->base.bits_per_pixel / 8;
int x2, y2;
unsigned long flag... | false | false | false | false | false | 0 |
Crossfire_Object_InsertInto(Crossfire_Object *who, PyObject *args) {
/* Note that this function uses the METH_O calling convention. */
Crossfire_Object *op = (Crossfire_Object*)args;
object *myob;
EXISTCHECK(who);
TYPEEXISTCHECK(op);
/* we can only insert removed object, so first remove it
... | false | false | false | false | false | 0 |
jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) {
/* JP2 encoding */
/* JPEG 2000 Signature box */
jp2_write_jp(cio);
/* File Type box */
jp2_write_ftyp(jp2, cio);
/* JP2 Header box */
jp2_write_jp2h(jp2, cio);
/* J2K encoding */
if(!jp2_write_j... | false | false | false | false | false | 0 |
csio_mb_portmod_changed(struct csio_hw *hw, uint8_t port_id)
{
static char *mod_str[] = {
NULL, "LR", "SR", "ER", "TWINAX", "active TWINAX", "LRM"
};
struct csio_pport *port = &hw->pport[port_id];
if (port->mod_type == FW_PORT_MOD_TYPE_NONE)
csio_info(hw, "Port:%d - port module unplugged\n", port_id);
else i... | false | false | false | false | false | 0 |
cmsDesaturateLab(cmsCIELab* Lab,
double amax, double amin,
double bmax, double bmin)
{
// Whole Luma surface to zero
if (Lab -> L < 0) {
Lab-> L = Lab->a = Lab-> b = 0.0;
return FALSE;
}
// Clamp white... | false | false | false | false | false | 0 |
to_binary(char *str, STRLEN *outlen) {
CS_BINARY *b, *b_ptr;
char s[3], *strtol_end;
STRLEN i, b_len;
long int x;
/* Advance past the 0x. We could use the value of syb_use_bin_0x
to infer whether to advance or not, but it's just as easy to
explicitly check. */
if (str[0] == '0' && str[1] == 'x')
str += 2... | false | false | false | false | false | 0 |
unpack_restart(int nlocal, int nth)
{
double **extra = atom->extra;
// skip to the nth set of extended variables
int m = 0;
for (int i = 0; i< nth; i++) m += static_cast<int> (extra[nlocal][m]);
m++;
for (int k = 0; k < 3*prony_terms; k=k+3)
{
s_gld[nlocal][k] = extra[nlocal][m++];
s_gld[nlocal... | false | false | false | false | false | 0 |
pl_odtworz_plik(struct ast_channel *chan, const char *language, int audiofd, int ctrlfd, const char *ints, char *fn)
{
char file_name[255] = "digits/";
strcat(file_name, fn);
ast_debug(1, "Trying to play: %s\n", file_name);
if (!ast_streamfile(chan, file_name, language)) {
if ((audiofd > -1) && (ctrlfd > -1))
... | true | true | false | false | false | 1 |
lemitl(op, lab, name)
int op, lab;
char *name;
{
misalign();
#ifdef DeBugLinker
if (Dflag)
fprintf(dbgfile, "%ld:\t%d\tL%d\t\t\t# %s\n", (long)pc, op, lab, name);
#endif /* DeBugLinker */
if (lab >= maxlabels)
labels = (word *) trealloc(labels, NULL, &maxlabels, sizeof(word),
... | false | false | false | false | false | 0 |
__extent_writepage(struct page *page, struct writeback_control *wbc,
void *data)
{
struct inode *inode = page->mapping->host;
struct extent_page_data *epd = data;
u64 start = page_offset(page);
u64 page_end = start + PAGE_CACHE_SIZE - 1;
int ret;
int nr = 0;
size_t pg_offset = 0;
loff_t i_size = i_size... | false | false | false | false | false | 0 |
ToXMLName(JSContext *cx, jsval v, jsid *funidp)
{
JSString *name;
JSObject *obj;
JSClass *clasp;
uint32 index;
if (JSVAL_IS_STRING(v)) {
name = JSVAL_TO_STRING(v);
} else {
if (JSVAL_IS_PRIMITIVE(v)) {
ReportBadXMLName(cx, v);
return NULL;
}
... | false | false | false | false | false | 0 |
quote_shell()
const
{
string_ty *tmp = str_quote_shell(ref);
nstring result(tmp);
str_free(tmp);
return result;
} | false | false | false | false | false | 0 |
error_intl(const char *s)
{
if (!os_testing_mode())
language_check_translations();
wstring message = subst_intl_wide(s);
wrap(message.c_str());
} | false | false | false | false | false | 0 |
Pop(void*& data)
{
DoublePointer out, in, next;
while (1)
{
// out points to the first node, this a dummy node.
out.val = atomic_read_double(&out_);
in.val = atomic_read_double(&in_);
// read the dummy node
LockFreeListNode* node_head = (LockFreeListNode*)atomic_... | false | false | false | false | false | 0 |
soc_cb_save_as (SheetObject *so, SheetControl *sc)
{
SheetObjectComponent *soc = SHEET_OBJECT_COMPONENT (so);
/* FIXME: This violates model gui barrier */
WBCGtk *wbcg = scg_wbcg (SHEET_CONTROL_GUI (sc));
GtkWidget *dlg = gtk_file_chooser_dialog_new (_("Save as"),
GTK_... | false | false | false | false | false | 0 |
glob_expand_stub (XDR *xdr_in)
{
char **r;
struct guestfs_glob_expand_args args;
const char *pattern;
if (optargs_bitmask != 0) {
reply_with_error ("header optargs_bitmask field must be passed as 0 for calls that don't take optional arguments");
goto done_no_free;
}
memset (&args, 0, sizeof args);... | false | false | false | false | false | 0 |
ajout_segmentpiste(PT_COORDONNEES coin, PT_COORDONNEES *nouveaucoin,
int face, long piste_cour[NB_FACES], long piste_infalim[NB_FACES],
LST_EQUIPO equipo, COEUR lecoeur, LST_SEGMENT segx_occ[NB_FACES],
LST_SEGMENT segy_occ[NB_FACES])
{
LST_SEGMENT * segpiste = NULL;
long pistealim = 0, largmetalpiste = 0, pist... | false | false | false | false | false | 0 |
deleteIncludedItems(bool inDB /**= false*/)
{
for (MailItemMap::iterator mailItemIter = m_items.begin(); mailItemIter != m_items.end(); ++mailItemIter)
{
Item* item = mailItemIter->second;
if (inDB)
{ CharacterDatabase.PExecute("DELETE FROM item_instance WHERE guid='%u'", item->GetG... | false | false | false | false | false | 0 |
FunctionValues( double * x, double * f )
{
vtkDataSet * ds;
if(!this->LastDataSet && !this->DataSets->empty())
{
ds = ( *this->DataSets )[0];
this->LastDataSet = ds;
this->LastDataSetIndex = 0;
}
else
{
ds = this->LastDataSet;
}
int retVal = this->FunctionValues( ds, x,... | false | false | false | false | false | 0 |
cmd_tcl(struct userrec *u, int idx, char *msg)
{
int code;
char *result;
#ifdef USE_TCL_ENCODING
Tcl_DString dstr;
#endif
if (!(isowner(dcc[idx].nick)) && (must_be_owner)) {
dprintf(idx, MISC_NOSUCHCMD);
return;
}
debug1("tcl: evaluate (.tcl): %s", msg);
code = Tcl_GlobalEval(interp, msg);
#ifde... | false | false | false | false | false | 0 |
eat_checksum(Octstr *packet) {
int len;
int ch1, ch2, ch3;
len = octstr_len(packet);
if (len < 3)
return;
ch1 = octstr_get_char(packet, len - 3);
ch2 = octstr_get_char(packet, len - 2);
ch3 = octstr_get_char(packet, len - 1);
if (isxdigit(ch3) && isxdigit(ch2) && ch1 == TAB)
octstr_delete(packet, len -... | false | false | false | false | false | 0 |
_wrap_goo_canvas_item_model_get_transform(PyGObject *self)
{
PyObject *matrix;
cairo_matrix_t transform = {0,};
gboolean res;
res = goo_canvas_item_model_get_transform(GOO_CANVAS_ITEM_MODEL(self->obj),
&transform);
if (!res) {
Py... | false | false | false | false | false | 0 |
get_mtg_id_from_hmt_no_block_list(int hmt_no, Block *head)
{
Block *bpt;
int mtg_id;
for (bpt = head; bpt != NULL; bpt = bpt->next) {
if (bpt->outer != NULL && bpt->outer->hmdf != NULL) {
if (bpt->hmt_no == hmt_no) {
return bpt->outer->hmdf->mtg_id;
}
... | false | false | false | false | false | 0 |
test_create (void)
{
GtkSourceMark *m;
m = gtk_source_mark_new ("Mark 1", "test");
g_assert_cmpstr ("Mark 1", ==, gtk_text_mark_get_name (GTK_TEXT_MARK (m)));
g_assert_cmpstr ("test", ==, gtk_source_mark_get_category (m));
g_assert (NULL == gtk_text_mark_get_buffer (GTK_TEXT_MARK (m)));
g_assert (NULL == gtk_sou... | false | false | false | false | false | 0 |
ProcessWrite(int fd, void *buf, int nbytes)
#else
int ProcessWrite(fd, buf, nbytes)
int fd;
void *buf;
int nbytes;
#endif
{
int got;
/* write byte count */
write(fd, &nbytes, sizeof(int));
/* write data block */
got = write(fd, buf, nbytes);
if (pr_debug) {
fprintf (stderr, "[%d] wrote... | false | false | false | false | false | 0 |
lpfc_api_table_setup(struct lpfc_hba *phba, uint8_t dev_grp)
{
int rc;
/* Set up lpfc PCI-device group */
phba->pci_dev_grp = dev_grp;
/* The LPFC_PCI_DEV_OC uses SLI4 */
if (dev_grp == LPFC_PCI_DEV_OC)
phba->sli_rev = LPFC_SLI_REV4;
/* Set up device INIT API function jump table */
rc = lpfc_init_api_table_... | false | false | false | false | false | 0 |
update_volenabled(UAContext *ua, char *val, MEDIA_DBR *mr)
{
mr->Enabled = get_enabled(ua, val);
if (mr->Enabled < 0) {
return;
}
if (!db_update_media_record(ua->jcr, ua->db, mr)) {
ua->error_msg(_("Error updating media record Enabled: ERR=%s"),
db_strerror(ua->db));
} els... | false | false | false | false | false | 0 |
write_password_data (SecretValue *value)
{
const gchar *at;
gsize length;
int r;
at = secret_value_get (value, &length);
while (length > 0) {
r = write (1, at, length);
if (r == -1) {
if (errno != EAGAIN && errno != EINTR) {
g_printerr ("%s: couldn't write password: %s\n",
g_get_prgnam... | false | false | false | false | false | 0 |
_doSpin(tControl edit, UT_sint32 amt)
{
UT_ASSERT_HARMLESS(amt); // zero makes no sense
// get current value from member
const gchar* szOld = _getSpinItemValue(edit);
double d = UT_convertDimensionless(szOld);
// figure out which dimension and units to spin in
UT_Dimension dimSpin = m_dim;
double dSpinUnit = S... | false | false | false | false | false | 0 |
fn_year(fs_query *q, fs_value v)
{
if (v.attr != fs_c.xsd_datetime) {
return fs_value_error(FS_ERROR_INVALID_TYPE, NULL);
}
v = fs_value_fill_lexical(q, v);
fs_date_fields df;
if (date_from_iso8601(v.lex, &df)) {
char *err = g_strdup_printf("cannot get year from xsd:dateTime %s", v.l... | false | false | false | false | false | 0 |
toUTF8(const char* sourceStart, const char* sourceEnd, Ice::UTF8Buffer& buffer) const
{
size_t size = static_cast<size_t>(sourceEnd - sourceStart);
Ice::Byte* targetStart = buffer.getMoreBytes(size, 0);
Ice::Byte* targetEnd = targetStart + size;
unsigned int j = size;
for(unsigned int i = 0; i < si... | false | false | false | false | false | 0 |
get_start_time_of_sche_task(Sche_task *sche_task,
Scheduling_info *top_sche)
{
List *li, *pred_sche_task_list;
real start_time = sche_task_get_fixed_start_time(sche_task);
if (start_time >= 0)
return start_time;
pred_sche_task_list = get_pred_sche_task_list(sche_tas... | false | false | false | false | false | 0 |
IsPropertyElementName ( RDFTermKind term )
{
if ( (term == kRDFTerm_Description) || IsOldTerm ( term ) ) return false;
return (! IsCoreSyntaxTerm ( term ));
} | false | false | false | false | false | 0 |
reed_sol_r6_encode(int k, int w, char **data_ptrs, char **coding_ptrs, int size)
{
int i;
/* First, put the XOR into coding region 0 */
memcpy(coding_ptrs[0], data_ptrs[0], size);
for (i = 1; i < k; i++) galois_region_xor(data_ptrs[i], coding_ptrs[0], size);
/* Next, put the sum of (2^j)*Dj into coding re... | false | false | false | false | false | 0 |
send_event_stream_created(OutputStream * out, VirtualStream * stream, const char * context_id) {
char id[256];
virtual_stream_get_id(stream, id, sizeof(id));
write_stringz(out, "E");
write_stringz(out, STREAMS);
write_stringz(out, "created");
json_write_string(out, stream->type);
write_str... | true | true | false | false | false | 1 |
gst_allocator_set_default (GstAllocator * allocator)
{
GstAllocator *old;
g_return_if_fail (GST_IS_ALLOCATOR (allocator));
g_rw_lock_writer_lock (&lock);
old = _default_allocator;
_default_allocator = allocator;
g_rw_lock_writer_unlock (&lock);
if (old)
gst_object_unref (old);
} | false | false | false | false | false | 0 |
SetIndexUnique(int nIndexNumber, GBool bUnique/*=TRUE*/)
{
if (ValidateIndexNo(nIndexNumber) != 0)
return -1;
m_papoIndexRootNodes[nIndexNumber-1]->SetUnique(bUnique);
return 0;
} | false | false | false | false | false | 0 |
string_dealloc(PyObject *op)
{
switch (PyString_CHECK_INTERNED(op)) {
case SSTATE_NOT_INTERNED:
break;
case SSTATE_INTERNED_MORTAL:
/* revive dead object temporarily for DelItem */
Py_REFCNT(op) = 3;
if (PyDict_DelItem(interned, op) != 0)
... | false | false | false | false | false | 0 |
warn_GLX_1_3(Display * dpy, const char *function_name)
{
struct glx_display *priv = __glXInitialize(dpy);
if (priv->minorVersion < 3) {
fprintf(stderr,
"WARNING: Application calling GLX 1.3 function \"%s\" "
"when GLX 1.3 is not supported! This is an application bug!\n",
... | false | false | false | false | false | 0 |
queueJob(SimpleJob *job, Slave *slave)
{
QHash<Slave *, PerSlaveQueue>::Iterator it = m_connectedSlaves.find(slave);
if (it == m_connectedSlaves.end()) {
return false;
}
SimpleJobPrivate::get(job)->m_slave = slave;
PerSlaveQueue &jobs = it.value();
jobs.waitingList.append(job);
if (... | false | false | false | false | false | 0 |
cx18_reg_dev(struct cx18 *cx, int type)
{
struct cx18_stream *s = &cx->streams[type];
int vfl_type = cx18_stream_info[type].vfl_type;
const char *name;
int num, ret;
if (type == CX18_ENC_STREAM_TYPE_TS && s->dvb != NULL) {
ret = cx18_dvb_register(s);
if (ret < 0) {
CX18_ERR("DVB failed to register\n");
... | false | false | false | false | false | 0 |
client_renamed(void * graph_canvas, uint64_t id, const char * old_name, const char * new_name)
{
struct client * client_ptr;
log_info("canvas::client_renamed(%"PRIu64", '%s', '%s')", id, old_name, new_name);
client_ptr = find_client(graph_canvas_ptr, id);
if (client_ptr == NULL)
{
log_error("cannot find... | false | false | false | false | false | 0 |
command_idle(gboolean &sentdone) throw (imap_err)
{
gboolean idleRenew = false; // If we should renew the IDLE again.
std::string line;
do {
idleRenew = false;
sentdone = false;
// IDLE
sendline ("IDLE");
// Read continuation response
readline (line);
if (line.find("+ ") != 0) throw imap_command_e... | 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.