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 |
|---|---|---|---|---|---|---|
awt_print_tree_check_size(void *, AW_CL cl_ntw) {
AWT_canvas *ntw = (AWT_canvas*)cl_ntw;
GB_transaction dummy2(ntw->gb_main);
AW_world size;
long what = ntw->aww->get_root()->awar(AWAR_PRINT_TREE_CLIP)->read_int();
AW_device *size_device = ntw->aww->get_size_device(AW_MIDDLE... | false | false | false | false | false | 0 |
gst_stream_synchronizer_change_state (GstElement * element,
GstStateChange transition)
{
GstStreamSynchronizer *self = GST_STREAM_SYNCHRONIZER (element);
GstStateChangeReturn ret;
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
GST_DEBUG_OBJECT (self, "State change NULL->READY");
s... | false | false | false | false | false | 0 |
precalc_tech_data()
{
bool counted[A_LAST];
advance_index_iterate(A_NONE, tech) {
memset(counted, 0, sizeof(counted));
advances[tech].num_reqs = precalc_tech_data_helper(tech, counted);
} advance_index_iterate_end;
advance_index_iterate(A_NONE, tech) {
/* FIXME: Why are we counting the current tec... | false | false | false | false | false | 0 |
H5G_stab_get_type_by_idx_cb(const H5G_entry_t *ent, void *_udata)
{
H5G_bt_it_gtbi_t *udata = (H5G_bt_it_gtbi_t *)_udata;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5G_stab_get_type_by_idx_cb)
/* Sanity check */
HDassert(ent);
HDassert(udata);
/* Check... | false | false | false | false | false | 0 |
startGame(SingleGameInterface * p)
{
mpGame = p;
mpPlayer->startGame(mpGame);
mPlayerState = KBlocksPlayer_ThinkingState;
mActionList.clear();
if (mThinkInterval > 0)
{
mActionTimer.start();
}
} | false | false | false | false | false | 0 |
test_alignWithoutHydrogens() {
OBConversion conv;
bool success = conv.SetInFormat("xyz");
OB_REQUIRE( success );
OBMol mol;
success = conv.ReadFile(&mol, TESTDATADIR + string("test3d.xyz"));
OB_REQUIRE( success );
// Align molecule to itself without hydrogens
OBAlign align = OBAlign(mol, mol, false, f... | false | false | false | false | false | 0 |
dib9000_fw_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff)
{
struct dib9000_state *state = fe->demodulator_priv;
u16 val;
int ret;
if ((state->pid_ctrl_index != -2) && (state->pid_ctrl_index < 9)) {
/* postpone the pid filtering cmd */
dprintk("pid filter cmd postpone");
state->pid_ctrl_index++;
state->... | false | false | false | false | false | 0 |
IDirectFBImageProvider_PNG_GetImageDescription( IDirectFBImageProvider *thiz,
DFBImageDescription *dsc )
{
DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_PNG)
if (!dsc)
return DFB_INVARG;
dsc->caps = DICAPS_NONE;
if (data->color_type ... | false | false | false | false | false | 0 |
ifile_open_log (int argc, char ** argv)
{
char *info_file;
/* if no temp file is to be created, immediately return */
if (!args.tmp_file) return NULL;
srand(time(NULL));
/* Create string with full path for ~/.ifile_log */
info_file = ifile_sprintf("%s/.ifile.log", getenv("HOME"));
if ((INFO = fopen(in... | false | false | false | false | true | 1 |
pk_eula_required_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
PkEulaRequired *eula_required = PK_EULA_REQUIRED (object);
PkEulaRequiredPrivate *priv = eula_required->priv;
switch (prop_id) {
case PROP_EULA_ID:
g_free (priv->eula_id);
priv->eula_id = g_strdup (g_value_... | false | false | false | false | false | 0 |
isEmpty() const
{
if (d.constData()->m_values.isEmpty())
return true;
return false;
} | false | false | false | false | false | 0 |
batch_job_remove(struct batch_queue *q, batch_job_id_t jobid)
{
if(!q->job_table)
q->job_table = itable_create(0);
if(q->type == BATCH_QUEUE_TYPE_LOCAL) {
return batch_job_remove_local(q, jobid);
} else if(q->type == BATCH_QUEUE_TYPE_CONDOR) {
return batch_job_remove_condor(q, jobid);
} else if(q->type == BA... | false | false | false | false | false | 0 |
UnresolvedArgs(struct Rlist *args)
{ struct Rlist *rp;
for (rp = args; rp != NULL; rp = rp->next)
{
if (rp->type != CF_SCALAR)
{
return true;
}
if (IsCf3Scalar(rp->item))
{
return true;
}
}
return false;
} | false | false | false | false | false | 0 |
send_snmp_trap(const char *node, const char *rsc, const char *task, int target_rc, int rc,
int status, const char *desc)
{
int ret = 1;
#if ENABLE_SNMP
static oid snmptrap_oid[] = { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0 };
static oid sysuptime_oid[] = { 1, 3, 6, 1, 2, 1, 1, 3, 0 };
netsnmp_pd... | true | true | false | false | false | 1 |
kdb_setup_opt_functions(db_library lib)
{
if (lib->vftabl.fetch_master_key == NULL)
lib->vftabl.fetch_master_key = krb5_db_def_fetch_mkey;
if (lib->vftabl.fetch_master_key_list == NULL)
lib->vftabl.fetch_master_key_list = krb5_def_fetch_mkey_list;
if (lib->vftabl.store_master_key_list == NUL... | false | false | false | false | false | 0 |
zd1211_al2230_set_channel(struct zd_rf *rf, u8 channel)
{
int r;
const u32 *rv = zd1211_al2230_table[channel-1];
struct zd_chip *chip = zd_rf_to_chip(rf);
static const struct zd_ioreq16 ioreqs[] = {
{ ZD_CR138, 0x28 },
{ ZD_CR203, 0x06 },
};
r = zd_rfwritev_locked(chip, rv, 3, RF_RV_BITS);
if (r)
return r... | false | false | false | false | false | 0 |
afs_vnode_create(struct afs_vnode *vnode, struct key *key,
const char *name, umode_t mode, struct afs_fid *newfid,
struct afs_file_status *newstatus,
struct afs_callback *newcb, struct afs_server **_server)
{
struct afs_server *server;
int ret;
_enter("%s{%x:%u.%u},%x,%s,,",
vnode->volu... | false | false | false | false | false | 0 |
sortTxOutVect(vector<UnspentTxOut> & utovect, int sortType)
{
switch(sortType)
{
case 0: sort(utovect.begin(), utovect.end(), CompareNaive); break;
case 1: sort(utovect.begin(), utovect.end(), CompareTech1); break;
case 2: sort(utovect.begin(), utovect.end(), CompareTech2); break;
case 3: sort(utovect... | false | false | false | false | false | 0 |
queued_cb(SMSCConn *conn)
{
PrivData *privdata = conn->data;
long ret;
ret = (privdata ? gw_prioqueue_len(privdata->outgoing_queue) : 0);
/* use internal queue as load, maybe something else later */
conn->load = ret;
return ret;
} | false | false | false | false | false | 0 |
net_set_keepalive(int fd, int toggle)
{
int ret;
ret = net_setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &toggle, sizeof(toggle));
if (ret == -1)
{
net_error_out(fd, "net_set_keepalive");
}
return ret;
} | false | false | false | false | false | 0 |
rb_gst_caps_to_media_type (const GstCaps *caps)
{
GstStructure *s;
const char *media_type;
/* the aim here is to reduce the caps to a single mimetype-like
* string, describing the audio encoding (for audio files) or the
* file type (for everything else). raw media types are ignored.
*
* there are only a co... | false | false | false | false | false | 0 |
stop()
{
if(!d->isActive)
return;
if ( d->stopInProgress )
return;
d->stopInProgress = true;
QTimer::singleShot(0, d, SLOT(stop()));
} | false | false | false | false | false | 0 |
get_scaled_image()
{
Glib::RefPtr<Gdk::Pixbuf> pixbuf = m_pixbuf_original;
if(!pixbuf)
return pixbuf;
const Gtk::Allocation allocation = m_image.get_allocation();
const int pixbuf_height = pixbuf->get_height();
const int pixbuf_width = pixbuf->get_width();
const int allocation_height = allocatio... | false | false | false | false | false | 0 |
_elm_theme_parse(Elm_Theme *th, const char *theme)
{
Eina_List *names = NULL;
const char *p, *pe;
if (!th) th = &(theme_default);
if (theme)
{
Eina_Strbuf *buf;
buf = eina_strbuf_new();
p = theme;
pe = p;
for (;;)
{
if ((pe[0] == '\\') &... | false | false | false | false | false | 0 |
Multilevel_delete(Multilevel grid){
if (!grid) return;
if (grid->A){
if (grid->level == 0) {
if (grid->delete_top_level_A) {
SparseMatrix_delete(grid->A);
if (grid->D) SparseMatrix_delete(grid->D);
}
} else {
SparseMatrix_delete(grid->A);
if (grid->D) SparseMatrix_delete(grid->D);
... | false | false | false | false | false | 0 |
templates_finalize (GObject* obj) {
Templates * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TEMPLATES, Templates);
_g_object_unref0 (self->priv->_default_store);
_g_object_unref0 (self->priv->_personal_store);
_g_object_unref0 (self->priv->_data_dir);
_g_object_unref0 (self->priv->_rc_file);
_g_free0 (sel... | false | false | false | false | false | 0 |
store_node(ObjectStream &s, ht_registry_node *node)
{
if (node->type == RNT_RAW) {
ht_registry_data_raw *d = (ht_registry_data_raw*)node->data;
s.write(d->value, d->size);
} else {
s.write((void*)REGNODE_FILE_MAGIC, 4);
s.putInt(node->type, 4, NULL);
s.putObject(node->data, NULL);
}
} | false | false | false | false | false | 0 |
_e_menu_item_activate_next(void)
{
E_Menu_Item *mi;
Eina_List *ll;
ll = _e_menu_list_item_active_get();
mi = _e_menu_item_active_get();
if (ll && mi)
{
/* Look at the next item and then cycle until we're not on
* a separator. */
do
{
if (!eina_list_ne... | false | false | false | false | false | 0 |
log_one_block(struct log_writes_c *lc,
struct pending_block *block, sector_t sector)
{
struct bio *bio;
struct log_write_entry entry;
size_t ret;
int i;
entry.sector = cpu_to_le64(block->sector);
entry.nr_sectors = cpu_to_le64(block->nr_sectors);
entry.flags = cpu_to_le64(block->flags);
entry.data_len = cp... | false | false | false | false | false | 0 |
Initialize(
vtkRenderer *ren,
vtkVolume *vtkNotUsed(vol))
{
vtkOpenGLExtensionManager *e=static_cast<vtkOpenGLRenderWindow *>(
ren->GetRenderWindow())->GetExtensionManager();
bool gl12=e->ExtensionSupported("GL_VERSION_1_2")==1;
bool gl13=e->ExtensionSupported("GL_VERSION_1_3")==1;
bool gl20=e->Extensi... | false | false | false | false | false | 0 |
libsmdev_scsi_read_toc(
libcfile_file_t *device_file,
uint8_t format,
uint8_t *response,
size_t response_size,
libcerror_error_t **error )
{
libsmdev_scsi_read_toc_cdb_t command;
uint8_t sense[ LIBSMDEV_SCSI_SENSE_SIZE ];
static char *function = "libsmdev_scsi_read_toc... | false | false | false | false | false | 0 |
last_not_in_array(array *a, plugin_data *p)
{
array *forwarder = p->conf.forwarder;
int i;
for (i = a->used - 1; i >= 0; i--) {
data_string *ds = (data_string *)a->data[i];
const char *ip = ds->value->ptr;
if (!array_get_element(forwarder, ip)) {
return ip;
}
}
return NULL;
} | false | false | false | false | false | 0 |
test_have (void)
{
GBytes *data;
GNode *asn;
asn = egg_asn1x_create (test_asn1_tab, "TestBoolean");
g_assert (asn);
g_assert (!egg_asn1x_have (asn));
egg_asn1x_set_boolean (asn, TRUE);
g_assert (egg_asn1x_have (asn));
data = egg_asn1x_encode (asn, NULL);
g_assert (data);
g_assert (egg_asn1x_have (asn));... | false | false | false | false | false | 0 |
game_position_minimax_solve (const GamePosition *const root,
const gchar *const log_file)
{
log_env = game_tree_log_init(log_file);
if (log_env->log_is_on) {
GamePosition *ground = game_position_new(board_new(root->board->blacks,
... | false | false | false | false | false | 0 |
mvs_update_phyinfo(struct mvs_info *mvi, int i, int get_st)
{
struct mvs_phy *phy = &mvi->phy[i];
struct sas_identify_frame *id;
id = (struct sas_identify_frame *)phy->frame_rcvd;
if (get_st) {
phy->irq_status = MVS_CHIP_DISP->read_port_irq_stat(mvi, i);
phy->phy_status = mvs_is_phy_ready(mvi, i);
}
if (ph... | false | true | false | false | false | 1 |
sftp_normalize_ownergroup(struct allocator *a, struct sftpattr *attrs) {
uint32_t rc = SSH_FX_OK;
switch(attrs->valid & (SSH_FILEXFER_ATTR_UIDGID
|SSH_FILEXFER_ATTR_OWNERGROUP)) {
case SSH_FILEXFER_ATTR_UIDGID:
if((attrs->owner = sftp_uid2name(a, attrs->uid))
&& (attrs->group ... | false | false | false | false | false | 0 |
cellregion_get_content (GnmCellRegion const *cr, int col, int row)
{
if (cr->cell_content) {
GnmCellPos pos;
pos.col = col;
pos.row = row;
return g_hash_table_lookup (cr->cell_content, &pos);
} else
return NULL;
} | false | false | false | false | false | 0 |
globus_l_gass_copy_perf_setup_local_callback(
globus_gass_copy_perf_info_t * perf_info)
{
globus_reltime_t delay_time;
globus_reltime_t period_time;
globus_abstime_t timebuf;
long secs;
... | false | false | false | false | false | 0 |
mastermind_set_init_pos (Pos *pos)
{
int i, j;
for (i=0; i<board_wid; i++)
for (j=0; j<board_heit; j++)
pos->board [j * board_wid + i] =
mastermind_init_pos [(board_heit - 1 - j) * board_wid + i];
for (i=MASTERMIND_MAIN_COL_START; i<=MASTERMIND_MAIN_COL_END; i++)
pos->board [(board_heit - 1) * board_wid + i... | false | false | false | false | true | 1 |
hpjet_get_params(gx_device *pdev, gs_param_list *plist)
{
gx_device_hpjet *dev = (gx_device_hpjet *)pdev;
int code = gdev_prn_get_params(pdev, plist);
if (code >= 0)
{
code = param_write_bool(plist, "ManualFeed", &dev->ManualFeed);
}
if (code >= 0)
{
code = param_write_int(p... | false | false | false | false | false | 0 |
BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const int p[], BN_CTX *ctx)
{
int ret = 0, i, n;
BIGNUM *u;
bn_check_top(a);
bn_check_top(b);
if (BN_is_zero(b))
return(BN_one(r));
if (BN_abs_is_word(b, 1))
return (BN_copy(r, a) != NULL);
BN_CTX_start(ctx);
if ((u = BN_CTX_get(ctx)) == ... | false | false | false | false | false | 0 |
L18()
{register object *base=vs_base;
register object *sup=base+VM18; VC18
vs_check;
{object V46;
V46=(base[0]);
vs_top=sup;
goto TTL;
TTL:;
base[1]= (V46);
base[3]= (V46);
vs_top=(vs_base=base+3)+1;
(void) (*Lnk42)();
vs_top=sup;
base[2]= vs_base[0];
vs_top=(vs_base=base+1)+2;
(void) (*Lnk43)();
return;... | false | false | false | false | false | 0 |
tree_add_const_value_attribute (var_die, decl)
dw_die_ref var_die;
tree decl;
{
tree init = DECL_INITIAL (decl);
tree type = TREE_TYPE (decl);
if (TREE_READONLY (decl) && ! TREE_THIS_VOLATILE (decl) && init
&& initializer_constant_valid_p (init, type) == null_pointer_node)
/* OK */;
else
... | false | false | false | false | false | 0 |
libmail_gpg_inputfunc_readfp(char *buf, size_t cnt, void *vp)
{
FILE *fp=(FILE *)vp;
size_t i;
int c;
if (cnt == 0)
return -1;
--cnt;
for (i=0; i<cnt; i++)
{
if ((c=getc(fp)) == EOF)
{
if (i == 0)
return -1;
break;
}
buf[i]=c;
if (c == '\n')
{
++i;
break;
}
}
buf[i]=0;
retu... | false | false | false | false | false | 0 |
stub_complete(struct urb *urb)
{
struct stub_priv *priv = (struct stub_priv *) urb->context;
struct stub_device *sdev = priv->sdev;
unsigned long flags;
usbip_dbg_stub_tx("complete! status %d\n", urb->status);
switch (urb->status) {
case 0:
/* OK */
break;
case -ENOENT:
dev_info(&urb->dev->dev,
"stop... | false | false | false | false | false | 0 |
pdfmark_PUTSTREAM(gx_device_pdf * pdev, gs_param_string * pairs, uint count,
const gs_matrix * pctm, const gs_param_string * no_objname)
{
cos_object_t *pco;
int code, i;
uint l;
if (count < 2)
return_error(gs_error_rangecheck);
if ((code = pdf_get_named(pdev, &pairs[0], c... | false | false | false | false | false | 0 |
setRootOnlyMessage(const QString& message)
{
d->_rootOnlyMessage = message;
emit rootOnlyMessageChanged(d->_useRootOnlyMessage, d->_rootOnlyMessage);
} | false | false | false | false | false | 0 |
dc_setNodeBufferSize(struct vsp_node *node, size_t newSize)
{
char *tmpBuffer;
if(node == NULL) return;
if( node->ahead == NULL ) {
node->ahead = (ioBuffer *)malloc( sizeof(ioBuffer) );
if(node->ahead == NULL) {
dc_debug(DC_ERROR, "Failed allocate memory for read-ahead, so skipping");
}else{
node->a... | false | false | false | false | false | 0 |
ope_info_cell_data_function (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
{
Transaction *ope;
gtk_tree_model_get(model, iter, LST_DSPOPE_DATAS, &ope, -1);
switch(GPOINTER_TO_INT(user_data))
{
case 1:
g_object_set(renderer, "pixbuf", paymode_ico... | false | false | false | false | false | 0 |
tracker_media_art_shutdown (void)
{
g_return_if_fail (initialized == TRUE);
if (connection) {
g_object_unref (connection);
}
if (media_art_cache) {
g_hash_table_unref (media_art_cache);
}
if (media_art_storage) {
g_object_unref (media_art_storage);
}
tracker_media_art_plugin_shutdown ();
initialized... | false | false | false | false | false | 0 |
verify_eh(char *e, void *ctx)
{
if (*((int *)ctx) < 0) return;
if (*((int *)ctx) || strncmp(e,"Warning",7))
{ isok=0;
fprintf(stderr, "%s\n",e);
}
} | false | false | false | false | false | 0 |
stl_styleinfo_set_name_iter(const StyleInfo *si, GtkTreeStore *store, GtkTreeIter *iter, const gchar *name)
{
Style *style;
if((style = stl_styleinfo_get_style_iter(si, store, iter)) == NULL)
return;
stl_style_set_name(style, name);
gtk_tree_store_set(store, iter, TREE_COLUMN_NAME, name, -1);
} | false | false | false | false | false | 0 |
at2_send_messages(PrivAT2data *privdata)
{
Msg *msg;
if (privdata->modem->enable_mms &&
gw_prioqueue_len(privdata->outgoing_queue) > 1)
at2_send_modem_command(privdata, "AT+CMMS=2", 0, 0);
if ((msg = gw_prioqueue_remove(privdata->outgoing_queue)))
at2_send_one_message(privdata, msg);
} | false | false | false | false | false | 0 |
resetTalents(bool no_cost)
{
Unit* owner = GetOwner();
if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
return false;
// not need after this call
if (((Player*)owner)->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS))
((Player*)owner)->RemoveAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS, true);
... | false | false | false | false | false | 0 |
copy_array_object(struct gl_context *ctx,
struct gl_array_object *dest,
struct gl_array_object *src)
{
GLuint i;
/* skip Name */
/* skip RefCount */
/* In theory must be the same anyway, but on recreate make sure it matches */
dest->ARBsemantics = src->ARBsemantics;
... | false | false | false | false | false | 0 |
knot_changeset_last_rr(const knot_changeset_t *ch,
knot_changeset_part_t part)
{
if (ch == NULL) {
return NULL;
}
if (part == KNOT_CHANGESET_ADD) {
knot_rr_ln_t *n = TAIL(ch->add);
return n ? n->rr : NULL;
} else if (part == KNOT_CHANGESET_REMOVE) {
knot_rr_ln_t *... | false | false | false | false | false | 0 |
openFileForRead(const string& path)
{
if (path == "-") {
if (!mInputBuffer) {
mInputBuffer = new string(istreambuf_iterator<char>(cin),
istreambuf_iterator<char>());
}
return new istringstream(*mInputBuffer, ios::binary);
}
return ne... | false | false | false | false | false | 0 |
L8()
{register object *base=vs_base;
register object *sup=base+VM8; VC8
vs_check;
{object V23;
register object V24;
V23=(base[0]);
V24=(base[1]);
vs_top=sup;
goto TTL;
TTL:;
{register object V25;
V25= Cnil;
goto T70;
T70:;
if(((V24))==Cnil){
goto T73;}
{register object V26;
{object V27;
V27= CMPcar((V24... | false | false | false | false | false | 0 |
irmo_packet_writei32(IrmoPacket *packet, unsigned int i)
{
irmo_return_val_if_fail(packet != NULL, 0);
irmo_return_val_if_fail(packet->data_owned, 0);
if (packet->pos + 4 > packet->data_size) {
irmo_packet_resize(packet);
}
packet->data[packet->pos++] = (uint8_t) ((i >> 24) & 0xff);
packe... | false | false | false | false | false | 0 |
SDPConeAddADotX(SDPCone sdpcone, int blockj, double alpha,double x[], int nn, double adotx[], int m){
int info,n;
char UPLQ;
SDPblk *blk=sdpcone->blk;
double scl=blk[blockj].ADATA.scl;
DSDPVec ADOTX,YW2;
DSDPVMat T;
DSDPFunctionBegin;
info=SDPConeCheckJ(sdpcone,blockj);DSDPCHKERR(info);
info=SDPConeCh... | false | false | false | false | false | 0 |
message(const MessageType0 &type)
{
Message msg(0);
doInitMessage(msg);
msg.type = &type;
dispatchMessage(msg);
} | false | false | false | false | false | 0 |
ibus_engine_dbus_property_changed (IBusEngine *engine,
const gchar *property_name,
GVariant *value)
{
const gchar *object_path;
GDBusConnection *connection;
GDBusMessage *message;
GVariantBuilder *builder;
gboolean retval;
... | false | false | false | false | false | 0 |
user_matrix_get_column_name (const gretl_matrix *M, int col,
int *err)
{
char *ret = NULL;
if (M == NULL || col < 1 || col > M->cols) {
*err = E_DATA;
} else {
const char **S = gretl_matrix_get_colnames(M);
if (S == NULL) {
ret = gretl_strdup("");
} else {
ret = gretl_strdup(S[col-1])... | false | false | false | false | false | 0 |
callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
{
KJS_CHECK_THIS( KJS::DOMDOMImplementation, thisObj );
DOM::DOMImplementationImpl& implementation = *static_cast<DOMDOMImplementation *>( thisObj )->impl();
DOMExceptionTranslator exception(exec);
switch(id) {
case DOMDOMImplementation::Ha... | false | false | false | true | false | 1 |
flush_unauthorized_files(const struct cred *cred,
struct files_struct *files)
{
struct file *file, *devnull = NULL;
struct tty_struct *tty;
int drop_tty = 0;
unsigned n;
tty = get_current_tty();
if (tty) {
spin_lock(&tty_files_lock);
if (!list_empty(&tty->tty_files)) {
struct tty_file_private *fi... | false | false | false | false | false | 0 |
strcat_delim(char *dirspec)
{
int ldirspec = strlen(dirspec);
#if defined (MSDOS)
if (dirspec[ldirspec-1] != '\\')
strcat(dirspec, "\\");
#elif defined (macintosh)
if (dirspec[ldirspec-1] != ':')
strcat(dirspec, ":");
#else /* unix is the default */
if (dirspec[ldirspec-1] != '/')
st... | false | true | false | false | false | 1 |
gee_tree_set_range_construct_tail (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, GeeTreeSet* set, gconstpointer after) {
GeeTreeSetRange* self = NULL;
GeeTreeSet* _tmp0_ = NULL;
GeeTreeSet* _tmp1_ = NULL;
gconstpointer _tmp2_ = NULL;
gpointer _tmp3_ = NULL;
g_return_va... | false | false | false | false | false | 0 |
add_dispersion(double dispersion, void *anything)
{
int i;
for (i = 0; i < n_sources; i++) {
SST_AddDispersion(sources[i]->stats, dispersion);
}
} | false | false | false | false | false | 0 |
RsDoFixedDmaDescriptor (
ACPI_PARSE_OBJECT *Op,
UINT32 CurrentByteOffset)
{
AML_RESOURCE *Descriptor;
ACPI_PARSE_OBJECT *InitializerOp;
ASL_RESOURCE_NODE *Rnode;
UINT32 i;
InitializerOp = Op->Asl.Child;
Rnode = RsAllocateRe... | false | false | false | false | false | 0 |
get_module_id(const Gtk::TreeIter & iter)
{
std::string id;
if(iter) {
iter->get_value(4, id);
}
return id;
} | false | false | false | false | false | 0 |
toString()
{
return getMessage().append(" at or near point ").append(pt.toString());
} | false | false | false | false | false | 0 |
small_strptime(const char *p, const char *fmt,
struct tm *dt)
{
int c, val;
for(;;) {
c = *fmt++;
if (c == '\0') {
return p;
} else if (c == '%') {
c = *fmt++;
switch(c) {
case 'H':
val = date_get... | false | false | false | false | false | 0 |
printpitch(int pitch)
/* convert midi pitch value to abc note */
{
int p;
char keylet,symlet = 0;
int keynum,symcod;
char string[16];
p = pitch%12;
if (useflats)
{keynum = flatmap[p];
symcod = flatsym[p];
} else
{keynum = sharpmap[p];
symcod = sharpsym[p];
}
if (pitch<MIDDLE)
keylet = lowkey[keynum];
else
... | false | false | false | false | false | 0 |
Schedule()
{
SMTask *scan;
block.Empty();
// get time once and assume Do() don't take much time
UpdateNow();
int timer_timeout=Timer::GetTimeout();
if(timer_timeout>=0)
block.SetTimeout(timer_timeout);
int res=STALL;
for(scan=chain_ready; scan; scan=scan->next_ready)
{
if(scan... | false | false | false | false | false | 0 |
pxa_udc_shutdown(struct platform_device *_dev)
{
struct pxa_udc *udc = platform_get_drvdata(_dev);
if (udc_readl(udc, UDCCR) & UDCCR_UDE)
udc_disable(udc);
} | false | false | false | false | false | 0 |
x264_sync_frame_list_push( x264_sync_frame_list_t *slist, x264_frame_t *frame )
{
x264_pthread_mutex_lock( &slist->mutex );
while( slist->i_size == slist->i_max_size )
x264_pthread_cond_wait( &slist->cv_empty, &slist->mutex );
slist->list[ slist->i_size++ ] = frame;
x264_pthread_mutex_unlock( &s... | false | false | false | false | false | 0 |
do_s2io_chk_alarm_bit(u64 value, void __iomem *addr,
unsigned long long *cnt)
{
u64 val64;
val64 = readq(addr);
if (val64 & value) {
writeq(val64, addr);
(*cnt)++;
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
genprobe_new_chip(struct map_info *map, struct chip_probe *cp,
struct cfi_private *cfi)
{
int min_chips = (map_bankwidth(map)/4?:1); /* At most 4-bytes wide. */
int max_chips = map_bankwidth(map); /* And minimum 1 */
int nr_chips, type;
for (nr_chips = max_chips; nr_chips >= min_chips; nr_chips >>= 1) {
... | false | false | false | false | false | 0 |
ali_ircc_sir_interrupt(struct ali_ircc_cb *self)
{
int iobase;
int iir, lsr;
iobase = self->io.sir_base;
iir = inb(iobase+UART_IIR) & UART_IIR_ID;
if (iir) {
/* Clear interrupt */
lsr = inb(iobase+UART_LSR);
pr_debug("%s(), iir=%02x, lsr=%02x, iobase=%#x\n",
__func__, iir, lsr, iobase);
switch ... | false | false | false | false | false | 0 |
create_popup_win(gchar* label)
{
GtkWidget *MainFrame;
GtkWidget *Label;
GtkWidget *hbox = gtk_hbox_new(0,FALSE);
MainFrame = gtk_window_new (GTK_WINDOW_POPUP);
/* center it on the screen*/
gtk_window_set_position(GTK_WINDOW (MainFrame), GTK_WIN_POS_MOUSE);
/* set up key and mound button press to hid... | false | false | false | false | false | 0 |
GetNumberOfCellsUsingFace( int faceId )
{
#if SLOW_API
int result=0;
this->GenericCell->GetBoundaryIterator(this->CellIterator, 2);
this->CellIterator->Begin();
int i = 0;
while(!this->CellIterator->IsAtEnd() && ( i < faceId) )
{
this->CellIterator->Next();
++i;
}
assert("check: cell_found... | false | false | false | false | false | 0 |
GetLookupTable()
{
if (vtkResliceCursorRepresentation *rep =
vtkResliceCursorRepresentation::SafeDownCast(
this->ResliceCursorWidget->GetRepresentation()))
{
return rep->GetLookupTable();
}
return NULL;
} | false | false | false | false | false | 0 |
nm_ip4_config_replace_route (NMIP4Config *config,
guint i,
NMIP4Route *new_route)
{
NMIP4ConfigPrivate *priv;
GSList *old;
g_return_if_fail (NM_IS_IP4_CONFIG (config));
priv = NM_IP4_CONFIG_GET_PRIVATE (config);
old = g_slist_nth (priv->routes, i);
g_return_if_fail (old != NULL);
nm_ip4_route_u... | false | false | false | false | false | 0 |
gt_fastq_show_buffer(char separator, const char *description,
const char *buffer, unsigned long buffer_length, unsigned long width,
GtFile *outfp)
{
unsigned long i, current_length;
gt_file_xfputc(separator, outfp);
if (description != NULL)
gt_file_xfputs(description, outfp);
gt_file_xfputc('\n', ou... | false | false | false | false | false | 0 |
hud_num_make_mono(char *num_str)
{
int len, i, sc;
len = strlen(num_str);
sc = Lcl_special_chars;
for ( i = 0; i < len; i++ ) {
if ( num_str[i] == '1' ) {
num_str[i] = (char)(sc + 1);
}
}
} | false | false | false | false | false | 0 |
ng_conv_find_to(unsigned int out, int *i)
{
struct list_head *item;
struct ng_video_conv *ret;
int j = 0;
list_for_each(item,&ng_conv) {
if (j < *i) {
j++;
continue;
}
ret = list_entry(item, struct ng_video_conv, list);
#if 0
fprintf(stderr,"\tconv to: %-28s => %s\n",
ng_vfmt_to_desc[... | false | false | false | false | false | 0 |
aat2870_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct aat2870_platform_data *pdata = dev_get_platdata(&client->dev);
struct aat2870_data *aat2870;
int i, j;
int ret = 0;
aat2870 = devm_kzalloc(&client->dev, sizeof(struct aat2870_data),
GFP_KERNEL);
if (!aat2870) {
de... | false | false | false | false | false | 0 |
on_button_edit_field()
{
Glib::RefPtr<Gtk::TreeView::Selection> refTreeSelection = m_treeview_fields->get_selection();
if(refTreeSelection)
{
//TODO: Handle multiple-selection:
Gtk::TreeModel::iterator iter = refTreeSelection->get_selected();
if(iter)
{
Gtk::TreeModel::Row row = *iter;
... | false | false | false | false | false | 0 |
process_vm_rw_pages(struct page **pages,
unsigned offset,
size_t len,
struct iov_iter *iter,
int vm_write)
{
/* Do the copy for each page */
while (len && iov_iter_count(iter)) {
struct page *page = *pages++;
size_t copy = PAGE_SIZE - offset;
size_t copied;
if (copy > ... | false | false | false | false | false | 0 |
theora_dec_decode_buffer (GstTheoraDec * dec, GstBuffer * buf)
{
ogg_packet packet;
GstFlowReturn result = GST_FLOW_OK;
GstClockTime timestamp, duration;
/* make ogg_packet out of the buffer */
packet.packet = GST_BUFFER_DATA (buf);
packet.bytes = GST_BUFFER_SIZE (buf);
packet.granulepos = -1;
packet.p... | false | false | false | false | false | 0 |
filter_datespec_eq (EFilterElement *element_a,
EFilterElement *element_b)
{
EFilterDatespec *datespec_a = E_FILTER_DATESPEC (element_a);
EFilterDatespec *datespec_b = E_FILTER_DATESPEC (element_b);
/* Chain up to parent's eq() method. */
if (!E_FILTER_ELEMENT_CLASS (e_filter_datespec_parent_cla... | false | false | false | false | false | 0 |
read(uint8 *pBuf, int max_bytes_to_read, bool *pEOF_flag)
{
*pEOF_flag = false;
if (!m_pSrc_data)
return -1;
uint bytes_remaining = m_size - m_ofs;
if ((uint)max_bytes_to_read > bytes_remaining) {
max_bytes_to_read = bytes_remaining;
*pEOF_flag = true;
}
memcpy(pBuf, m... | false | false | false | false | false | 0 |
probe_gfs(blkid_probe pr, const struct blkid_idmag *mag)
{
struct gfs2_sb *sbd;
sbd = blkid_probe_get_sb(pr, mag, struct gfs2_sb);
if (!sbd)
return -1;
if (be32_to_cpu(sbd->sb_fs_format) == GFS_FORMAT_FS &&
be32_to_cpu(sbd->sb_multihost_format) == GFS_FORMAT_MULTI)
{
if (*sbd->sb_locktable)
blkid_pro... | false | false | false | false | false | 0 |
check_stat_data(git_index *index, const char *path, bool match)
{
const git_index_entry *entry;
struct stat st;
cl_must_pass(p_lstat(path, &st));
/* skip repo base dir name */
while (*path != '/')
++path;
++path;
entry = git_index_get_bypath(index, path, 0);
cl_assert(entry);
if (match) {
cl_assert(st.... | false | false | false | false | false | 0 |
slotOk()
{
KSharedConfig::Ptr config = KGlobal::config();
KConfigGroup configGroup(config->group(QString("New Game Dialog Mode")));
configGroup.writeEntry("competition", mode->isChecked());
if (enableCourses)
{
configGroup.writeEntry("course", currentCourse);
configGroup.writeEntry("extra", externCourses);
}... | false | false | false | false | false | 0 |
search_engine_hits_added (NautilusSearchEngine *engine, GList *hits,
NautilusSearchDirectory *search)
{
GList *hit_list;
GList *file_list;
NautilusFile *file;
SearchMonitor *monitor;
GList *monitor_list;
file_list = NULL;
for (hit_list = hits; hit_list != NULL; hit_list = hit_list->next) {
NautilusSear... | false | false | false | false | false | 0 |
mpw_lucnum (mpw_ptr rop, mpw_ptr op)
{
if G_LIKELY (MPW_IS_REAL (op)) {
MAKE_REAL (rop);
if (rop != op) {
MAKE_EMPTY (rop->r, MPW_INTEGER);
} else {
MAKE_COPY (rop->r);
}
mpwl_lucnum (rop->r, op->r);
} else {
gel_error_num = GEL_NUMERICAL_MPW_ERROR;
gel_errorout (_("Can't get Lucas number for com... | false | false | false | false | false | 0 |
make_lowercase(char * str)
{
size_t c;
if( !str || !*str ) return 0;
for(c = 0; c < strlen(str); c++ )
if( isupper((int) str[c]) ) str[c] = tolower((int) str[c]);
return 0;
} | false | false | false | false | false | 0 |
internal_bitwise_filter_match(void* obj, Slapi_Entry* entry, Slapi_Attr* attr, int op)
/* returns: 0 filter matched
* -1 filter did not match
* >0 an LDAP error code
*/
{
struct bitwise_match_cb *bmc = obj;
auto int rc = -1; /* no match */
char **ary = NULL;
int ii;
ary = slapi_entry... | false | false | false | false | false | 0 |
gwlist_get(List *list, long pos)
{
void *item;
lock(list);
gw_assert(pos >= 0);
gw_assert(pos < list->len);
item = GET(list, pos);
unlock(list);
return item;
} | 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.