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 |
|---|---|---|---|---|---|---|
transformLog(bool xlog, bool ylog) {
if (xlog) {
for (unsigned int i = 0; i < size(); i++) {
m_X[i] = log10(m_X[i]);
}
}
if (ylog) {
for (unsigned int i = 0; i < size(); i++) {
m_Y[i] = log10(m_Y[i]);
}
}
} | false | false | false | false | false | 0 |
glade_project_verify_property (GladeProperty *property)
{
GladeWidget *widget;
GladeProject *project;
g_return_if_fail (GLADE_IS_PROPERTY (property));
widget = glade_property_get_widget (property);
project = glade_widget_get_project (widget);
if (project)
glade_project_verify_property_internal (pro... | false | false | false | false | false | 0 |
gee_tree_map_entry_set_real_tail_set (GeeAbstractSortedSet* base, GeeMapEntry* after) {
GeeTreeMapEntrySet * self;
GeeSortedSet* result = NULL;
GeeTreeMap* _tmp0_ = NULL;
GeeTreeMap* _tmp1_ = NULL;
GeeMapEntry* _tmp2_ = NULL;
gconstpointer _tmp3_ = NULL;
gconstpointer _tmp4_ = NULL;
GeeTreeMapRange* _tmp5_ = NU... | false | false | false | false | false | 0 |
option_color_command(int argc, const char *argv[])
{
struct line_info *info;
if (argc != 3 && argc != 4) {
config_msg = "Wrong number of arguments given to color command";
return ERR;
}
info = get_line_info(argv[0]);
if (!info) {
static const struct enum_map obsolete[] = {
ENUM_MAP("main-delim", LINE_DE... | false | false | false | false | false | 0 |
fz_paint_affine_solid_g2rgb_lerp(byte *dp, byte *sp, int sw, int sh, int u, int v, int fa, int fb, int w, byte *hp)
{
while (w--)
{
int ui = u >> 16;
int vi = v >> 16;
if (ui >= 0 && ui < sw && vi >= 0 && vi < sh)
{
int uf = u & 0xffff;
int vf = v & 0xffff;
byte *a = sample_nearest(sp, sw, sh, 2, ui,... | false | false | false | false | false | 0 |
getAs3DObject(mrpt::opengl::CSetOfObjectsPtr &outSetOfObj ) const
{
if (!genericMapParams.enableSaveAs3DObject) return;
MRPT_START
opengl::CTexturedPlanePtr outObj = opengl::CTexturedPlane::Create();
outObj->setPlaneCorners(x_min,x_max,y_min,y_max);
outObj->setLocation(0,0, insertionOptions.mapAltitude );
//... | false | false | false | false | false | 0 |
gncOwnerGetBalanceInCurrency (const GncOwner *owner,
const gnc_commodity *report_currency)
{
gnc_numeric balance = gnc_numeric_zero ();
GList *acct_list, *acct_node, *acct_types, *lot_list = NULL, *lot_node;
QofBook *book;
gnc_commodity *owner_currency;
GNCPriceDB *pdb;... | false | false | false | false | false | 0 |
caribou_scanner_unconfigure_switch (CaribouScanner* self) {
CaribouScannerUnconfigureSwitchFunc _tmp0_ = NULL;
void* _tmp0__target = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->unconfigure_switch_func;
_tmp0__target = self->priv->unconfigure_switch_func_target;
if (_tmp0_ != NULL) {
CaribouScann... | false | false | false | false | false | 0 |
freecomm(comm, nown)
command_t *comm;
int nown;
{
int i;
if (!comm) return;
if (comm -> argv) {
if (isstatement(comm))
freestree((syntaxtree *)(comm -> argv));
else for (i = 0; i <= comm -> argc; i++)
Xfree(comm -> argv[i]);
Xfree(comm -> argv);
}
if (comm -> redp) {
closeredirect(comm -> redp);
f... | false | false | false | false | false | 0 |
egg_asn1x_get_element_raw (GNode *node)
{
Anode *an;
Atlv *tlv;
g_return_val_if_fail (node != NULL, NULL);
an = node->data;
tlv = an->parsed;
/* If this node is explicit, then just get the contents */
if (tlv && anode_calc_explicit_for_flags (node, anode_def_flags (node), NULL))
tlv = tlv->child;
if (!tlv... | false | false | false | false | false | 0 |
xmms_playlist_current_pos_msg_send (xmms_playlist_t *playlist,
GTree *dict)
{
g_return_if_fail (playlist);
g_return_if_fail (dict);
xmms_object_emit_f (XMMS_OBJECT (playlist),
XMMS_IPC_SIGNAL_PLAYLIST_CURRENT_POS,
XMMSV_TYPE_DICT,
... | false | false | false | false | false | 0 |
syncop_readv (xlator_t *subvol, fd_t *fd, size_t size, off_t off,
uint32_t flags, struct iovec **vector, int *count,
struct iobref **iobref)
{
struct syncargs args = {0, };
SYNCOP (subvol, (&args), syncop_readv_cbk, subvol->fops->readv,
fd, size, off, flags, ... | false | false | false | false | false | 0 |
locate_grouping_columns(PlannerInfo *root,
List *tlist,
List *sub_tlist,
AttrNumber *groupColIdx)
{
int keyno = 0;
ListCell *gl;
/*
* No work unless grouping.
*/
if (!root->parse->groupClause)
{
Assert(groupColIdx == NULL);
return;
}
Assert(groupColIdx != NULL);
foreach(gl, root-... | false | false | false | false | false | 0 |
mpzspm_product_tree_clear (mpzspm_t mpzspm)
{
unsigned int i, j;
unsigned int n = mpzspm->sp_num;
unsigned int d = mpzspm->d;
mpzv_t *T = mpzspm->T;
if (T == NULL) /* use the slow method */
return;
for (i = 0; i <= d; i++)
{
for (j = 0; j < n; j++)
mpz_clear (T[i][j]);
free (T[... | false | false | false | false | false | 0 |
currval_oid(PG_FUNCTION_ARGS)
{
Oid relid = PG_GETARG_OID(0);
int64 result;
SeqTable elm;
Relation seqrel;
/* open and AccessShareLock sequence */
init_sequence(relid, &elm, &seqrel);
if (pg_class_aclcheck(elm->relid, GetUserId(), ACL_SELECT) != ACLCHECK_OK &&
pg_class_aclcheck(elm->relid, GetUserId(), AC... | false | false | false | false | false | 0 |
relax_dirichlet_stencil (FttCell * cell, RelaxStencilParams * p)
{
GfsGradient g;
FttCellNeighbors neighbor;
FttCellFace f;
GfsGradient ng;
GfsVariable * id = p->lp->id;
GfsStencil * stencil = gfs_stencil_new (cell, p->lp, 0.);
g.a = GFS_VALUE (cell, p->dia);
if (GFS_IS_MIXED (cell) && ((cell)->flags ... | false | false | false | false | false | 0 |
bi_prob(NGRAM_INFO *ndata, WORD_ID w1, WORD_ID w2)
{
LOGPROB p;
if (ndata->bigram_index_reversed) {
/* old binary format */
/* RL 3-gram with additional LR 2-gram, index by LR */
/* indexes are LR (swap not needed), probs are in additional area */
p = bi_prob_additional_oldbin(ndata, w1, w2);
} el... | false | false | false | false | false | 0 |
find_mode(const char *name)
{
int i = index_in_strings(mode_name, name);
return i >= 0 ? &mode_info[i] : NULL;
} | false | false | false | false | false | 0 |
cb_line_color_changed (GOSelector *selector,
StylePrefState *state)
{
GOStyle *style = state->style;
g_return_if_fail (style != NULL);
style->line.color = go_color_selector_get_color (selector, &style->line.auto_color);
set_style (state);
} | false | false | false | false | false | 0 |
mouse_press
(
GdkEventButton *event
)
{
if (event->button != 1)
return FALSE; // Handling left-click.
// Get mouse position, draw dims.
int mx = (int) event->x, my = (int) event->y;
selected = combo->find(mx, my); // Find it (or -1 if not found).
set_controls();
render();
return TRUE;
} | false | false | false | false | false | 0 |
do_rmdir(int dfd, const char __user *pathname)
{
int error = 0;
struct filename *name;
struct dentry *dentry;
struct path path;
struct qstr last;
int type;
unsigned int lookup_flags = 0;
retry:
name = user_path_parent(dfd, pathname,
&path, &last, &type, lookup_flags);
if (IS_ERR(name))
return PTR_ERR(nam... | false | false | false | false | false | 0 |
uvc_query_v4l2_ctrl(struct uvc_video_chain *chain,
struct v4l2_queryctrl *v4l2_ctrl)
{
struct uvc_control *ctrl;
struct uvc_control_mapping *mapping;
int ret;
ret = mutex_lock_interruptible(&chain->ctrl_mutex);
if (ret < 0)
return -ERESTARTSYS;
ctrl = uvc_find_control(chain, v4l2_ctrl->id, &mapping);
if (ct... | false | false | false | false | false | 0 |
listing(user_interaction & dialog) const
{
map<archive_num, status>::const_iterator it = last_mod.begin();
map<archive_num, status>::const_iterator ut = last_change.begin();
dialog.printf(gettext("Archive number | Data | status || EA | status \n"));
dialog.printf(gettext... | false | false | false | false | false | 0 |
nlm4_lock_resume (void *carg)
{
nlm4_stats stat = nlm4_failed;
int ret = -1;
nfs3_call_state_t *cs = NULL;
if (!carg)
return ret;
cs = (nfs3_call_state_t *)carg;
nlm4_check_fh_resolve_status ... | false | false | false | false | false | 0 |
mspro_format(struct scsi_cmnd *srb, struct rtsx_chip *chip,
int short_data_len, bool quick_format)
{
struct ms_info *ms_card = &(chip->ms_card);
int retval, i;
u8 buf[8], tmp;
u16 para;
retval = ms_switch_clock(chip);
if (retval != STATUS_SUCCESS) {
rtsx_trace(chip);
return STATUS_FAIL;
}
retval = ms_se... | false | false | false | false | false | 0 |
mimic_init(MimCtx *ctx, gint width, gint height)
{
gint bufsize, i;
/*
* Dimensions-related.
*/
ctx->frame_width = width;
ctx->frame_height = height;
ctx->y_stride = ctx->frame_width;
ctx->y_row_count = ctx->frame_height;
ctx->y_size = ctx->y_stride * ctx->y_row_count... | false | false | false | false | false | 0 |
get_table_field (const char *line, int n)
{
const char *p = line;
while (*p && n > 0) {
p += strcspn (p, ":;") + 1;
n--;
}
if (n > 0) {
reply_with_error ("not enough fields in output of parted print command: %s",
line);
return NULL;
}
size_t len = strcspn (p, ":;");
... | false | false | false | false | false | 0 |
lad_sm_change_array_inner_block(Block *search_block,
Var_table *offset,
Array_table *ldm,
int dim,
StripMiningInnerLoop *smil)
{
lad_sm_change_array_inner_pe_statement(search_block->pre_head,
offset,
ldm,
dim,
smil);
lad_sm_change_array_inner_pe_statement(se... | false | false | false | false | false | 0 |
new_sock2list(char* name, unsigned short port, unsigned short proto,
char *adv_name, unsigned short adv_port,
enum si_flags flags, struct socket_info** list)
{
struct socket_info* si;
si=new_sock_info(name, port, proto, adv_name, adv_port, flags);
if (si==0){
LM_ERR("new_sock_info failed\n");
goto ... | false | false | false | false | false | 0 |
copyTempStacks(const ASBeautifier &other) const
{
vector<vector<const string*>*>* tempStacksNew = new vector<vector<const string*>*>;
vector<vector<const string*>*>::iterator iter;
for (iter = other.tempStacks->begin();
iter != other.tempStacks->end();
++iter)
{
vector<const string*>* newVec = n... | false | false | false | false | false | 0 |
inputline_return_callback(struct widget *pWidget)
{
if (Main.event.button.button == SDL_BUTTON_LEFT) {
char *theinput = NULL;
if (!pWidget->string16->text) {
return -1;
}
theinput = convert_to_chars(pWidget->string16->text);
if (theinput && *theinput) {
send_chat(theinput);
... | false | false | false | false | false | 0 |
i9xx_hz_to_pwm(struct intel_connector *connector, u32 pwm_freq_hz)
{
struct drm_device *dev = connector->base.dev;
struct drm_i915_private *dev_priv = dev->dev_private;
int clock;
if (IS_PINEVIEW(dev))
clock = intel_hrawclk(dev);
else
clock = 1000 * dev_priv->display.get_display_clock_speed(dev);
return clo... | false | false | false | false | false | 0 |
png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
double white_x, double white_y, double red_x, double red_y,
double green_x, double green_y, double blue_x, double blue_y)
{
png_debug1(1, "in %s storage function\n", "cHRM");
if (png_ptr == NULL || info_ptr == NULL)
return;
if (white_x ... | false | false | false | false | false | 0 |
build_optionalSignature(private_x509_ocsp_request_t *this,
chunk_t tbsRequest)
{
int oid;
signature_scheme_t scheme;
chunk_t certs = chunk_empty, signature, encoding;
switch (this->key->get_type(this->key))
{
/* TODO: use a generic mapping function */
case KEY_RSA:
oid = OID_SHA1_WITH_RSA;
s... | false | false | false | false | false | 0 |
nfs4_find_state_owner_locked(struct nfs_server *server, struct rpc_cred *cred)
{
struct rb_node **p = &server->state_owners.rb_node,
*parent = NULL;
struct nfs4_state_owner *sp;
while (*p != NULL) {
parent = *p;
sp = rb_entry(parent, struct nfs4_state_owner, so_server_node);
if (cred < sp->so_cred)
... | false | false | false | false | false | 0 |
timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb)
{
const unsigned char *tzf;
timelib_tzinfo *tmp;
if (seek_to_tz_position(&tzf, timezone, tzdb)) {
tmp = timelib_tzinfo_ctor(timezone);
read_preamble(&tzf, tmp);
read_header(&tzf, tmp);
read_transistions(&tzf, tmp);
read_types(&tzf, tmp);
re... | false | false | false | false | false | 0 |
pvdisplay_colons(const struct physical_volume *pv)
{
char uuid[64] __attribute__((aligned(8)));
if (!pv)
return;
if (!id_write_format(&pv->id, uuid, sizeof(uuid))) {
stack;
return;
}
log_print("%s:%s:%" PRIu64 ":-1:%" PRIu64 ":%" PRIu64 ":-1:%" PRIu32 ":%u:%u:%u:%s",
pv_dev_name(pv), pv->vg_name, pv->... | false | false | false | false | false | 0 |
copy_arrays(int i, int j, int delflag)
{
for (int m = 0; m < nvalue; m++) {
if (style[m] == MOLECULE)
atom->molecule[j] = atom->molecule[i];
else if (style[m] == INTEGER)
atom->ivector[index[m]][j] = atom->ivector[index[m]][i];
else if (style[m] == DOUBLE)
atom->dvector[index[m]][j] = at... | false | false | false | false | false | 0 |
sr_LoadDefaultConfig(){
// High detail defaults; no problem for your ordinary 3d-card.
sr_alphaBlend=true;
sr_useDisplayLists=rDisplayList_Off;
sr_textOut=true;
sr_dither=true;
sr_smoothShading=true;
int i;
#ifndef DEDICATED
for (i=rTextureGroups::TEX_GROUPS-1;i>=0;i--)
rTexture... | false | false | false | false | false | 0 |
receive(void)
{
if (_send_data == NULL)
{
if (_path.length() > 0)
{
byte_t buf[512];
printf("TFTP::receive(): reading block %d\n", _block);
FILE *f = fopen(_path.c_str(), "rb");
fseek(f, _block * 512, SEEK_SET);
int len = fread(buf, 1, 512, f);
... | false | false | false | false | true | 1 |
check_nameclash(VOID)
{
int i;
ArgListHeader *alist;
for(i=0;i<HASHSZ;i++) {
if(hashtab[i].glob_symtab != NULL &&
hashtab[i].com_glob_symtab != NULL) {
ComListHeader *clh=hashtab[i].com_glob_symtab->info.comlist;
cmp_error_count = 0;
(void)comcmp_error_head(hashtab[i].name,clh,
... | false | false | false | false | false | 0 |
callback_pre(struct authinfo *a, void *dummy)
{
#define PTR(x) ((x) ? (x):"(none)")
printf("Authentication succeeded.\n\n");
printf(" Authenticated: %s ", PTR(a->address));
if (a->sysusername)
printf(" (system username: %s)\n", a->sysusername);
else if (a->sysuserid)
printf(" (uid %lu, gid %lu)\n", (unsign... | false | false | false | false | false | 0 |
env_rassoc(VALUE dmy, VALUE obj)
{
char **env;
rb_secure(4);
obj = rb_check_string_type(obj);
if (NIL_P(obj)) return Qnil;
env = GET_ENVIRON(environ);
while (*env) {
char *s = strchr(*env, '=');
if (s++) {
long len = strlen(s);
if (RSTRING_LEN(obj) == len && strncmp(s, RSTRING_PTR(o... | false | false | false | false | false | 0 |
open_mkdir(char *path, int flags, int report)
{
struct stat stat_buf;
char *c;
int fd;
if (flags & O_CREAT)
fd = open(path, flags, FILE_MASK);
else
fd = open(path, flags);
if (fd >= 0)
return fd;
if (errno == ENOENT && (flags & O_ACCMODE) != O_RDONLY) {
if (path[0] == '/')
c = s... | false | false | false | false | true | 1 |
expose_cb (GtkWidget *widget,
GdkEventExpose *event,
ccss_stylesheet_t *stylesheet)
{
ccss_style_t *style;
cairo_t *cr;
uint32_t hash;
style = ccss_stylesheet_query_type (stylesheet, "box");
g_return_val_if_fail (style, FALSE);
hash = ccss_style_hash (style);
g_debug ("%s() style instance='%p'... | false | false | false | false | false | 0 |
fullscreen_mouse_set_busy(FullScreenData *fs, gboolean busy)
{
fullscreen_busy_mouse_disable(fs);
if (!!(fs->cursor_state & FULLSCREEN_CURSOR_BUSY) == (busy)) return;
if (busy)
{
fs->cursor_state |= FULLSCREEN_CURSOR_BUSY;
}
else
{
fs->cursor_state &= ~FULLSCREEN_CURSOR_BUSY;
}
clear_mouse_cursor(fs... | false | false | false | false | false | 0 |
buildName(e) /* Build name, taking account of */
Cell e; { /* special cases, as necessary. */
if (e==nameNoRec) {
asCELL(nameNil);
asCELL(RECORD);
asMKAP(1);
}
else
asCELL(e);
} | false | false | false | false | false | 0 |
sprint_mib_oid(char *buf, const oid *name, size_t len)
{
int i;
for (i = 0; i < (int) len; i++)
buf += sprintf(buf, ".%" NETSNMP_PRIo "u", name[i]);
} | false | false | false | false | false | 0 |
metrics(MetricsInfo & mi, Dimension & dim) const
{
StyleChanger dummy(mi.base, style_);
cell(0).metrics(mi, dim);
metricsMarkers(dim);
} | false | false | false | false | false | 0 |
AM_Drawer(void)
{
if (!automapactive)
return;
UpdateState |= I_FULLSCRN;
AM_clearFB(BACKGROUND);
if (grid)
AM_drawGrid(GRIDCOLORS);
AM_drawWalls();
AM_drawPlayers();
DrawWorldTimer();
if (cheating == 2)
AM_drawThings(THINGCOLORS, THINGRANGE);
// AM_drawCrossha... | false | false | false | false | false | 0 |
set_plan_references(PlannerGlobal *glob, Plan *plan,
List *rtable, List *rowmarks)
{
int rtoffset = list_length(glob->finalrtable);
ListCell *lc;
/*
* In the flat rangetable, we zero out substructure pointers that are not
* needed by the executor; this reduces the storage space and copying cost
* for... | false | false | false | false | false | 0 |
insert (char *str, stringtable *tb)
{
TaggedString *ts;
unsigned long h = hash(str);
int i;
int j = -1;
if ((Long)tb->nuse*3 >= (Long)tb->size*2)
{
if (!initialized)
initialize();
grow(tb);
}
i = h%tb->size;
while (tb->hash[i])
{
if (tb->hash[i] == &EMPTY)
j = i;
else if ... | false | false | false | false | false | 0 |
UUNetscapeCollapse (char *string)
{
char *p1=string, *p2=string;
int res = 0;
if (string==NULL)
return 0;
/*
* First pass
*/
while (*p1) {
if (*p1 == '&') {
if (_FP_strnicmp (p1, "&", 5) == 0) { p1+=5; *p2++='&'; res=1; }
else if (_FP_strnicmp (p1, "<", 4) == 0) { p1+=... | false | false | false | false | false | 0 |
iom_issueanyerr(IOM_OBJECT err)
{
ErrorUtility::init();
IomObject obj(err);
ErrorUtility::errs->addObject(obj);
ErrorUtility::notifyerr(obj);
} | false | false | false | false | false | 0 |
rcopy_errors()
{
char msgbuf[80] = "Retrying bad sectors... Retry ";
const int msglen = std::strlen( msgbuf );
for( int retry = 1; max_retries < 0 || retry <= max_retries; ++retry )
{
long long end = LLONG_MAX;
bool first_post = true, block_found = false;
snprintf( msgbuf + msglen, ( sizeof msg... | false | false | false | false | false | 0 |
parser0dtd(char * directory, model_data * modeldata)
{
FILE *file;
char filename[100];
/*xmachine * current_xmachine = * modeldata->p_xmachines;*/
variable * current_envvar;
variable * allvar;
/* Open the output file */
strcpy(filename, directory);
strcat(filename, "0.dtd");
printf("writing file: %s\n", file... | false | false | false | false | false | 0 |
paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option)
Q_UNUSED(widget)
d->svg->paintFrame(painter);
if (!d->text.isNull()) {
QFontMetricsF fm(font());
QRectF textRect = d->svg->contentsRect();
textRect.setHeight(fm.height());
... | false | false | false | false | false | 0 |
getEdges(const geom::GeometryFactory& geomFact)
{
std::auto_ptr<QuadEdgeList> quadEdges(getPrimaryEdges(false));
std::vector<Geometry *> edges(quadEdges->size());
const CoordinateSequenceFactory *coordSeqFact = geomFact.getCoordinateSequenceFactory();
int i = 0;
for (QuadEdgeSubdivision::QuadEdgeList::iterator it ... | false | false | false | false | false | 0 |
NC_xlen_iarray(iarray)
NC_iarray *iarray ;
{
int len = 4 ;
if(iarray!=NULL)
{
len += iarray->count * 4 ;
}
return(len) ;
} | false | false | false | false | false | 0 |
aug_defnode_stub (XDR *xdr_in)
{
guestfs_int_int_bool *r;
struct guestfs_aug_defnode_args args;
const char *name;
const char *expr;
const char *val;
/* The caller should have checked before calling this. */
if (! optgroup_augeas_available ()) {
reply_with_error_errno (ENOTSUP,
"feature '%s' is... | false | false | false | false | false | 0 |
clear()
{
PowerUp *cur;
PowerUp *del;
currentPwrUp = 0;
cur = pwrUpRoot->next;
while(cur)
{
del = cur;
cur = cur->next;
game->itemAdd->killScreenItem(del);
// delete del;
}
pwrUpRoot->next = 0;
} | false | false | false | false | false | 0 |
snd_azf3328_free(struct snd_azf3328 *chip)
{
if (chip->irq < 0)
goto __end_hw;
snd_azf3328_mixer_reset(chip);
snd_azf3328_timer_stop(chip->timer);
snd_azf3328_gameport_free(chip);
if (chip->irq >= 0)
synchronize_irq(chip->irq);
__end_hw:
if (chip->irq >= 0)
free_irq(chip->irq, chip);
pci_release_regions... | false | false | false | false | false | 0 |
Copy_Dims( int Node1, int Node2 )
{
Node *that1, *that2;
int i;
if( Node1<0 || Node2<0 ) return;
that1 = gParse.Nodes + Node1;
that2 = gParse.Nodes + Node2;
that1->value.nelem = that2->value.nelem;
that1->value.naxis = that2->value.naxis;
for( i=0; i<that2->value.naxis; i++ )
that1->val... | false | false | false | false | false | 0 |
parse_flag(const char* str_flag, unsigned *flag)
{
unsigned fla=0;
if (HDstrcmp(str_flag,"shallow")==0)
{
fla = H5O_COPY_SHALLOW_HIERARCHY_FLAG;
}
else if (HDstrcmp(str_flag,"soft")==0)
{
fla = H5O_COPY_EXPAND_SOFT_LINK_FLAG;
}
else if (HDstrcmp(str_flag,"ext")==0)
... | false | false | false | false | false | 0 |
parse_escaped_char(const char **pformat)
{
const char* start = *pformat;
switch ( *((*pformat)++) ) {
case 't': return '\t';
case 'r': return '\r';
case 'n': return '\n';
case '\\': return '\\';
case 'x':
/* \xNN byte with hexadecimal value NN (1 to 2 digits) */
if ( IS_HEX(**pformat) ) {
int ch;
... | false | false | false | false | false | 0 |
PPDefmodule(
void *theEnv,
char *defmoduleName,
char *logicalName)
{
void *defmodulePtr;
defmodulePtr = EnvFindDefmodule(theEnv,defmoduleName);
if (defmodulePtr == NULL)
{
CantFindItemErrorMessage(theEnv,"defmodule",defmoduleName);
return(FALSE);
}
if (EnvGetDefmodulePPForm(t... | false | false | false | false | false | 0 |
ap_control_kick_mac(struct ap_data *ap, struct net_device *dev, u8 *mac)
{
struct sta_info *sta;
__le16 resp;
spin_lock_bh(&ap->sta_table_lock);
sta = ap_get_sta(ap, mac);
if (sta) {
ap_sta_hash_del(ap, sta);
list_del(&sta->list);
}
spin_unlock_bh(&ap->sta_table_lock);
if (!sta)
return -EINVAL;
resp =... | false | false | false | false | false | 0 |
deccvasc(char *cp, int len, decimal *np)
{
char *str;
int ret = 0;
numeric *result;
rsetnull(CDECIMALTYPE, (char *) np);
if (risnull(CSTRINGTYPE, cp))
return 0;
str = ecpg_strndup(cp, len);/* decimal_in always converts the complete
* string */
if (!str)
ret = ECPG_INFORMIX_NUM_UNDERFLOW;
... | false | false | false | false | false | 0 |
Execute () {
Editor* ed = GetEditor();
Component* orig = ed->GetComponent();
Component* comp = prototype_->Copy();
CompNameVar* compNameVar = (CompNameVar*) ed->GetState("CompNameVar");
ModifStatusVar* modifVar = (ModifStatusVar*)ed->GetState("ModifStatusVar");
if (OnlyOneEditorOf(orig) && !Rea... | false | false | false | false | false | 0 |
draw_sprites( struct mame_bitmap *bitmap, const struct rectangle *cliprect )
{
const unsigned char *source = spriteram+32*4-4;
const unsigned char *finish = spriteram; /* ? */
while( source>=finish )
{
int sx = source[0];
int sy = 240-source[1]-1;
int attributes = source[2];
int sprite_n... | false | false | false | false | false | 0 |
show_usage(struct cmd_context *ctx)
{
int i;
/* ethtool -h */
fprintf(stdout, PACKAGE " version " VERSION "\n");
fprintf(stdout,
"Usage:\n"
" ethtool DEVNAME\t"
"Display standard information about device\n");
for (i = 0; args[i].opts; i++) {
fputs(" ethtool ", stdout);
fprintf(stdout, "%s ... | false | false | false | false | false | 0 |
seed (GSList * i,
GfsDomain * domain,
ClosestGrid * grid,
gdouble dsep,
gdouble dmin,
GList ** streams,
gboolean closed)
{
GtsPoint * v = gts_point_new (gts_point_class (), 0., 0., 0.);
FttVector p;
p.z = 0.;/*-0.49;*/
while (i) {
GtsPoint * p1 = i->data;
... | false | false | false | false | false | 0 |
Extract()
{
IAudioRenderer::Extract();
size_t size = m_pQueue->GetSize();
m_dAudioRealpos = m_pAudiostream->GetTime()
- m_pQueue->GetBufferTime() - m_fAsync;
if (m_bInitialized && !m_bPaused && size > 0)
m_pQueue->Read(0, size, m_pAudioMix);
return 0;
} | false | false | false | false | false | 0 |
__bio_unmap_user(struct bio *bio)
{
struct bio_vec *bvec;
int i;
/*
* make sure we dirty pages we wrote to
*/
bio_for_each_segment_all(bvec, bio, i) {
if (bio_data_dir(bio) == READ)
set_page_dirty_lock(bvec->bv_page);
page_cache_release(bvec->bv_page);
}
bio_put(bio);
} | false | false | false | false | false | 0 |
clear_title_in_all_locales()
{
m_title.clear();
for(type_map_locale_to_translations::iterator iter = m_map_translations.begin(); iter != m_map_translations.end(); ++iter)
{
Glib::ustring& translation = iter->second;
translation.clear();
}
} | false | false | false | false | false | 0 |
PopBack(Dlist *l,void *result)
{
DlistElement *le;
if (l == NULL) return iError.NullPtrError("iDlist.PopBack");
if (l->count == 0)
return 0;
if (l->Flags & CONTAINER_READONLY) {
l->RaiseError("iDlist.PopBack",CONTAINER_ERROR_READONLY,l);
return CONTAINER_ERROR_READONLY;
}
le... | false | false | false | false | false | 0 |
acdReadSections(AjPTable* typetable, AjPTable* infotable)
{
AjPFile sectFile = NULL;
AjPStr sectFName = NULL;
AjPStr sectRoot = NULL;
AjPStr sectRootInst = NULL;
AjPStr sectPack = NULL;
AjPStr sectLine = NULL;
AjPRegexp sectxp = NULL;
AjPStr sectName = NULL;
... | false | false | false | false | false | 0 |
RenderInternal(vtkRenderer* renderer,
vtkActor* actor,
unsigned long typeflags,
bool forceCompileOnly)
{
if (typeflags == 0)
{
// No primitive to render.
return;... | false | false | false | false | false | 0 |
L3()
{register object *base=vs_base;
register object *sup=base+VM3; VC3
vs_check;
{object V9;
object V10;
object V11;
V9=(base[0]);
V10=(base[1]);
V11=(base[2]);
vs_top=sup;
goto TTL;
TTL:;
{object V12;
V12= ((V11))->v.v_self[(long)14];
base[3]= CMPcar((V12));
base[4]= (V9);
base[5]= CMPcdr((V12));
vs_t... | false | false | false | false | false | 0 |
lpfc_sli_queue_setup(struct lpfc_hba *phba)
{
struct lpfc_sli *psli;
struct lpfc_sli_ring *pring;
int i;
psli = &phba->sli;
spin_lock_irq(&phba->hbalock);
INIT_LIST_HEAD(&psli->mboxq);
INIT_LIST_HEAD(&psli->mboxq_cmpl);
/* Initialize list headers for txq and txcmplq as double linked lists */
for (i = 0; i < p... | false | false | false | false | false | 0 |
deserialize(const QString &serialized)
{
m_Data.clear();
m_Data = Utils::Serializer::toVariantHash(serialized, base64MimeData);
return true;
} | false | false | false | false | false | 0 |
search_options(option_t * array, const char * name)
{
int first = 0;
int last = CONFIG_OPTIONS_SIZE;
while (first <= last) {
int mid = (first + last) / 2; // compute mid point.
int result;
if ((result = (int)name[0] - (int)array[mid].long_opt[0]) == 0)
result = std::strcmp(name, array... | false | false | false | false | false | 0 |
attributeSpecList(MarkupIter &iter,
const AttributeList &atts)
{
size_t nAtt = atts.size();
unsigned i;
unsigned *attIndex;
if (atts.nSpec()) {
attIndex = new unsigned[atts.nSpec()];
for (i = 0; i < atts.nSpec(); i++)
attIndex[i] = unsigned(-1);
for (i = 0; i < nAtt; i++)
if (atts.... | false | false | false | false | false | 0 |
run()
{
NameLookUpThreadWorker worker;
m_worker = &worker;
m_semaphore.release();
exec();
} | false | false | false | false | false | 0 |
hashTypeCurrentObject(hashTypeIterator *hi, int what) {
robj *obj;
unsigned char *v = NULL;
unsigned int vlen = 0;
int encoding = hashTypeCurrent(hi,what,&obj,&v,&vlen);
if (encoding == REDIS_ENCODING_HT) {
incrRefCount(obj);
return obj;
} else {
return createStringObjec... | false | false | false | false | false | 0 |
make_field(Send_field *tmp_field)
{
field->make_field(tmp_field);
DBUG_ASSERT(tmp_field->table_name != 0);
if (name)
tmp_field->col_name=name; // Use user supplied name
if (table_name)
tmp_field->table_name= table_name;
if (db_name)
tmp_field->db_name= db_name;
} | false | false | false | false | false | 0 |
mxf_mpeg_is_mpeg2_frame (GstBuffer * buffer)
{
GstByteReader reader;
guint32 tmp;
GstMapInfo map;
gboolean ret = FALSE;
gst_buffer_map (buffer, &map, GST_MAP_READ);
gst_byte_reader_init (&reader, map.data, map.size);
while (gst_byte_reader_get_remaining (&reader) > 3) {
if (gst_byte_reader_peek_uint... | false | false | false | false | false | 0 |
jack_ensure_uuid_unique (jack_engine_t *engine, jack_client_id_t uuid)
{
JSList *node;
jack_lock_graph (engine);
for (node=engine->clients; node; node=jack_slist_next (node)) {
jack_client_internal_t *client = (jack_client_internal_t *) node->data;
if (client->control->uid == uuid)
client->control->uid = 0;
... | false | false | false | false | false | 0 |
_getEntry(const gchar *key, guint iLine, GError **error)
{
VisuConfigFileEntry *entry;
entry = (VisuConfigFileEntry*)g_hash_table_lookup(visuConfigFile_entryList,
(gpointer)key);
if (!entry)
*error = g_error_new(TOOL_CONFIG_FILE_ERROR, TOOL_CONFIG_FILE_ERRO... | false | false | false | false | false | 0 |
whimper(struct monst *mtmp)
{
const char *whimper_verb = 0;
if (mtmp->msleeping || !mtmp->mcanmove || !mtmp->data->msound)
return;
/* presumably nearness and soundok checks have already been made */
if (Hallucination)
whimper_verb = h_sounds[rn2(SIZE(h_sounds))];
else switc... | false | false | false | false | false | 0 |
read_packet(int fd, const char* name, apacket** ppacket)
{
char *p = (char*)ppacket; /* really read a packet address */
int r;
int len = sizeof(*ppacket);
char buff[8];
if (!name) {
snprintf(buff, sizeof buff, "fd=%d", fd);
name = buff;
}
while(len > 0) {
r = a... | true | true | false | false | false | 1 |
cleanup(void)
{
#ifdef DEBUG_MEMORY
RC_PID *p1 = LIST_FIRST(&service_pids);
RC_PID *p2;
#endif
if (!rc_in_logger && !rc_in_plugin &&
applet && (strcmp(applet, "rc") == 0 || strcmp(applet, "openrc") == 0))
{
if (hook_out)
rc_plugin_run(hook_out, runlevel);
rc_plugin_unload();
if (termios_orig) {
... | false | false | false | false | false | 0 |
gee_tree_map_sub_value_collection_real_contains (GeeAbstractCollection* base, gconstpointer key) {
GeeTreeMapSubValueCollection * self;
gboolean result = FALSE;
GeeIterator* it = NULL;
GeeIterator* _tmp0_ = NULL;
self = (GeeTreeMapSubValueCollection*) base;
_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractC... | false | false | false | false | false | 0 |
GImageReadXbm(char * filename) {
FILE *file;
int width, height;
GImage *gi = NULL;
struct _GImage *base;
int i,j,k,pixels,val,val2, ch;
uint8 *scanline;
file = fopen(filename,"r");
if ( file==NULL )
return NULL;
if ( fscanf(file, "#define %*s %d\n", &width )!=1 )
goto bad;
if (... | false | false | false | false | false | 0 |
free_options(void)
{
unsigned i;
if(0 != option_values.filenames) {
for(i = 0; i < option_values.num_files; i++) {
if(0 != option_values.filenames[i])
free(option_values.filenames[i]);
}
free(option_values.filenames);
}
if(0 != option_values.vorbis_comment)
FLAC__metadata_object_delete(option_values.... | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__gui__Timer_Start(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct __ecereNameSpace__ecere__gui__Timer * __ecerePointer___ecereNameSpace__ecere__gui__Timer = (struct __ecereNameSpace__ecere__gui__Timer *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__... | false | false | false | true | false | 1 |
ASC_findAcceptedPresentationContext(
T_ASC_Parameters * params,
T_ASC_PresentationContextID presentationContextID,
T_ASC_PresentationContext * presentationContext)
/*
* ASC_findAcceptedPresentationContext: You must supply the memory for
* presentationContext, the values stored in the accepted presentat... | false | false | false | false | false | 0 |
ParseJingleStreamsOrLegacySsrc(const buzz::XmlElement* desc_elem,
MediaContentDescription* media,
ParseError* error) {
if (HasJingleStreams(desc_elem)) {
if (!ParseJingleStreams(desc_elem, &(media->mutable_streams()), error)) {
return f... | false | false | false | false | false | 0 |
check_device(char *str)
{
int error = 1;
if(strlen(str) < 29) return(1);
if(!strncmp(str, "Nihon Kohden EEG-1100A V01.00", 29)) error = 0;
if(!strncmp(str, "Nihon Kohden EEG-1100B V01.00", 29)) error = 0;
if(!strncmp(str, "Nihon Kohden EEG-1100C V01.00", 29)) error = 0;
if(!strncmp(str, "Nihon Kohden ... | false | false | false | false | false | 0 |
get_field_size (pos, walk)
int *pos;
struct internal_type *walk;
{
int result = 0;
if (SIMPLE_P(walk) && walk->attribute.memory_size)
{
result = walk->attribute.memory_size;
(*pos)--;
}
if (*pos && !SIMPLE_P(walk) && walk->output)
result = get_field_size (pos, walk->output);
if... | false | false | false | false | false | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.