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 |
|---|---|---|---|---|---|---|
secure(dns_name_t *name, dns_dbnode_t *node) {
dns_rdataset_t dsset;
isc_result_t result;
if (dns_name_equal(name, gorigin))
return (ISC_FALSE);
dns_rdataset_init(&dsset);
result = dns_db_findrdataset(gdb, node, gversion, dns_rdatatype_ds,
0, 0, &dsset, NULL);
if (dns_rdataset_isassociated(&dsset))
... | false | false | false | false | false | 0 |
Create( void )
{
wxStaticBox * poSbxSigSrc;
#ifndef LAYOUT_MNGR
int ix, iy;
// Set the frequency sweep parameter labels
m_oSbxSwpPars.GetSize( &ix, &iy );
m_oSbxSwpPars.SetSize( ix, 167 );
m_oSbxSwpPars.SetLabel( wxT(" Frequency Sweep ") );
#endif // LAYOUT_MNGR
m_oPnlStart .bSetName( wxT("St... | false | false | false | false | false | 0 |
STV_MkObject(struct worker *wrk, void *ptr, unsigned ltot,
const struct stv_objsecrets *soc)
{
struct object *o;
unsigned l;
CHECK_OBJ_NOTNULL(soc, STV_OBJ_SECRETES_MAGIC);
assert(PAOK(ptr));
assert(PAOK(soc->wsl));
assert(PAOK(soc->lhttp));
assert(ltot >= sizeof *o + soc->lhttp + soc->wsl);
o = ptr;
m... | false | false | false | false | false | 0 |
add_one_reflog_ent(unsigned char *osha1, unsigned char *nsha1,
const char *email, unsigned long timestamp, int tz,
const char *message, void *cb_data)
{
struct object *object;
struct rev_info *revs = (struct rev_info *)cb_data;
object = parse_object(osha1);
if (object)
add_pending_object(revs, object, "");
... | false | false | false | false | false | 0 |
make_cover_letter(struct rev_info *rev, int use_stdout,
int numbered, int numbered_files,
struct commit *origin,
int nr, struct commit **list, struct commit *head,
int quiet)
{
const char *committer;
const char *subject_start = NULL;
const char *body = "*** SUBJECT HERE ***\n\n***... | false | false | false | false | false | 0 |
gst_nuv_demux_read_head_frame (GstNuvDemux * nuv)
{
GstFlowReturn ret = GST_FLOW_OK;
ret = gst_nuv_demux_frame_header_load (nuv, &nuv->fh);
if (ret != GST_FLOW_OK)
return ret;
nuv->state = GST_NUV_DEMUX_MOVI;
return ret;
} | false | false | false | false | false | 0 |
symbol_bd_varlist_add(GHashTable **variables_table, gchar *varname, gchar *funcname, const gchar *filename, guint *identifierid)
{
ClassBrowserVar *var;
var = g_hash_table_lookup (*variables_table, varname);
if (var){
var->remove = FALSE;
} else {
*identifierid=(*identifierid)++;
var = get_new_var(v... | false | false | false | false | false | 0 |
object_FA_would_be_obvious(const object_type *o_ptr)
{
bitflag flags[OF_SIZE];
if (!player_has(PF_CUMBER_GLOVE))
return FALSE;
if ((wield_slot(o_ptr) != INVEN_HANDS) || (o_ptr->sval == SV_SET_OF_ALCHEMISTS_GLOVES))
return FALSE;
object_flags(o_ptr, flags);
if (of_has(flags, OF_DEX))
return FALSE;
retur... | false | false | false | false | false | 0 |
sky2_rx_map_skb(struct pci_dev *pdev, struct rx_ring_info *re,
unsigned size)
{
struct sk_buff *skb = re->skb;
int i;
re->data_addr = pci_map_single(pdev, skb->data, size, PCI_DMA_FROMDEVICE);
if (pci_dma_mapping_error(pdev, re->data_addr))
goto mapping_error;
dma_unmap_len_set(re, data_size, size);
f... | false | false | false | false | false | 0 |
ompi_comm_finalize(void)
{
int max, i;
ompi_communicator_t *comm;
/* Shut down MPI_COMM_SELF */
OBJ_DESTRUCT( &ompi_mpi_comm_self );
/* disconnect all dynamic communicators */
ompi_dpm.dyn_finalize();
/* Shut down MPI_COMM_WORLD */
OBJ_DESTRUCT( &ompi_mpi_comm_world );
/* Shut d... | false | false | false | false | false | 0 |
b43_nphy_op_switch_analog(struct b43_wldev *dev, bool on)
{
struct b43_phy *phy = &dev->phy;
u16 override = on ? 0x0 : 0x7FFF;
u16 core = on ? 0xD : 0x00FD;
if (phy->rev >= 19) {
/* TODO */
} else if (phy->rev >= 3) {
if (on) {
b43_phy_write(dev, B43_NPHY_AFECTL_C1, core);
b43_phy_write(dev, B43_NPHY_AF... | false | false | false | false | false | 0 |
load(nor_utils::StreamTokenizer& st)
{
// Calling the super-class method
FeaturewiseLearner::load(st);
_sigmoidSlope = UnSerialization::seekAndParseEnclosedValue<FeatureReal>(st, "sigSlope");
_sigmoidOffset = UnSerialization::seekAndParseEnclosedValue<FeatureReal>(st, "sigOffset");
stringstream para... | false | false | false | false | false | 0 |
augment(double height,size_t numVertices) const {
size_t NV=mVertices.size();
size_t NF=mFaces.size();
size_t tnf=0;
size_t tnv=NV;
for (vector<TPolyhedronFace>::const_iterator it=mFaces.begin();it!=mFaces.end();++it) if (it->vertices.size()==numVertices) {
tnf+=numVertices;
tnv++;
} else tnf++;
if (tnv==NV)... | false | false | false | false | false | 0 |
catalog_list_load_current_child (CatalogListData *list_data)
{
if (list_data->current_child == NULL) {
catalog_list_load_next_child (list_data->parent);
catalog_list_data_free (list_data);
return;
}
load_catalog_list ((CatalogListData *) list_data->current_child->data);
} | false | false | false | false | false | 0 |
saveAsXml(Stream &stream, int id, int pdfObjNum) const
{
assert(iImp);
stream << "<bitmap";
stream << " id=\"" << id << "\"";
stream << " width=\"" << width() << "\"";
stream << " height=\"" << height() << "\"";
stream << " length=\"" << size() << "\"";
switch (colorSpace()) {
case EDeviceGray:
stre... | false | false | false | false | false | 0 |
billterms_delete_term_cb (GtkButton *button, BillTermsWindow *btw)
{
g_return_if_fail (btw);
if (!btw->current_term)
return;
if (gncBillTermGetRefcount (btw->current_term) > 0)
{
gnc_error_dialog (btw->dialog,
_("Term \"%s\" is in use. You cannot delete it."),... | false | false | false | false | false | 0 |
H5G_link_to_info(const H5O_link_t *lnk, H5L_info_t *info)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity check */
HDassert(lnk);
/* Get information from the link */
if(info) {
info->cset = lnk->cset;
info->corder = lnk->corder;
... | false | false | false | false | false | 0 |
AddSky( u32 dome, const c8 *texture)
{
ISceneManager *smgr = Game->Device->getSceneManager ();
IVideoDriver * driver = Game->Device->getVideoDriver();
bool oldMipMapState = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS);
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
if ... | false | false | false | false | false | 0 |
ves_icall_System_Net_Sockets_Socket_Disconnect_internal(SOCKET sock, MonoBoolean reuse, gint32 *error)
{
int ret;
glong output_bytes = 0;
GUID disco_guid = WSAID_DISCONNECTEX;
GUID trans_guid = WSAID_TRANSMITFILE;
LPFN_DISCONNECTEX _wapi_disconnectex = NULL;
LPFN_TRANSMITFILE _wapi_transmitfile = NULL;
gboolean ... | false | false | false | false | false | 0 |
fileio_fputs(const fn_call& fn)
{
// GNASH_REPORT_FUNCTION;
FileIO* ptr = ensure<ThisIsNative<FileIO> >(fn);
string str = fn.arg(0).to_string();
return as_value(ptr->fputs(str));
} | false | false | false | false | false | 0 |
HandleModifySpeedCommand(char* args)
{
if (!*args)
{ return false; }
float modSpeed = (float)atof(args);
if (modSpeed > 10 || modSpeed < 0.1)
{
SendSysMessage(LANG_BAD_VALUE);
SetSentErrorMessage(true);
return false;
}
Player* chr = getSelectedPlayer();
if ... | false | false | false | false | false | 0 |
initPowerPrefixes() {
if (PowerPrefixes.count() == 0) {
PowerPrefixes << "p" << "n" << MicroSymbol << "u" << "m" << "" << "k" << "M" << "G" << "T";
PowerPrefixValues << 0.000000000001 << 0.000000001 << 0.000001 << 0.000001 << 0.001 << 1 << 1000 << 1000000 << 1000000000. << 1000000000000.;
}
} | false | false | false | false | false | 0 |
rb_thread_local_aset(thread, id, val)
VALUE thread;
ID id;
VALUE val;
{
rb_thread_t th = rb_thread_check(thread);
if (ruby_safe_level >= 4 && th != curr_thread) {
rb_raise(rb_eSecurityError, "Insecure: can't modify thread locals");
}
if (OBJ_FROZEN(thread)) rb_error_frozen("thread locals")... | false | false | false | false | false | 0 |
stripe_sh_chown_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
struct iatt *preop, struct iatt *postop, dict_t *xdata)
{
int callcnt = -1;
stripe_local_t *local = NULL;
if (!this || !frame || !fra... | false | false | false | false | false | 0 |
snd_pcm_plugin_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
{
snd_pcm_plugin_t *plugin = pcm->private_data;
snd_pcm_sframes_t sd;
int err = snd_pcm_delay(plugin->gen.slave, &sd);
if (err < 0)
return err;
if (pcm->stream == SND_PCM_STREAM_CAPTURE &&
pcm->access != SND_PCM_ACCESS_RW_INTERLEAVED &&
... | false | false | false | false | true | 1 |
free_order(int **order)
{
int i = 0;
while (order[i] != NULL) {
FREE(order[i]);
i++;
}
FREE(order);
} | false | false | false | false | false | 0 |
_dbus_message_get_network_data (DBusMessage *message,
const DBusString **header,
const DBusString **body)
{
_dbus_assert (message->locked);
*header = &message->header.data;
*body = &message->body;
} | false | false | false | false | false | 0 |
count_virtual_methods (MonoClass *class)
{
int i, count = 0;
guint32 flags;
class = mono_class_get_generic_type_definition (class); /*We can find this information by looking at the GTD*/
if (class->methods || !MONO_CLASS_HAS_STATIC_METADATA (class)) {
mono_class_setup_methods (class);
if (class->exception_type... | false | false | false | false | false | 0 |
write(
MIOFILE& out, bool include_net_info, bool include_coprocs
) {
char pv[265], pm[256], pf[1024], osn[256], osv[256], pn[256];
out.printf(
"<host_info>\n"
" <timezone>%d</timezone>\n",
timezone
);
if (include_net_info) {
out.printf(
" <domain_nam... | false | false | false | false | false | 0 |
rv770_populate_vddc_value(struct radeon_device *rdev, u16 vddc,
RV770_SMC_VOLTAGE_VALUE *voltage)
{
struct rv7xx_power_info *pi = rv770_get_pi(rdev);
int i;
if (!pi->voltage_control) {
voltage->index = 0;
voltage->value = 0;
return 0;
}
for (i = 0; i < pi->valid_vddc_entries; i++) {
if (vddc <= ... | false | false | false | false | false | 0 |
motion_notify_cb (GtkWidget *w, GdkEventMotion *event, ggobid *gg)
{
GdkModifierType state;
icoords pos;
gboolean rval = false;
gfloat val;
GtkWidget *tree_view = get_tree_view_from_object (G_OBJECT (w));
GGobiData *d = NULL;
gint selected_var = -1;
icoords *mousepos = &gg->wvis.mousepos;
gint color... | false | false | false | false | false | 0 |
CHECKSUM_print(const void *ip, const struct xt_entry_target *target,
int numeric)
{
const struct xt_CHECKSUM_info *einfo =
(const struct xt_CHECKSUM_info *)target->data;
printf(" CHECKSUM");
if (einfo->operation & XT_CHECKSUM_OP_FILL)
printf(" fill");
} | false | false | false | false | false | 0 |
__dup_locks_to_fdctx (pl_inode_t *pl_inode, fd_t *fd,
pl_fdctx_t *fdctx)
{
posix_lock_t *l = NULL;
posix_lock_t *duplock = NULL;
int ret = 0;
list_for_each_entry (l, &pl_inode->ext_list, list) {
if ((l->fd_num == fd_to_fdnum(fd))) {
... | false | false | false | false | false | 0 |
cb_testsuggs_button(Fl_Button*, void*) {
const char *helpmsg =
"CHILD WIDGET SIZING TESTS\n"
"=========================\n"
" 1) Start program\n"
" 2) Click the 'ccc button' and D1/D2 buttons.\n"
" Their sizes should not change.\n"
" 3) Click the 'Item h() from widget' checkbox.\n"
" 4) Click the 'ccc but... | false | false | false | false | false | 0 |
xfs_bmap_first_unused(
xfs_trans_t *tp, /* transaction pointer */
xfs_inode_t *ip, /* incore inode */
xfs_extlen_t len, /* size of hole to find */
xfs_fileoff_t *first_unused, /* unused block */
int whichfork) /* data or attr fork */
{
int error; /* error return value */
int idx; /* extent record ... | false | false | false | false | false | 0 |
gijoe_objdma(void)
{
data16_t *src_head, *src_tail, *dst_head, *dst_tail;
void *pdummy;
int idummy;
src_head = spriteram16;
src_tail = spriteram16 + 255*8;
K053247_export_config(&dst_head, (struct GfxElement**)&pdummy, (void**)&pdummy, &idummy, &idummy);
dst_tail = dst_head + 255*8;
for (; src_head... | false | false | false | false | false | 0 |
add_stat (GitgRevisionDetailsPanel *panel,
gchar const *line)
{
gchar **parts;
parts = g_strsplit_set (line, "\t ", -1);
if (g_strv_length (parts) == 3)
{
StatInfo *stat;
stat = g_slice_new (StatInfo);
stat->added = (guint)atoi (parts[0]);
stat->removed = (guint)atoi (parts[1]);
... | false | false | false | false | false | 0 |
SetRepresentationState(int state)
{
if (this->RepresentationState == state)
{
return;
}
state = (state < vtkLineRepresentation::Outside ?
vtkLineRepresentation::Outside :
(state > vtkLineRepresentation::Scaling ?
vtkLineRepresentation::Scaling : state));
this->Re... | false | false | false | false | false | 0 |
qla2x00_start_timer(scsi_qla_host_t *vha, void *func, unsigned long interval)
{
init_timer(&vha->timer);
vha->timer.expires = jiffies + interval * HZ;
vha->timer.data = (unsigned long)vha;
vha->timer.function = (void (*)(unsigned long))func;
add_timer(&vha->timer);
vha->timer_active = 1;
} | false | false | false | false | false | 0 |
fixJoy(int i)
{
// Forward joysticks.
if (min[i] < max[i])
{
if (value[i] <= home[i])
return (double) (value[i] - min[i]) / (double)(home[i] - min[i]) - 1.0;
else
return (double) (value[i] - home[i]) / (double)(max[i] - home[i]);
}
// Backwards joysticks.
else
if (value[i] >= ... | false | false | false | false | false | 0 |
inputcategories (rawdata *rdta)
/* read the category rates and the categories for each site */
{ /* inputcategories */
int i, j, ch, ci;
if (rdta->categs >= 0) {
printf("ERROR: Unexpected Categories auxiliary data line\n");
return FALSE;
}
if (fscanf(INFILE, "%d", & rdta->categs) !... | false | false | false | false | false | 0 |
recff_getmetatable(jit_State *J, RecordFFData *rd)
{
TRef tr = J->base[0];
if (tr) {
RecordIndex ix;
ix.tab = tr;
copyTV(J->L, &ix.tabv, &rd->argv[0]);
if (lj_record_mm_lookup(J, &ix, MM_metatable))
J->base[0] = ix.mobj;
else
J->base[0] = ix.mt;
} /* else: Interpreter will throw. ... | false | false | false | false | false | 0 |
jb_put(jitterbuf *jb, void *data, const enum jb_frame_type type, long ms, long ts, long now)
{
jb_dbg2("jb_put(%x,%x,%ld,%ld,%ld)\n", jb, data, ms, ts, now);
jb->info.frames_in++;
if (type == JB_TYPE_VOICE) {
/* presently, I'm only adding VOICE frames to history and drift
* calculations; mostly because with t... | false | false | false | false | false | 0 |
main_hall_mouse_release_region(int region)
{
if (Main_hall_frame_skip) {
return;
}
// don't do anything if there are no animations to play
else if(Main_hall_door_anim.size() == 0)
{
return;
}
// run backwards and stop at the first frame
Main_hall_door_anim.at(region).direction = GENERIC_ANIM_DIRECTION_BAC... | false | false | false | false | false | 0 |
dumpClients(int sig)
{
register int fd;
register char *base=config.log.dumpPrefix;
register char *name;
register int i;
register fdInfoType *info;
now=time((time_t*)NULL); /* used in makeLogRec, make it current */
if (!base) {
syslog(LOG_ERR,"No dump file.");
return;
}
name=mall... | false | false | false | false | false | 0 |
get_parameter_algo( struct para_data_s *para, enum para_name key )
{
int i;
struct para_data_s *r = get_parameter( para, key );
if( !r )
return -1;
if( digitp( r->u.value ) )
i = atoi( r->u.value );
else
i = string_to_pubkey_algo( r->u.value );
if (i == PUBKEY_ALGO_RSA_E || i == PUBKEY... | false | false | false | false | false | 0 |
nilfs_construct_dsync_segment(struct super_block *sb, struct inode *inode,
loff_t start, loff_t end)
{
struct the_nilfs *nilfs = sb->s_fs_info;
struct nilfs_sc_info *sci = nilfs->ns_writer;
struct nilfs_inode_info *ii;
struct nilfs_transaction_info ti;
int err = 0;
if (!sci)
return -EROFS;
nilfs_transa... | false | false | false | false | false | 0 |
iscsi_add_portal(char *addr, int port, int tpgt, int do_create)
{
struct iscsi_portal *new_portal;
list_for_each_entry(new_portal, &iscsi_portals_list,
iscsi_portal_siblings) {
if (!strcmp(addr, new_portal->addr)
&& port == new_portal->port) {
eprintf("add_portal failed. This portal already "
"exi... | false | false | false | true | false | 1 |
pixBilateral(PIX *pixs,
l_float32 spatial_stdev,
l_float32 range_stdev,
l_int32 ncomps,
l_int32 reduction)
{
l_int32 d;
l_float32 sstdev; /* scaled spatial stdev */
PIX *pixt, *pixr, *pixg, *pixb, *pixd;
PROCNAME("pixBilateral");... | false | false | false | false | false | 0 |
globus_i_gfs_log_close(void)
{
globus_list_t * list;
GlobusGFSName(globus_i_gfs_log_close);
GlobusGFSDebugEnter();
if(globus_l_gfs_log_handle != NULL)
{
globus_logging_flush(globus_l_gfs_log_handle);
globus_logging_destroy(globus_l_gfs_log_handle);
}
if(g... | false | false | false | false | false | 0 |
accept()
{
if( AttalSettings::getInstance()->getDispositionMode() != (AttalSettings::DispositionMode) _dispositionMode->currentItem() ) {
AttalSettings::getInstance()->setDispositionMode( (AttalSettings::DispositionMode) _dispositionMode->currentItem() );
emit sig_dispositions();
}
QDialog::accept ();
} | false | false | false | false | false | 0 |
asm_loop(ASMState *as)
{
MCode *mcspill;
/* LOOP is a guard, so the snapno is up to date. */
as->loopsnapno = as->snapno;
if (as->gcsteps)
asm_gc_check(as);
/* LOOP marks the transition from the variant to the invariant part. */
as->flagmcp = as->invmcp = NULL;
as->sectref = 0;
if (!neverfuse(as)) a... | false | false | false | false | false | 0 |
gtkpod_has_lyrics_editor() {
g_return_val_if_fail (GTKPOD_IS_APP(gtkpod_app), FALSE);
return (GTKPOD_APP_GET_INTERFACE (gtkpod_app)->lyrics_editor != NULL);
} | false | false | false | false | false | 0 |
do_ibusy(char *inum, int fd, struct aufs_ibusy *ibusy)
{
int err;
err = -1;
errno = 0;
ibusy->ino = strtoul(inum, NULL, 0);
if (errno)
goto out;
err = 0;
if (ibusy->ino == AUFS_ROOT_INO)
goto out;
err = ioctl(fd, AUFS_CTL_IBUSY, ibusy);
if (!err && ibusy->h_ino)
printf("i%llu\tb%d\thi%llu\n",
... | false | false | false | false | false | 0 |
parser_term_2 (Parser* self) {
gboolean result = FALSE;
LexerToken* token = NULL;
Lexer* _tmp0_ = NULL;
LexerToken* _tmp1_ = NULL;
Lexer* _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
LexerToken* _tmp4_ = NULL;
LexerTokenType _tmp5_ = 0;
gboolean _tmp8_ = FALSE;
LexerToken* _tmp9_ = NULL;
LexerTokenType _tmp10_ = ... | false | false | false | false | false | 0 |
smsc95xx_resume(struct usb_interface *intf)
{
struct usbnet *dev = usb_get_intfdata(intf);
struct smsc95xx_priv *pdata;
u8 suspend_flags;
int ret;
u32 val;
BUG_ON(!dev);
pdata = (struct smsc95xx_priv *)(dev->data[0]);
suspend_flags = pdata->suspend_flags;
netdev_dbg(dev->net, "resume suspend_flags=0x%02x\n",... | false | false | false | false | false | 0 |
print_ematch_list(FILE *fd, struct tcf_ematch_tree_hdr *hdr,
struct rtattr *rta)
{
int err = -1;
struct rtattr **tb;
tb = malloc((hdr->nmatches + 1) * sizeof(struct rtattr *));
if (tb == NULL)
return -1;
if (hdr->nmatches > 0) {
if (parse_rtattr_nested(tb, hdr->nmatches, rta) < 0)
goto errout;
... | false | false | false | false | false | 0 |
ReorderBufferExecuteInvalidations(ReorderBuffer *rb, ReorderBufferTXN *txn)
{
int i;
for (i = 0; i < txn->ninvalidations; i++)
LocalExecuteInvalidationMessage(&txn->invalidations[i]);
} | false | false | false | false | false | 0 |
ev_debug(enum ev_type type, union ev_val *val, uint32_t count)
{
switch (type) {
case ev_string:
cli_dbgmsg("\t(%u): %s\n", count, val->v_string);
break;
case ev_data:
{
char *d = cli_str2hex(val->v_data, count);
cli_dbgmsg("\t%d bytes\n", count);
cli_dbgmsg("\t%s\n", d);
free(d);
... | false | false | false | false | false | 0 |
FLASH_EraseAllBank2Sectors(uint8_t VoltageRange)
{
uint32_t tmp_psize = 0x0;
FLASH_Status status = FLASH_COMPLETE;
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation();
assert_param(IS_VOLTAGERANGE(VoltageRange));
if(VoltageRange == VoltageRange_1)
{
tm... | false | false | false | false | false | 0 |
est_mtdb_open(const char *name, int omode, int *ecp){
ESTMTDB *mtdb;
ESTDB *db;
char *path;
assert(name && ecp);
if(!est_global_lock()){
*ecp = ESTELOCK;
return NULL;
}
if(!est_global_db_names){
est_global_db_names = cbmapopenex(ESTMINIBNUM);
cbglobalgc(est_global_db_names, (void (*)(void ... | false | false | false | false | false | 0 |
amp_scalefac_bands(lame_internal_flags * gfc,
gr_info * const cod_info, FLOAT const *distort, FLOAT xrpow[576], int bRefine)
{
SessionConfig_t const *const cfg = &gfc->cfg;
int j, sfb;
FLOAT ifqstep34, trigger;
int noise_shaping_amp;
if (cod_info->scalefac_scale == 0) {... | false | false | false | false | false | 0 |
layer_error(int x)
{
SecureLayer *s = (SecureLayer *)sender();
int type = s->type;
d->errorCode = x;
setOpenMode(QIODevice::NotOpen);
d->active = false;
while (!d->layers.isEmpty()) {
delete d->layers.takeFirst();
}
if(type == SecureLayer::TLS)
setError(ErrTLS);
else if(type == SecureLayer::SASL)
setErro... | false | false | false | false | false | 0 |
keyPress(SDL_KeyboardEvent *e) {
//Quit demo if the user presses ESC
if (e->type == SDL_KEYDOWN) {
#if SDL_VERSION_ATLEAST(1,3,0)
bool key_escape = e->keysym.scancode == SDL_SCANCODE_ESCAPE;
bool key_return = e->keysym.scancode == SDL_SCANCODE_RETURN;
#else
bool key_escape = e->keysym.unicode... | false | false | false | false | false | 0 |
bt_ctf_stream_class_add_event_class(
struct bt_ctf_stream_class *stream_class,
struct bt_ctf_event_class *event_class)
{
int ret = 0;
if (!stream_class || !event_class) {
ret = -1;
goto end;
}
/* Check for duplicate event classes */
struct search_query query = { .value = event_class, .found = 0 };
g_ptr... | false | false | false | false | false | 0 |
init_nlm(void)
{
int err;
#ifdef CONFIG_SYSCTL
err = -ENOMEM;
nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root);
if (nlm_sysctl_table == NULL)
goto err_sysctl;
#endif
err = register_pernet_subsys(&lockd_net_ops);
if (err)
goto err_pernet;
err = lockd_create_procfs();
if (err)
goto err_procfs;
... | false | false | false | false | false | 0 |
initCursors()
{
if (BendpointCursor == NULL) {
//timer.setSingleShot(true);
//timer.setInterval(0);
//connect(&timer, SIGNAL(timeout()), &TheCursorMaster, SLOT(moveCursor()));
QStringList names;
QStringList masks;
names << ":resources/images/cursor/bendpoint.bmp"
<< ":resources/images/cursor/new_bend... | false | false | false | false | false | 0 |
collect_bounds(CloogConstraint *c, void *user)
{
struct clast_minmax_data *d = (struct clast_minmax_data *) user;
if (!valid_bound(c, d))
return 0;
d->r->elts[d->n] = clast_bound_from_constraint(c, d->level,
d->infos->names);
if (d->lower_bound && d->infos->stride[d->level - 1]) {
update_... | false | false | false | false | false | 0 |
rl_old_menu_complete (count, invoking_key)
int count, invoking_key;
{
rl_compentry_func_t *our_func;
int matching_filenames, found_quote;
static char *orig_text;
static char **matches = (char **)0;
static int match_list_index = 0;
static int match_list_size = 0;
static int orig_start, orig_end;
st... | false | false | false | false | false | 0 |
probability_map_new_raw (const guchar* data,
gint width,
gint height,
gint row_stride,
gint pixel_stride,
gint pixel_type)
{
ProbabilityMap *self = PROBABILITY_MAP(g_obj... | false | false | false | false | false | 0 |
_elm_flip_smart_focus_next(const Evas_Object *obj,
Elm_Focus_Direction dir,
Evas_Object **next)
{
ELM_FLIP_DATA_GET(obj, sd);
/* attempt to cycle focus on in sub-items */
if (sd->state)
return elm_widget_focus_next_get(sd->front.content, dir, next);
... | false | false | false | false | false | 0 |
regtry(prog, string, restate)
regexp *prog;
char *string;
struct regexec_state *restate;
{
register int i;
register char **sp;
register char **ep;
restate->reginput = string;
restate->regstartp = prog->startp;
restate->regendp = prog->endp;
sp = prog->startp;
ep = prog->endp;
for (i = NSUBEXP; i > 0; i--) {
... | false | false | false | false | false | 0 |
load_form_definition( const char * filename )
{
FILE *fp = fopen( filename, "r" );
int fd_magic, nf;
FL_FORM *form;
char buf[ 256 ],
ubuf[ 32 ];
if ( ! fp )
{
perror( filename );
return -1;
};
if ( fscanf( fp, "Magic: %d\n\n", &fd_magic ) != 1
|| ( ... | false | false | false | false | false | 0 |
acmp_strtoucs(ACMP *parser, const char *str, acmp_utf8_char_t *ucs_chars, int len) {
int i;
const char *c = str;
#ifdef ACMP_USE_UTF8
if (parser->is_utf8) {
for (i = 0; i < len; i++) {
*(ucs_chars++) = utf8_decodechar(c);
c += utf8_seq_len(c);
}
} else
#endif
... | false | false | false | false | false | 0 |
vnc_cursor_set_property(GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
VncCursor *cursor = VNC_CURSOR (object);
VncCursorPrivate *priv = cursor->priv;
switch (prop_id) {
case PROP_DATA:
... | false | false | false | false | false | 0 |
test_upload_simple (UploadData *data, gconstpointer service)
{
GDataUploadStream *upload_stream;
GFileInputStream *file_stream;
const gchar * const *tags, * const *tags2;
gssize transfer_size;
GError *error = NULL;
gdata_test_mock_server_start_trace (mock_server, "upload-simple");
/* Prepare the upload stream ... | false | false | false | false | false | 0 |
ZopfliBlockSplitSimple(const unsigned char* in,
size_t instart, size_t inend,
size_t blocksize,
size_t** splitpoints, size_t* npoints) {
size_t i = instart;
while (i < inend) {
ZOPFLI_APPEND_DATA(i, splitpoints, npoints);
i ... | false | false | false | false | false | 0 |
deviceinfo_free(gpointer user_data)
{
struct deviceinfo *d = user_data;
if (d->attioid > 0)
btd_device_remove_attio_callback(d->dev, d->attioid);
if (d->attrib != NULL)
g_attrib_unref(d->attrib);
g_slist_free_full(d->chars, g_free);
btd_device_unref(d->dev);
g_free(d->svc_range);
g_free(d);
} | false | false | false | false | false | 0 |
nmain_menu ()
{
nnumbers = 2;
nmenu = 8;
menu[0].text = "START GAME";
menu[0].func = start;
menu[1].text = playertext;
menu[1].func = playerchange;
minim[0].x = XPOSITION (1);
minim[0].y = YPOSITION (1);
minim[0].line = 1;
minim[0].number = &nrockets;
minim[0].max = 5;
minim[0].min = 1;
minim[... | false | false | false | false | false | 0 |
f_93 (anairiats_rec_12 arg0) {
/* local vardec */
ATSlocal (ats_ptr_type, tmp399) ;
ATSlocal (anairiats_rec_1, tmp400) ;
ATSlocal (ats_ptr_type, tmp401) ;
ATSlocal (ats_ptr_type, tmp402) ;
ATSlocal (anairiats_rec_11, tmp403) ;
ATSlocal (ats_ptr_type, tmp404) ;
ATSlocal (ats_ptr_type, tmp405) ;
ATSlocal (ats_int_type, t... | false | false | false | false | false | 0 |
CloseIntoRel(QueryDesc *queryDesc)
{
EState *estate = queryDesc->estate;
/* OpenIntoRel might never have gotten called */
if (estate->es_into_relation_descriptor)
{
/* If we skipped using WAL, must heap_sync before commit */
if (!estate->es_into_relation_use_wal)
heap_sync(estate->es_into_relation_descri... | false | false | false | false | false | 0 |
update_tabs_visibility (GeditNotebook *notebook,
gboolean before_inserting)
{
gboolean show_tabs;
switch (notebook->priv->show_tabs_mode)
{
case GEDIT_NOTEBOOK_SHOW_TABS_NEVER:
show_tabs = FALSE;
break;
case GEDIT_NOTEBOOK_SHOW_TABS_AUTO:
{
guint num;
num = gtk_notebook_get_n_pages (G... | false | false | false | false | false | 0 |
schedule()
{
Ulong stime;
long interval = 0;
char *proc;
evptr new;
int procidx = 2;
if (targc != 3)
{
if (targc != 4 || targv[0][0] != 'e')
{
rsimerror(filename, lineno, "Missing time and/or procedure\n" );
return(0);
}
}
else if (targc == 3)
{
/* Note that "cance... | false | false | false | false | false | 0 |
aui_service_dialog_finalize(GObject *object) {
AuiServiceDialog *d = AUI_SERVICE_DIALOG(object);
if (d->priv->domain_pulse_timeout > 0)
g_source_remove(d->priv->domain_pulse_timeout);
if (d->priv->service_pulse_timeout > 0)
g_source_remove(d->priv->service_pulse_timeout);
if (d->priv-... | false | false | false | false | false | 0 |
keyctl_join_session_keyring(const char __user *_name)
{
char *name;
long ret;
/* fetch the name from userspace */
name = NULL;
if (_name) {
name = strndup_user(_name, KEY_MAX_DESC_SIZE);
if (IS_ERR(name)) {
ret = PTR_ERR(name);
goto error;
}
ret = -EPERM;
if (name[0] == '.')
goto error_name;
... | false | false | false | false | false | 0 |
vxge_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info)
{
info->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
info->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE);
info->port = PORT_FIBRE;
info->transceiver = XCVR_EXTERNAL;
if (netif_carrier_ok(dev)) {
ethtool_cmd_speed_... | false | false | false | false | false | 0 |
ParseTextureChunk(D3DS::Texture* pcOut)
{
ASSIMP_3DS_BEGIN_CHUNK();
// get chunk type
switch (chunk.Flag)
{
case Discreet3DS::CHUNK_MAPFILE:
{
// The material name string is already zero-terminated, but we need to be sure ...
const char* sz = (const char*)stream->GetPtr();
unsigned int cnt = 0;
while (s... | false | false | false | false | false | 0 |
explain_buffer_errno_shmctl_explanation(explain_string_buffer_t *sb, int errnum,
const char *syscall_name, int shmid, int command, struct shmid_ds *data)
{
/*
* http://www.opengroup.org/onlinepubs/009695399/functions/shmctl.html
*/
switch (errnum)
{
case EFAULT:
if (!data)
... | false | false | false | false | false | 0 |
login_finish(Pulse *conn, Ecore_Fd_Handler *fdh)
{
Pulse_Tag *tag;
tag = calloc(1, sizeof(Pulse_Tag));
tag->dsize = 2 * PA_TAG_SIZE_U32; /* tag_simple_init */
proplist_init(tag);
DBG("prep %zu bytes", tag->dsize);
tag->data = malloc(tag->dsize);
tag_simple_init(conn, tag, PA_COMMAND_SET_CLIENT_NAM... | false | false | false | false | false | 0 |
update_pool_references(JCR *jcr, B_DB *db, POOL *pool)
{
POOL_DBR pr;
if (!pool->RecyclePool && !pool->ScratchPool) {
return 1;
}
memset(&pr, 0, sizeof(POOL_DBR));
bstrncpy(pr.Name, pool->name(), sizeof(pr.Name));
if (!db_get_pool_record(jcr, db, &pr)) {
return -1; ... | false | false | false | false | false | 0 |
naturalsize (int &w, int &h) const {
h = m_font->get_height();
w = 0;
const char * translation = _(m_text.c_str());
int len = strlen(translation);
int monoWidth = m_font->get_width(sampleChar);
for (int i = 0; i<len; i++) {
if (monoChars.empty() || monoChars.... | false | false | false | false | false | 0 |
parport_uss720_write_control(struct parport *pp, unsigned char d)
{
struct parport_uss720_private *priv = pp->private_data;
d = (d & 0xf) | (priv->reg[1] & 0xf0);
if (set_1284_register(pp, 2, d, GFP_KERNEL))
return;
priv->reg[1] = d;
} | false | false | false | false | false | 0 |
ensure_fake_uptodate(command_t *cmd)
{
/* FIXME: could do the stat/touch here, but nah... */
char const *touch_args[3];
if (cmd->mode == MODE_INSTALL) {
return 0;
}
if (!cmd->fake_output_name) {
return 0;
}
touch_args[0] = "touch";
touch_args[1] = cmd->fake_output_name;
touch_args[2] = NULL;
return exte... | false | false | false | false | false | 0 |
print_multi_union_pw_aff_isl(
__isl_take isl_printer *p, __isl_keep isl_multi_union_pw_aff *mupa)
{
struct isl_print_space_data data = { 0 };
isl_space *space;
space = isl_multi_union_pw_aff_get_space(mupa);
if (isl_space_dim(space, isl_dim_param) > 0) {
struct isl_print_space_data space_data = { 0 };
p = pri... | false | false | false | false | false | 0 |
distribute_stop(void)
#else
void
distribute_stop()
#endif
{
int i;
struct client_command cc;
/*
* Only send one stop to the clients. Each client will
* send stop to the master, but the master only needs
* to distribute the first stop. Without this, the
* master may distribute too many stops and overflow
... | false | false | false | false | false | 0 |
chick_fidget (edict_t *self)
{
if (self->monsterinfo.aiflags & AI_STAND_GROUND)
return;
if (random() <= 0.3)
self->monsterinfo.currentmove = &chick_move_fidget;
} | false | false | false | false | false | 0 |
decode_ftime(uint8_t *buf)
{
int raw;
struct tm datetime;
raw = (int) lha_decode_uint32(buf);
if (raw == 0) {
return 0;
}
// Deconstruct the contents of the MS-DOS time value and populate the
// 'datetime' structure. Note that 'mktime' generates a timestamp for
// the local time zone: this is unfortunate, ... | false | false | false | false | false | 0 |
clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
int cport, cfd;
char cip[128];
clusterLink *link;
REDIS_NOTUSED(el);
REDIS_NOTUSED(mask);
REDIS_NOTUSED(privdata);
cfd = anetTcpAccept(server.neterr, fd, cip, &cport);
if (cfd == AE_ERR) {
redisLog(REDIS_V... | false | false | false | false | false | 0 |
on_end_element(GMarkupParseContext *context,
const gchar *element_name,
gpointer user_data, GError **error) {
debug_printf("on_end_element %s\n", element_name);
if (strcmp(element_name, "fragment") == 0) {
}
else if (strcmp(element_name, "vertex") == 0) {
}
else {
return... | false | false | false | false | false | 0 |
make_inheritable(PyObject *py_fds_to_keep, int errpipe_write)
{
Py_ssize_t i, len;
len = PySequence_Length(py_fds_to_keep);
for (i = 0; i < len; ++i) {
PyObject* fdobj = PySequence_Fast_GET_ITEM(py_fds_to_keep, i);
long fd = PyLong_AsLong(fdobj);
assert(!PyErr_Occurred());
a... | 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.