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 |
|---|---|---|---|---|---|---|
split(tPPtr parent, tPPtr firstChild, tPPtr secondChild,
bool initialState) {
firstChild->colourInfo(new_ptr(ColourBase()));
secondChild->colourInfo(new_ptr(ColourBase()));
if (!initialState) {
parent->addChild(firstChild);
parent->addChild(secondChild);
} else {
tPVector parents = parent->p... | false | false | false | false | false | 0 |
lp55xx_post_init_device(struct lp55xx_chip *chip)
{
struct lp55xx_device_config *cfg = chip->cfg;
if (!cfg->post_init_device)
return 0;
return cfg->post_init_device(chip);
} | false | false | false | false | false | 0 |
break_out_comdat_types (dw_die_ref die)
{
dw_die_ref c;
dw_die_ref first;
dw_die_ref prev = NULL;
dw_die_ref next = NULL;
dw_die_ref unit = NULL;
first = c = die->die_child;
if (c)
next = c->die_sib;
if (c) do {
if (prev == NULL || prev->die_sib == c)
prev = c;
c = next;
next = (c... | false | false | false | false | false | 0 |
ipcp_addci(f, ucp, lenp)
fsm *f;
u_char *ucp;
int *lenp;
{
ipcp_options *go = &ipcp_gotoptions[f->unit];
int len = *lenp;
#define ADDCIADDRS(opt, neg, val1, val2) \
if (neg) { \
if (len >= CILEN_ADDRS) { \
u_int32_t l; \
PUTCHAR(opt, ucp); \
PUTCHAR(CILEN_ADDRS, ucp); \
l =... | false | false | false | false | false | 0 |
sur40_buffer_prepare(struct vb2_buffer *vb)
{
struct sur40_state *sur40 = vb2_get_drv_priv(vb->vb2_queue);
unsigned long size = sur40_video_format.sizeimage;
if (vb2_plane_size(vb, 0) < size) {
dev_err(&sur40->usbdev->dev, "buffer too small (%lu < %lu)\n",
vb2_plane_size(vb, 0), size);
return -EINVAL;
}
... | false | false | false | false | false | 0 |
UpcaseFunction(
void *theEnv,
DATA_OBJECT_PTR returnValue)
{
DATA_OBJECT theArg;
unsigned i;
size_t slen;
char *osptr, *nsptr;
/*===============================================*/
/* Function upcase expects exactly one argument. */
/*===============================================*/
if (E... | false | false | false | false | false | 0 |
gst_insert_bin_class_init (GstInsertBinClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstElementClass *gstelement_class = (GstElementClass *) klass;
GST_DEBUG_CATEGORY_INIT (insert_bin_debug, "insertbin", 0, "Insert Bin");
g_type_class_add_private (klass, sizeof (GstInsertBinPrivate));... | false | false | false | false | false | 0 |
spl(z0,z1)
double z0, z1;
{ if (z0-z1==0.0) return(0.5);
return(z0/(z0-z1));
} | false | false | false | false | false | 0 |
try_chown(apr_pool_t *p, server_rec *s,
const char *name, const char *suffix)
{
if (suffix)
name = apr_pstrcat(p, name, suffix, NULL);
if (-1 == chown(name, ap_unixd_config.user_id,
(gid_t)-1 /* no gid change */ ))
{
if (errno != ENOENT)
a... | false | false | false | false | true | 1 |
dump(fetch_node& n) {
sb_ostringstream s;
static const char * fetch_type[] = {"VERTEX", "INSTANCE", ""};
s << n.bc.op_ptr->name;
fill_to(s, 20);
s << "R";
print_sel(s, n.bc.dst_gpr, n.bc.dst_rel, INDEX_LOOP, 0);
s << ".";
for (int k = 0; k < 4; ++k)
s << chans[n.bc.dst_sel[k]];
s << ", ";
s << "R";
prin... | false | false | false | false | false | 0 |
pvl_unshift(pvl_list L,void *d)
{
struct pvl_elem_t *E = pvl_new_element(d,L->head,0);
if (E->next != 0)
{
/* Link the head node to it */
E->next->prior = E;
}
/* move the head */
L->head = E;
/* maybe move the tail */
if (L->tail == 0)
{
L->tail = E;
}
L->count++;
... | false | false | false | false | false | 0 |
make_char_visible( FL_OBJECT * obj,
int n )
{
FLI_INPUT_SPEC *sp = obj->spec;
int startpos = sp->position;
int oldxoffset = sp->xoffset;
int tmp;
if ( n < 0 )
return 0;
while ( startpos > 0 && sp->str[ startpos - 1 ] != '\n' )
startpos--;
tmp = g... | false | false | false | false | false | 0 |
ipath_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
struct ib_send_wr **bad_wr)
{
struct ipath_qp *qp = to_iqp(ibqp);
int err = 0;
for (; wr; wr = wr->next) {
err = ipath_post_one_send(qp, wr);
if (err) {
*bad_wr = wr;
goto bail;
}
}
/* Try to do the send work in the caller's context. */... | false | false | false | false | false | 0 |
probe_design_send_data(T_PT_PDC pdc) {
// int i;
// char buffer[256];
if (aisc_put(pd_gl.link,PT_PDC, pdc, PDC_CLIPRESULT, P.DESIGNCPLIPOUTPUT, NULL))
return 1;
return 0;
} | false | false | false | false | false | 0 |
nm_device_modem_get_modem_capabilities (NMDeviceModem *self)
{
g_return_val_if_fail (self != NULL, NM_DEVICE_MODEM_CAPABILITY_NONE);
g_return_val_if_fail (NM_IS_DEVICE_MODEM (self), NM_DEVICE_MODEM_CAPABILITY_NONE);
_nm_object_ensure_inited (NM_OBJECT (self));
return NM_DEVICE_MODEM_GET_PRIVATE (self)->caps;
} | false | false | false | false | false | 0 |
buf_destroy (buf)
struct Buf *buf;
{
if (buf && buf->elts)
flex_free (buf->elts);
buf->elts = (void *) 0;
} | false | false | false | true | false | 1 |
print_all_uri_handlers (void)
{
GList *plugins, *p, *features, *f;
plugins = gst_registry_get_plugin_list (gst_registry_get ());
for (p = plugins; p; p = p->next) {
GstPlugin *plugin = (GstPlugin *) (p->data);
features =
gst_registry_get_feature_list_by_plugin (gst_registry_get (),
gst_... | false | false | false | false | false | 0 |
qib_portcntr_7220(struct qib_pportdata *ppd, u32 reg)
{
u64 ret = 0ULL;
struct qib_devdata *dd = ppd->dd;
u16 creg;
/* 0xffff for unimplemented or synthesized counters */
static const u16 xlator[] = {
[QIBPORTCNTR_PKTSEND] = cr_pktsend,
[QIBPORTCNTR_WORDSEND] = cr_wordsend,
[QIBPORTCNTR_PSXMITDATA] = cr_psxm... | false | false | false | false | false | 0 |
setDisplayEdge (displayd * dpy, GGobiData * e)
{
GList *l;
GGobiData *old = NULL;
if (resolveEdgePoints (e, dpy->d)) {
dpy->e = e;
/* Now update all displays, not just this one. Events could also be used,
but this is not too bad. */
GGOBI (edge_menus_update) (e->gg);
}
for (l = dpy->splot... | false | false | false | false | false | 0 |
visit(ir_assignment *ir)
{
printf("(assign ");
if (ir->condition)
ir->condition->accept(this);
char mask[5];
unsigned j = 0;
for (unsigned i = 0; i < 4; i++) {
if ((ir->write_mask & (1 << i)) != 0) {
mask[j] = "xyzw"[i];
j++;
}
}
mask[j] = '\0';
printf(" (%s) ", mask);
... | false | false | false | false | false | 0 |
krb5_init_creds_get_error(krb5_context context,
krb5_init_creds_context ctx,
krb5_error **error)
{
krb5_error_code code;
krb5_error *ret = NULL;
*error = NULL;
if (ctx->err_reply == NULL)
return 0;
ret = k5alloc(sizeof(*ret), &code);
... | false | false | false | false | false | 0 |
track_params(struct i915_fragment_program *p)
{
GLint i;
if (p->nr_params)
_mesa_load_state_parameters(p->ctx, p->FragProg.Base.Parameters);
for (i = 0; i < p->nr_params; i++) {
GLint reg = p->param[i].reg;
COPY_4V(p->constant[reg], p->param[i].values);
}
p->params_uptodate = 1;
p... | false | false | false | false | false | 0 |
test_accum_overlap_size(void)
{
int i = 0;
int32_t *wbuf, *rbuf;
TESTING("overlapping write to accumulator larger then accum_size");
/* Allocate buffers */
wbuf = (int32_t *)HDmalloc(4096 * sizeof(int32_t));
HDassert(wbuf);
rbuf = (int32_t *)HDcalloc(4096, sizeof(int32_t));
HDassert(rb... | false | false | false | false | false | 0 |
ReadLevel (char *filename)
{
int entnum;
FILE *f;
int i;
void *base;
edict_t *ent;
size_t size;
f = fopen (filename, "rb");
if (!f)
gi.error ("Couldn't open %s", filename);
// free any dynamic memory allocated by loading the level
// base state
gi.FreeTags (TAG_LEVEL);
// wipe all the entities
memse... | false | false | false | false | true | 1 |
Show (const QString &Title, const QString &Message)
{
t_DlgWait *pDlg;
pDlg = new t_DlgWait (Title, Message);
pDlg->setModal (true);
pDlg->show ();
pDlg->exec ();
delete pDlg;
return NO_ERROR;
} | false | false | false | false | false | 0 |
getProperties() const
{
PreviewProperties prop;
prop.id_ = id_;
prop.size_ = size_;
prop.width_ = width_;
prop.height_ = height_;
return prop;
} | false | false | false | false | false | 0 |
string_hash(const u08bits *str) {
u32bits hash = 0;
int c = 0;
while ((c = *str++))
hash = c + (hash << 6) + (hash << 16) - hash;
return hash;
} | false | false | false | false | false | 0 |
get_jcr_by_id(uint32_t JobId)
{
JCR *jcr;
foreach_jcr(jcr) {
if (jcr->JobId == JobId) {
jcr->inc_use_count();
Dmsg3(dbglvl, "Inc get_jcr jid=%u use_count=%d Job=%s\n",
jcr->JobId, jcr->use_count(), jcr->Job);
break;
}
}
endeach_jcr(jcr);
return jcr;
} | false | false | false | false | false | 0 |
DoCompressed (struct ras_progressive_state *context,
const guchar * buf, guint size,
GError **error)
{
int i;
for (i = 0; i < size; i++) {
switch (context->DecoderState) {
case 0:
if (buf[i] == 0x80)
context->DecoderState = 1;
else
context->LineBuf[context->LineDon... | false | false | false | false | false | 0 |
mppe_rekey(struct ppp_mppe_state * state, int initial_key)
{
struct scatterlist sg_in[1], sg_out[1];
struct blkcipher_desc desc = { .tfm = state->arc4 };
get_new_key_from_sha(state);
if (!initial_key) {
crypto_blkcipher_setkey(state->arc4, state->sha1_digest,
state->keylen);
sg_init_table(sg_in, 1);
sg_... | false | true | false | false | false | 1 |
evas_map_new(int count)
{
if (count != 4)
{
ERR("map point count (%i) != 4 is unsupported!", count);
return NULL;
}
return _evas_map_new(count);
} | false | false | false | false | false | 0 |
initctx1(isc_task_t *task, isc_event_t *event) {
isc_result_t result;
isc_buffer_t buf;
dns_message_t *query;
dns_request_t *request;
int c;
isc_event_free(&event);
printf("Initctx - GSS name => ");
c = scanf("%s", gssid);
if (c == EOF)
return;
sprintf(contextname, "gsstest.context.%d.", (int)time(NULL))... | false | false | false | false | false | 0 |
text_array_get(struct text_array *t, int x, int y)
{
if(x < 0 || y < 0 || x >= t->width || y >= t->height)
return 0;
return t->data[y * t->width + x];
} | false | false | false | false | false | 0 |
build_sn_cm_priors( database_DS data_base, att_DS att)
{
int n;
float range, sigma_min, sigma_max;
priors_DS priors;
real_stats_DS statistics = att->r_statistics;/* Attribute range information */
range = statistics->mx - statistics->mn;
sigma_min = SN_CM_SIGMA_SAFETY_FACTOR * att->error;
... | false | false | false | false | false | 0 |
hextoint16 (char *buf)
{
static char *htab = "0123456789abcdef";
int16 val = 0;
int i;
for ( i = 0; i < 4; i++ )
val = ( val << 4 ) | ( strchr( htab, buf[i] ) - htab );
return val;
} | false | false | false | false | false | 0 |
fat_compat_dir_ioctl(struct file *filp, unsigned cmd,
unsigned long arg)
{
struct inode *inode = file_inode(filp);
struct compat_dirent __user *d1 = compat_ptr(arg);
int short_only, both;
switch (cmd) {
case VFAT_IOCTL_READDIR_SHORT32:
short_only = 1;
both = 0;
break;
case VFAT_IOCTL_READDIR_BOTH32:
... | false | false | false | false | false | 0 |
cmd_reset_branch(void)
{
struct branch *b;
char *sp;
/* Obtain the branch name from the rest of our command */
sp = strchr(command_buf.buf, ' ') + 1;
b = lookup_branch(sp);
if (b) {
hashclr(b->sha1);
hashclr(b->branch_tree.versions[0].sha1);
hashclr(b->branch_tree.versions[1].sha1);
if (b->branch_tree.tr... | false | false | false | false | false | 0 |
SCPI_NumberToStr(scpi_t * context, const scpi_choice_def_t * special, scpi_number_t * value, char * str, size_t len) {
const char * type;
const char * unit;
size_t result;
if (!value || !str) {
return 0;
}
if (SCPI_ChoiceToName(special, value->type, &type)) {
strncpy(str, type,... | false | false | false | false | false | 0 |
EnvFactExistp(
void *theEnv,
void *vTheFact)
{
#if MAC_MCW || IBM_MCW || MAC_XCD
#pragma unused(theEnv)
#endif
struct fact *theFact = (struct fact *) vTheFact;
if (theFact == NULL) return(FALSE);
if (theFact->garbage) return(FALSE);
return(TRUE);
} | false | false | false | false | false | 0 |
getIndex(const XMLString& namespaceURI, const XMLString& localName) const
{
int i = 0;
AttributeVec::const_iterator it;
for (it = _attributes.begin(); it != _attributes.end(); ++it)
{
if (it->namespaceURI == namespaceURI && it->localName == localName) return i;
++i;
}
return -1;
} | false | false | false | false | false | 0 |
sync_vector_resize(struct vector *vector, size_t size)
{
size_t i;
char **strings;
/* If we're shrinking the vector, free the excess strings. */
if (vector->count > size) {
for (i = size; i < vector->count; i++)
free(vector->strings[i]);
vector->count = size;
}
/* I... | false | false | false | false | false | 0 |
destroy_phar_data_only(void *pDest) /* {{{ */
{
phar_archive_data *phar_data = *(phar_archive_data **) pDest;
TSRMLS_FETCH();
if (EG(exception) || --phar_data->refcount < 0) {
phar_destroy_phar_data(phar_data TSRMLS_CC);
}
} | false | false | false | false | false | 0 |
checkMenu()
{
if (main->namedSearches->getList().count() || text() != "") toolButton->show();
else toolButton->hide();
} | false | false | false | false | false | 0 |
_vala_unity_playlist_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
UnityPlaylist * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, UNITY_TYPE_PLAYLIST, UnityPlaylist);
switch (property_id) {
case UNITY_PLAYLIST_ID:
g_value_set_string (value, unity_playlist_get_id (self... | false | false | false | false | false | 0 |
amd_get_topo(struct amd_ntb_dev *ndev)
{
void __iomem *mmio = ndev->self_mmio;
u32 info;
info = readl(mmio + AMD_SIDEINFO_OFFSET);
if (info & AMD_SIDE_MASK)
return NTB_TOPO_SEC;
else
return NTB_TOPO_PRI;
} | false | false | false | false | false | 0 |
WriteDescriptorSet(
const vector<const FileDescriptor*> parsed_files) {
FileDescriptorSet file_set;
set<const FileDescriptor*> already_added;
vector<const FileDescriptor*> to_add(parsed_files);
while (!to_add.empty()) {
const FileDescriptor* file = to_add.back();
to_add.pop_back();
if (already_... | false | false | false | false | false | 0 |
JPEG_CheckFormat ( XMP_FileFormat format,
XMP_StringPtr filePath,
LFA_FileRef fileRef,
XMPFiles * parent )
{
IgnoreParam(format); IgnoreParam(filePath); IgnoreParam(parent);
XMP_Assert ( format == kXMP_JPEGFile );
IOBuffer ioBuf;
LFA_See... | false | false | false | false | false | 0 |
back_patch(void)
{
struct instruction *cur_instr;
for (cur_instr = STAILQ_FIRST(&seq_program);
cur_instr != NULL;
cur_instr = STAILQ_NEXT(cur_instr, links)) {
if (cur_instr->patch_label != NULL) {
struct ins_format3 *f3_instr;
u_int address;
if (cur_instr->patch_label->type != LABEL) {
ch... | false | false | false | false | false | 0 |
ss_median5(const unsigned char *Td, const int *PA,
int *v1, int *v2, int *v3, int *v4, int *v5) {
int *t;
if(Td[PA[*v2]] > Td[PA[*v3]]) { SWAP(v2, v3); }
if(Td[PA[*v4]] > Td[PA[*v5]]) { SWAP(v4, v5); }
if(Td[PA[*v2]] > Td[PA[*v4]]) { SWAP(v2, v4); SWAP(v3, v5); }
if(Td[PA[*v1]] > Td[PA[*v3]]) { SWA... | false | false | false | false | false | 0 |
hsh2row3(int l, int ua, int ub, int ux, int j, real_t a1, real_t a2,
real_t **a, real_t **b, real_t **x)
{
real_t *allocate_real_vector(int, int);
void free_real_vector(real_t *, int);
void hshvectam(int, int, int, int, real_t, real_t [], real_t **);
real_t *v,d1,d2,s1,s2,r,d,c;
if (a2 != 0.0) {
v=allocate... | false | false | false | false | false | 0 |
zynqmp_qspi_setup_transfer(struct spi_device *qspi,
struct spi_transfer *transfer)
{
struct zynqmp_qspi *xqspi = spi_master_get_devdata(qspi->master);
ulong clk_rate;
u32 config_reg, req_hz, baud_rate_val = 0;
if (transfer)
req_hz = transfer->speed_hz;
else
req_hz = qspi->max_speed_hz;
/* Set the ... | false | false | false | false | false | 0 |
FuncIO_fchown(Obj self,Obj fd,Obj owner,Obj group)
{
Int res;
if (!IS_INTOBJ(fd) || !IS_INTOBJ(owner) || !IS_INTOBJ(group)) {
SyClearErrorNo();
return Fail;
} else {
res = fchown(INT_INTOBJ(fd),INT_INTOBJ(owner),INT_INTOBJ(group));
if (res < 0) {
SySetErrorNo();
return ... | false | false | false | false | false | 0 |
AMF_EncodeInt32(char *output, char *outend, int nVal)
{
if (output+4 > outend)
return NULL;
output[3] = nVal & 0xff;
output[2] = nVal >> 8;
output[1] = nVal >> 16;
output[0] = nVal >> 24;
return output+4;
} | false | false | false | false | false | 0 |
antlr3readAscii(pANTLR3_INPUT_STREAM input, pANTLR3_UINT8 fileName)
{
ANTLR3_FDSC infile;
ANTLR3_UINT32 fSize;
/* Open the OS file in read binary mode
*/
infile = antlr3Fopen(fileName, "rb");
/* Check that it was there
*/
if (infile == NULL)
{
return (ANTLR3_UINT32)ANTLR3_ERR_NOFILE;
}
/* I... | false | false | false | false | true | 1 |
imProcessDirectConv(const imImage* src_image, imImage* dst_image)
{
int count = src_image->count*src_image->depth;
switch(src_image->data_type)
{
case IM_SHORT:
DoDirectConv((short*)src_image->data[0], (imbyte*)dst_image->data[0], c... | false | false | false | false | false | 0 |
kill_obj(piece_info_t *obj, loc_t loc)
{
void kill_one();
piece_info_t **list;
view_map_t *vmap;
vmap = MAP(obj->owner);
list = LIST(obj->owner);
while (obj->cargo != NULL) /* kill contents */
kill_one (list, obj->cargo);
kill_one (list, obj);
scan (vmap, loc); /* scan around new ... | false | false | false | false | false | 0 |
GetPermissions(const std::string& file, mode_t& mode)
{
#if defined(_WIN32)
DWORD attr =
GetFileAttributesW(Encoding::ToWindowsExtendedPath(file).c_str());
if (attr == INVALID_FILE_ATTRIBUTES) {
return false;
}
if ((attr & FILE_ATTRIBUTE_READONLY) != 0) {
mode = (_S_IREAD | (_S_IREAD >> 3) | (_S_IRE... | false | false | false | false | false | 0 |
hexconvert(char a, char b)
{
if ( a >= 'A' && a <= 'F')
a -= 'A'-10;
if ( b >= 'A' && b <= 'F')
b -= 'B'-10;
return ( (a & 15) * 16 + (b & 15));
} | false | false | false | false | false | 0 |
create_save_file_window (void)
{
GtkWidget *save_file_window;
GtkWidget *saveselection_button_ok;
GtkWidget *saveselection_button_cancel;
save_file_window = gtk_file_selection_new (_("Save Session"));
gtk_widget_set_name (save_file_window, "save_file_window");
gtk_container_set_border_width (GTK_CONTAINER ... | false | false | false | false | false | 0 |
base64_encode(FILE * fp, unsigned char *data, int datalen, int cpl)
{
int linelen = 0;
char out[4];
int n, i;
while (datalen > 0) {
n = (datalen < 3 ? datalen : 3);
base64_encode_atom(data, n, out);
data += n;
datalen -= n;
for (i = 0; i < 4; i++) {
if (linelen >= cpl) {
linelen = 0;
fput... | true | true | false | false | false | 1 |
kill_dfa(dfa_t *pdfa)
{
free(pdfa->states);
free(pdfa->indexes);
if (dfa_verbose > 1)
fprintf(stderr, "dfa %s is dead :(\n", pdfa->name);
memset(pdfa, 0, sizeof(dfa_t));
} | false | false | false | false | false | 0 |
is_empty(char *s)
{
while (*s == ' ' || *s == '\t' || *s == '\n')
s++;
return (TBOOLEAN) (*s == '#' || *s == '\0');
} | false | false | false | false | false | 0 |
aw_status_wait_for_open(int fd)
{
char *str = 0;
int cmd;
int erg;
for (cmd = 0; cmd != AW_STATUS_CMD_INIT;) {
for (erg = 0; !erg; ) {
struct timeval timeout;
timeout.tv_sec = AW_STATUS_PIPE_CHECK_DELAY / 1000;
timeout.tv_usec = AW_STATUS_PIPE_CHECK_DELAY % ... | false | false | false | false | false | 0 |
lm3533_update(struct lm3533 *lm3533, u8 reg, u8 val, u8 mask)
{
int ret;
dev_dbg(lm3533->dev, "update [%02x]: %02x/%02x\n", reg, val, mask);
ret = regmap_update_bits(lm3533->regmap, reg, mask, val);
if (ret < 0) {
dev_err(lm3533->dev, "failed to update register %02x: %d\n",
reg, ret);
}
return ret;
} | false | false | false | false | false | 0 |
sarrayConvertFilesToPS(SARRAY *sa,
l_int32 res,
const char *fileout)
{
char *fname;
l_int32 i, d, nfiles, index, firstfile, format;
FILE *fp;
PIX *pix, *pixt;
PROCNAME("sarrayConvertFilesToPS");
if (!sa)
return ERROR_INT("sa not defin... | false | false | false | false | false | 0 |
UpdateUpgradePage(bool FirstTime)
{
if (!FirstTime) {
return;
}
char *Version;
int ret = hdhomerun_device_get_version(SelectedDev->hd, &Version, NULL);
if (ret < 0) {
CommunicationError();
return;
}
if (ret == 0) {
/* Unknown firmware */
return;
}
GString *cFirmware = g_string_new(NULL);
g_string... | false | false | false | false | false | 0 |
CompileEndif(void)
{//===================
USHORT *p;
int chain;
int offset;
if(if_level < 1)
{
error("ENDIF not expected",NULL);
return(0);
}
FillThen(0);
if((p = if_stack[if_level].p_else) != NULL)
{
do
{
chain = *p; // a chain of previous else links
offset = prog_out - p;
if(offset > ... | false | false | false | false | false | 0 |
_bits_per_coord (u_int8_t base, int is_signed)
{
int n= 2;
if ( base <= 9 ) n+= base;
else n+= (2*base-9);
if ( is_signed ) ++n;
return n;
} | false | false | false | false | false | 0 |
LI38__CO1CONS__cmpfun(V379,V380)
object V379;object V380;
{ VMB38 VMS38 VMV38
goto TTL;
TTL:;
{register object V381;
if(((long)length((V380)))==((long)2)){
goto T975;}
V381= Cnil;
goto T974;
goto T975;
T975:;
V381= (*(LnkLI267))((V380));
goto T974;
T974:;
if(((((V381))==((V380))?Ct:Cnil))==Cnil){
goto T977... | false | false | false | false | false | 0 |
au_call_dpages_append(void *_arg, struct dentry *dentry)
{
enum d_walk_ret ret;
struct ac_dpages_arg *arg = _arg;
ret = D_WALK_CONTINUE;
if (dentry->d_sb == arg->sb
&& !IS_ROOT(dentry)
&& au_dcount(dentry) > 0
&& au_di(dentry)
&& (!arg->test || arg->test(dentry, arg->arg))) {
arg->err = au_dp... | false | false | false | false | false | 0 |
print_time_to_string(char* str, struct icaltimetype *data)
{
char temp[20];
if (data->is_utc == 1){
sprintf(temp,"%02d%02d%02dZ",data->hour,data->minute,data->second);
} else {
sprintf(temp,"%02d%02d%02d",data->hour,data->minute,data->second);
}
strcat(str,temp);
} | true | true | false | false | false | 1 |
vTimerSetTimerID( TimerHandle_t xTimer, void *pvNewID )
{
Timer_t * const pxTimer = ( Timer_t * ) xTimer;
configASSERT( xTimer );
taskENTER_CRITICAL();
{
pxTimer->pvTimerID = pvNewID;
}
taskEXIT_CRITICAL();
} | false | false | false | true | false | 1 |
seq_name(InputSeq* code, char* buffer, unsigned max)
{
int j;
char* dest = buffer;
for(j=0;j<SEQ_MAX;++j)
{
const char* name;
/* this reduces those pesky "blah or n/a" constructs */
if (((*code)[j]==CODE_OR) && (j+1>=SEQ_MAX || !strcmp(code_name((*code)[j+1]), "n/a")))
{
++j;
continue;
... | false | false | true | false | true | 1 |
afr_link_unwind (call_frame_t *frame, xlator_t *this)
{
call_frame_t *main_frame = NULL;
afr_local_t *local = NULL;
struct iatt *unwind_buf = NULL;
local = frame->local;
LOCK (&frame->lock);
{
if (local->transaction.main_frame) {
... | false | false | false | false | false | 0 |
renamed_file_attributes_ready_cb (GthFileSource *file_source,
GList *files,
GError *error,
gpointer user_data)
{
RenameData *rename_data = user_data;
GthBrowser *browser = rename_data->browser;
GthFileData *file_data;
if (error != NULL) {
rename_data_free (rename_data);
... | false | false | false | false | false | 0 |
umount_one_bw (const char *file, struct mntentchn *mc0) {
struct mntentchn *mc;
int res = 1;
mc = mc0;
while (res && mc) {
res = umount_one(mc->m.mnt_fsname, mc->m.mnt_dir,
mc->m.mnt_type, mc);
mc = getmntdirbackward(file, mc);
}
mc = mc0;
while (res && mc) {
res = umount_one(mc->m.mnt_fsname, mc->m.... | false | false | false | false | false | 0 |
parse_c_i(struct parser *p) {
struct player_class *c = parser_priv(p);
if (!c)
return PARSE_ERROR_MISSING_RECORD_HEADER;
c->c_mhp = parser_getint(p, "mhp");
c->c_exp = parser_getint(p, "exp");
c->sense_base = parser_getint(p, "sense-base");
c->sense_div = parser_getint(p, "sense-div");
return PARSE_ERROR_NONE... | false | false | false | false | false | 0 |
setInt(const std::wstring &key, int value)
{
setValue(key, new IntValue(value));
} | false | false | false | false | false | 0 |
findfiletype (const char *name, int searchnames, int *deformatter)
{
char * cp; /* Pointer into suffix list */
int cplen; /* Length of current suffix */
register int i; /* Index into type table */
int len; /* Length of the name */
/*
* Note: for now, the deformatter is set to 1 for t... | false | false | false | false | false | 0 |
get_history(const char *nick, time_t timelimit)
{
struct Whowas *temp;
uint32_t nhash;
timelimit = rb_current_time() - timelimit;
nhash = hash_whowas_name(nick);
temp = WHOWASHASH[nhash];
for(; temp; temp = temp->next)
{
if(irccmp(nick, temp->name))
continue;
if(temp->logoff < timelimit)
continue;
r... | false | false | false | false | false | 0 |
check_send_queue(struct hub_info* hub, struct hub_user* user, struct adc_message* msg)
{
if (user_flag_get(user, flag_user_list))
return 1;
if ((user->send_queue->size + msg->length) > get_max_send_queue(hub))
{
LOG_WARN("send queue overflowed, message discarded.");
return -1;
}
if (user->send_queue->size ... | false | false | false | false | false | 0 |
GetNextFeature()
{
while( TRUE )
{
OGRFeature *poFeature;
poFeature = GetNextRawFeature();
if( poFeature == NULL )
return NULL;
if( (m_poFilterGeom == NULL
|| FilterGeometry( poFeature->GetGeometryRef() ) )
&& (m_poAttrQuer... | false | false | false | false | false | 0 |
H5HF_read(H5HF_t *fh, hid_t dxpl_id, const void *_id, void *obj/*out*/)
{
const uint8_t *id = (const uint8_t *)_id; /* Object ID */
uint8_t id_flags; /* Heap ID flag bits */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5HF_read, FAIL)
/*
* Check... | false | false | false | false | false | 0 |
cogl_snippet_set_declarations (CoglSnippet *snippet,
const char *declarations)
{
_COGL_RETURN_IF_FAIL (cogl_is_snippet (snippet));
if (!_cogl_snippet_modify (snippet))
return;
g_free (snippet->declarations);
snippet->declarations = declarations ? g_strdup (declarations) : NU... | false | false | false | false | false | 0 |
write() {
ASCString output;
output = topCategory.toString();
std::ofstream ofs(fileName.c_str());
ofs << output << std::endl;
ofs.close();
} | false | false | false | false | false | 0 |
root_recv_buffer(int sock, int *op, char *buffer, int buflen)
{
/* recv a buffer, the form is
<len>
<op>
<buffer>
*/
int recv1 = 0;
int len;
int status;
char recbuf[MAXLEN];
status = NET_RecvRaw(sock,&len,4);
#ifdef DEBUG
printf("Recv: status from rec is %d\n",status);
#endif
if (sta... | true | true | false | false | false | 1 |
cmd_slot_enable_nio(hypervisor_conn_t *conn,int argc,char *argv[])
{
vm_instance_t *vm;
u_int slot,port;
if (!(vm = hypervisor_find_object(conn,argv[0],OBJ_TYPE_VM)))
return(-1);
slot = atoi(argv[1]);
port = atoi(argv[2]);
if (vm_slot_enable_nio(vm,slot,port) == -1) {
vm_release(vm);
... | false | false | false | false | true | 1 |
apply(const plan *ego_, R *I, R *O)
{
const P *ego = (const P *) ego_;
plan_dft *cld1, *cld2;
plan_rdft *cldt;
INT roff = ego->roff, ioff = ego->ioff;
/* DFT local dimensions */
cld1 = (plan_dft *) ego->cld1;
if (ego->preserve_input) {
cld1->apply(ego->cld1, I+roff, I+ioff, O... | false | false | false | false | false | 0 |
tls_certificate_got_all_cb (TpProxy *proxy,
GHashTable *properties,
const GError *error,
gpointer user_data,
GObject *weak_object)
{
GPtrArray *cert_data;
TpTLSCertificate *self = TP_TLS_CERTIFICATE (proxy);
guint state;
guint i;
if (error != NULL)
{
tp_proxy_invalidate (proxy, erro... | false | false | false | false | false | 0 |
flickcurl_free_note(flickcurl_note *note)
{
FLICKCURL_ASSERT_OBJECT_POINTER_RETURN(note, flickcurl_note);
if(note->author)
free(note->author);
if(note->authorname)
free(note->authorname);
if(note->text)
free(note->text);
free(note);
} | false | false | false | false | false | 0 |
gf_ipmpx_data_parse_16(char *val, u16 **outData, u16 *outDataSize)
{
char szVal[50];
u32 i, j, len, v, alloc, count;
u16 *data = (u16*)gf_malloc(sizeof(u16) * 100);
alloc = 100;
len = strlen(val);
count = j = 0;
for (i=0; i<len; i++) {
switch (val[i]) {
case '\'': case '\"': case ',': case ' ':
break;
... | true | true | false | false | true | 1 |
need(int nlines)
{
if (nlines <= 0)
return;
trace(("wide_output_header::need(this = %08lX, nlines = %d)\n{\n",
(long)this, nlines));
flush();
if (line_number > 0 && line_number + nlines > length)
put_wc(L'\f');
trace(("}\n"));
} | false | false | false | false | false | 0 |
mapToVertGID(Guint orgGID)
{
Guint mapped;
if (gsubFeatureTable == 0) return orgGID;
if ((mapped = doMapToVertGID(orgGID)) != 0) {
return mapped;
}
return orgGID;
} | false | false | false | false | false | 0 |
snd_hdsp_midi_read_byte (struct hdsp *hdsp, int id)
{
/* the hardware already does the relevant bit-mask with 0xff */
if (id)
return hdsp_read(hdsp, HDSP_midiDataIn1);
else
return hdsp_read(hdsp, HDSP_midiDataIn0);
} | false | false | false | false | false | 0 |
is_append_prev_kick_order(Kick_order *src,
IntSet syncs_mts,
Boolean post_mt_checkf)
{
if (number_IntSet(syncs_mts) != 0
&& number_IntSet(src->syncs_mts) == 0)
return FALSE;
if (!post_mt_checkf && src->post_mt_checkf)
return FALSE;
... | false | false | false | false | false | 0 |
netsnmp_insert_iterator_context(netsnmp_request_info *request, void *data)
{
netsnmp_request_info *req;
netsnmp_table_request_info *table_info = NULL;
netsnmp_variable_list *this_index = NULL;
netsnmp_variable_list *that_index = NULL;
oid base_oid[] = {0, 0}; /* Make sure index ... | false | false | false | false | false | 0 |
c_lex (value)
tree *value;
{
const cpp_token *tok;
retry:
timevar_push (TV_CPP);
do
tok = cpp_get_token (parse_in);
while (tok->type == CPP_PADDING);
timevar_pop (TV_CPP);
/* The C++ front end does horrible things with the current line
number. To ensure an accurate line number, we must re... | false | false | false | false | false | 0 |
getNeighbourPointOverflow(long x, long y, NeighbourIndex *outindex, long *outx, long *outy) const
{
if (x < 0)
{
*outx = x + mSize - 1;
if (y < 0)
*outindex = NEIGHBOUR_SOUTHWEST;
else if (y >= mSize)
*outindex = NEIGHBOUR_NORTHWEST... | false | false | false | false | false | 0 |
gfire_buddy_request_p2p(gfire_buddy *p_buddy, gboolean p_notify)
{
if(!p_buddy || p_buddy->p2p)
return;
if(!gfire_has_p2p(p_buddy->gc->proto_data))
return;
gfire_p2p_connection *p2p_con = gfire_get_p2p(p_buddy->gc->proto_data);
purple_debug_info("gfire", "Sending P2P request to buddy %s...\n", gfire_buddy_ge... | false | false | false | false | false | 0 |
http_rx_chunk_len ( struct http_request *http, char *length ) {
char *endp;
/* Skip blank lines between chunks */
if ( length[0] == '\0' )
return 0;
/* Parse chunk length */
http->chunk_remaining = strtoul ( length, &endp, 16 );
if ( *endp != '\0' ) {
DBGC ( http, "HTTP %p invalid chunk length \"%s\"\n",
... | 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.