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 |
|---|---|---|---|---|---|---|
pkinit_client_req_fini(krb5_context context, krb5_clpreauth_moddata moddata,
krb5_clpreauth_modreq modreq)
{
pkinit_req_context reqctx = (pkinit_req_context)modreq;
pkiDebug("%s: received reqctx at %p\n", __FUNCTION__, reqctx);
if (reqctx == NULL)
return;
if (reqctx->magi... | false | false | false | false | false | 0 |
capture(const QString &file)
{
Q_D(QCameraImageCapture);
d->unsetError();
if (d->control) {
return d->control->capture(file);
} else {
d->error = NotSupportedFeatureError;
d->errorString = tr("Device does not support images capture.");
emit error(-1, d->error, d->error... | false | false | false | false | false | 0 |
_sync_idle_dosync_collectedexcludes(gpointer fpath_gp, gpointer flags_gp, gpointer arg_gp) {
char *fpath = (char *)fpath_gp;
indexes_t *indexes_p = ((struct dosync_arg *)arg_gp)->indexes_p;
printf_ddd("Debug3: _sync_idle_dosync_collectedexcludes(): \"%s\", %u (%p).\n", fpath, GPOINTER_TO_INT(flags_gp), flags_... | false | false | false | false | false | 0 |
gst_ximagesink_xcontext_clear (GstXImageSink * ximagesink)
{
GstXContext *xcontext;
g_return_if_fail (GST_IS_XIMAGESINK (ximagesink));
GST_OBJECT_LOCK (ximagesink);
if (ximagesink->xcontext == NULL) {
GST_OBJECT_UNLOCK (ximagesink);
return;
}
/* Take the xcontext reference and NULL it while we
... | false | false | false | false | false | 0 |
vmci_resource_add(struct vmci_resource *resource,
enum vmci_resource_type resource_type,
struct vmci_handle handle)
{
unsigned int idx;
int result;
spin_lock(&vmci_resource_table.lock);
if (handle.resource == VMCI_INVALID_ID) {
handle.resource = vmci_resource_find_id(handle.context,
resource... | false | false | false | false | false | 0 |
kwbimage_generate(struct image_tool_params *params,
struct image_type_params *tparams)
{
int alloc_len;
void *hdr;
int version = 0;
version = image_version_file(params->imagename);
if (version == 0) {
alloc_len = sizeof(struct main_hdr_v0) +
sizeof(struct ext_hdr_v0);
} else {
alloc_len = image_he... | false | false | false | false | true | 1 |
operator<<(std::ostream& out, const HypothesisStackCubePruning& hypoColl)
{
HypothesisStackCubePruning::const_iterator iter;
for (iter = hypoColl.begin() ; iter != hypoColl.end() ; ++iter) {
const Hypothesis &hypo = **iter;
out << hypo << endl;
}
return out;
} | false | false | false | false | false | 0 |
omitnumberedstring(Object o, Object numbers)
{
char *cp;
int i;
if (DXGetObjectClass(o) != CLASS_STRING) {
DXSetError(ERROR_INTERNAL,
"omitnumberedstring routine called on non-string input");
return NULL;
}
cp = DXGetString((String)o);
if (!cp) {
DXSetError(ERROR_DATA_INVALID,
"... | false | false | false | false | false | 0 |
cavan_cache_write(struct cavan_cache *cache, const char *buff, size_t size)
{
const char *buff_bak = buff;
const char *buff_end = buff + size;
pthread_mutex_lock(&cache->lock);
while (1)
{
size_t length, rcount;
size_t remain;
remain = buff_end - buff;
if (remain == 0)
{
break;
}
while (1)
{... | false | false | false | false | false | 0 |
parse_logic_expr(std::istream& in, scope_t * scope,
const short flags)
{
value_expr node;
if (peek_next_nonws(in) == '!') {
char c;
in.get(c);
node.reset(new value_expr_t(value_expr_t::O_NOT));
node->set_left(parse_add_expr(in, scope, flags));
return node.release();
}
node.reset(parse_... | false | false | false | false | false | 0 |
save()
{
QString filename = DATA_PATH + "experience.dat";
QFile file( filename );
uint lastLevel = 0;
if (! file.open( QIODevice::WriteOnly ) ) {
logEE( "Could not open file %s for writng\n", filename.toLatin1().constData() );
return false;
}
QTextStream ts( &file );
ts << "<?xml version=\"1.0\" encoding=... | false | false | false | false | false | 0 |
xdig2num(char const &dig) {
if (isdigit(dig)) return dig - '0';
if ('a' <= dig && dig <= 'f') return dig - 'a' + 10;
if ('A' <= dig && dig <= 'F') return dig - 'A' + 10;
return 0;
} | false | false | false | false | false | 0 |
hcache_gui_init(void)
{
GtkTreeModel *model;
gint n;
STATIC_ASSERT(G_N_ELEMENTS(hcache_col_labels) ==
HCACHE_STATS_VISIBLE_COLUMNS);
treeview_hcache = GTK_TREE_VIEW(gui_main_window_lookup("treeview_hcache"));
model = GTK_TREE_MODEL(gtk_list_store_new(4,
G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT,
... | false | false | false | false | false | 0 |
ad5380_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int val, int val2, long info)
{
const unsigned int max_val = (1 << chan->scan_type.realbits);
struct ad5380_state *st = iio_priv(indio_dev);
switch (info) {
case IIO_CHAN_INFO_RAW:
case IIO_CHAN_INFO_CALIBSCALE:
if (val >= max_val ||... | false | false | false | false | false | 0 |
split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
{
gchar *ptr;
gchar c;
gboolean escaped = FALSE, fresh = TRUE;
gchar quote_char = '\0';
GString *str;
str = g_string_new ("");
ptr = (gchar *) cmdline;
while ((c = *ptr++) != '\0') {
if (escaped) {
/*
* \CHAR is only special inside... | false | false | false | false | false | 0 |
build_curseg(struct f2fs_sb_info *sbi)
{
struct curseg_info *array;
int i;
array = kcalloc(NR_CURSEG_TYPE, sizeof(*array), GFP_KERNEL);
if (!array)
return -ENOMEM;
SM_I(sbi)->curseg_array = array;
for (i = 0; i < NR_CURSEG_TYPE; i++) {
mutex_init(&array[i].curseg_mutex);
array[i].sum_blk = kzalloc(PAGE_C... | false | false | false | false | false | 0 |
close_listeners(void)
{
aClient *acptr, *bcptr;
aConfItem *aconf;
/*
* close all 'extra' listening ports we have and unlink the file
* name if it was a unix socket.
*/
for (acptr = ListenerLL; acptr; acptr = bcptr)
{
aconf = acptr->confs->value.aconf;
bcptr = acptr->next; /* might get deleted by close_c... | false | false | false | false | false | 0 |
GFMethod_consGF2m(const mp_int *irr, const unsigned int irr_arr[5])
{
mp_err res = MP_OKAY;
int ret;
GFMethod *meth = NULL;
meth = GFMethod_new();
if (meth == NULL)
return NULL;
MP_CHECKOK(mp_copy(irr, &meth->irr));
if (irr_arr != NULL) {
/* Irreducible polynomials are either trinomials or pentanomials. */... | false | false | false | false | false | 0 |
take_off(void)
{
char desc[ROGUE_COLUMNS];
object *obj;
if (rogue.armor) {
if (rogue.armor->is_cursed) {
message(curse_message, 0);
} else {
mv_aquatars();
obj = rogue.armor;
unwear(rogue.armor);
#if defined( JAPAN )
get_desc(obj, desc, 0);
(void) strcat(desc, mesg[94]);
#el... | true | true | false | false | false | 1 |
test_clone_empty__can_clone_an_empty_local_repo_barely(void)
{
char *local_name = "refs/heads/master";
const char *expected_tracked_branch_name = "refs/remotes/origin/master";
const char *expected_remote_name = "origin";
git_buf buf = GIT_BUF_INIT;
git_reference *ref;
cl_set_cleanup(&cleanup_repository, "./empty... | false | false | false | false | false | 0 |
Initialize( hid_t hDatasetID, const char *pszName )
{
SetDescription( pszName );
this->hDatasetID = hDatasetID;
hid_t datatype = H5Dget_type( hDatasetID );
dataspace = H5Dget_space( hDatasetID );
int n_dims = H5Sget_simple_extent_ndims( dataspace );
native = H... | false | false | false | false | false | 0 |
glade_widget_set_object (GladeWidget * gwidget, GObject * new_object)
{
GObject *old_object;
g_return_if_fail (GLADE_IS_WIDGET (gwidget));
g_return_if_fail (new_object == NULL ||
g_type_is_a (G_OBJECT_TYPE (new_object),
glade_widget_adaptor_get_object_type (gw... | false | false | false | false | false | 0 |
o_arc_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
{
if (o_current->arc == NULL) {
return;
}
gschem_cairo_arc (w_current, o_current->line_width,
o_current->arc->x,
o_current->arc->y,
o_current->arc->width / 2,... | false | false | false | false | false | 0 |
esl_scorematrix_ExpectedScore(ESL_SCOREMATRIX *S, double *fi, double *fj, double *ret_E)
{
double E = 0.;
int a,b;
for (a = 0; a < S->K; a++)
for (b = 0; b < S->K; b++)
E += fi[a] * fj[b] * (double) S->s[a][b];
*ret_E = E;
return eslOK;
} | false | false | false | false | false | 0 |
mca_base_component_compare(const mca_base_component_t* aa,
const mca_base_component_t* bb)
{
int val;
val = strncmp(aa->mca_type_name, bb->mca_type_name,
MCA_BASE_MAX_TYPE_NAME_LEN);
if (val != 0) {
return -val;
}
val = strncmp(aa->mca_compon... | false | false | false | false | false | 0 |
clearArea(int x, int y,
unsigned int width, unsigned int height,
bool exposures) {
// TODO: probably could call renderForeground here (with x,y,w,h)
if (m_lastbg_pm == ParentRelative && m_renderer)
FbWindow::clear();
else
XClearArea(display()... | false | false | false | false | false | 0 |
getEdgeProbability(const BasicBlock *Src, const BasicBlock *Dst) const {
uint32_t N = getEdgeWeight(Src, Dst);
uint32_t D = getSumForBlock(Src);
// It is possible that the edge weight on the only successor edge of Src is
// zero, in which case we return 100%.
if (N == 0 && D == 0)
return BranchProbabili... | false | false | false | false | false | 0 |
copytree()
{
/* Make a complete copy of the current tree for undo purposes */
if (whichtree == 1)
othertree = 0;
else
othertree = 1;
treesets[othertree].root = copytrav(root);
treesets[othertree].nonodes = nonodes;
treesets[othertree].waswritten = waswritten;
treesets[othertree].hasmult = hasmult... | false | false | false | false | false | 0 |
leah_c0(void)
{
UINT32 src1 = SRC1VAL;
UINT32 src2 = SRC2VAL;
UINT32 dst = src1 + (src2 << 1);
SET_ZNCV_ADD(dst, src1, src2);
if (src1 & 0x80000000)
SET_CFLAG(1);
if ((src1 ^ (src1 >> 1)) & 0x40000000)
SET_VFLAG(1);
} | false | false | false | false | false | 0 |
FT_Stroker_New( FT_Library library,
FT_Stroker *astroker )
{
FT_Error error;
FT_Memory memory;
FT_Stroker stroker = NULL;
if ( !library )
return FT_Err_Invalid_Argument;
memory = library->memory;
if ( !FT_NEW( stroker ) )
{
stroker->library = libr... | false | false | false | false | false | 0 |
mktoken(const char *hash, const char *t, time_t now)
{
char now_s[NUMBUFSIZE];
char *p;
unsigned char *q;
int i;
char *r;
libmail_strh_time_t(now, now_s);
p=malloc(strlen(hash)+strlen(now_s)+3+hmac_sha1.hh_L*2);
if (!p)
return (NULL);
strcat(strcpy(p, hash), now_s);
q=malloc(hmac_sha1.hh_L*3);
if (!q... | false | false | false | false | false | 0 |
print_voicecodes()
{
int i;
if (voicecodes == 0) return;
printf("voice mapping:\n");
for (i=0;i<voicecodes;i++)
{
if(i%4 == 3) printf("\n");
printf("%s %d ",voicecode[i],i+1);
}
printf("\n");
} | false | false | false | false | false | 0 |
setComboStyle(FXuint mode){
FXuint opts=(options&~COMBOBOX_MASK)|(mode&COMBOBOX_MASK);
if(opts!=options){
options=opts;
if(options&COMBOBOX_STATIC){
field->setEditable(FALSE); // Non-editable
list->setScrollStyle(SCROLLERS_TRACK|HSCROLLING_OFF); // No scrolling... | false | false | false | false | false | 0 |
ReachWithSpellCure(Unit* pVictim)
{
if (!pVictim)
{ return NULL; }
for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
if (!m_spells[i])
{ continue; }
SpellEntry const* spellInfo = sSpellStore.LookupEntry(m_spells[i]);
if (!spellInfo)
{
sLog.ou... | false | false | false | false | false | 0 |
fso_framework_kernel_removeModule (const gchar* filename, gboolean wait, gboolean force, GError** error) {
guint flags = 0U;
gboolean _tmp0_ = FALSE;
gboolean _tmp2_ = FALSE;
glong ok = 0L;
const gchar* _tmp4_ = NULL;
guint _tmp5_ = 0U;
glong _tmp6_ = 0L;
glong _tmp7_ = 0L;
GError * _inner_error_ = NULL;
g_re... | false | false | false | false | false | 0 |
wilc_wlan_firmware_download(const u8 *buffer, u32 buffer_size)
{
wilc_wlan_dev_t *p = &g_wlan;
u32 offset;
u32 addr, size, size2, blksz;
u8 *dma_buffer;
int ret = 0;
blksz = BIT(12);
/* Allocate a DMA coherent buffer. */
dma_buffer = kmalloc(blksz, GFP_KERNEL);
if (dma_buffer == NULL) {
/*EIO 5*/
ret = ... | false | true | false | false | false | 1 |
cleanup()
{
d->mode = Idle;
// stop any dns
if(d->dns.isBusy())
d->dns.stop();
if(d->srv.isBusy())
d->srv.stop();
// destroy the bytestream, if there is one
delete d->bs;
d->bs = 0;
d->multi = false;
d->using_srv = false;
d->will_be_ssl = false;
d->probe_mode = -1;
setUseSSL(false);
setPeerAddressN... | false | false | false | false | false | 0 |
sas_host_match(struct attribute_container *cont,
struct device *dev)
{
struct Scsi_Host *shost;
struct sas_internal *i;
if (!scsi_is_host_device(dev))
return 0;
shost = dev_to_shost(dev);
if (!shost->transportt)
return 0;
if (shost->transportt->host_attrs.ac.class !=
&sas_host_class.class)
retur... | false | false | false | false | false | 0 |
intel_gen6_powersave_work(struct work_struct *work)
{
struct drm_i915_private *dev_priv =
container_of(work, struct drm_i915_private,
rps.delayed_resume_work.work);
struct drm_device *dev = dev_priv->dev;
mutex_lock(&dev_priv->rps.hw_lock);
gen6_reset_rps_interrupts(dev);
if (IS_CHERRYVIEW(dev)) {
c... | false | false | false | false | false | 0 |
player_controller_remove_from_menu (PlayerController* self) {
gboolean* _tmp13_ = NULL;
gboolean _tmp14_ = FALSE;
g_return_if_fail (self != NULL);
{
GeeArrayList* _item_list = NULL;
GeeArrayList* _tmp0_ = NULL;
GeeArrayList* _tmp1_ = NULL;
gint _item_size = 0;
GeeArrayList* _tmp2_ = NULL;
gint _tmp3_ = ... | false | false | false | true | false | 1 |
dc_setReplyHostName(const char *s)
{
if( (s == NULL) || (getenv("DCACHE_REPLY") != NULL) )
return;
if( hostName != NULL )
free(hostName);
dc_debug(DC_INFO, "Binding client callback hostname to %s.", s);
hostName = (char *)strdup(s);
} | false | false | false | false | true | 1 |
posix_memalign(void **memptr, size_t alignment, size_t size)
{
/*
* Per standard, posix_memalign returns EINVAL when alignment
* is not a power of two or power of sizeof(void*). efence
* doesn't check the value of alignment in memalign, but then
* again, memalign was never specified very well, and on some
*... | false | false | false | false | false | 0 |
set_base_and_text (char const *type_name)
{
static char const *_text_widgets[] = { "GtkCellView", "GtkEntry",
"GtkTextView" };
for (unsigned int i = 0; i < G_N_ELEMENTS (_text_widgets); i++) {
if (0 == g_strcmp0 (type_name, _text_widgets[i])) {
return true;
}
}
return false;
} | false | false | false | false | false | 0 |
netup_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{
unsigned long flags;
int i, trans_done, res = num;
struct netup_i2c *i2c = i2c_get_adapdata(adap);
u16 reg;
if (num <= 0) {
dev_dbg(i2c->adap.dev.parent,
"%s(): num == %d\n", __func__, num);
return -EINVAL;
}
spin_lock_irqsave... | false | false | false | false | false | 0 |
select_pool(void)
{
static int rotating_pool = 0;
struct pool *pool, *cp;
bool avail = false;
int tested, i;
cp = current_pool();
if (pool_strategy == POOL_BALANCE) {
pool = select_balanced(cp);
goto out;
}
if (pool_strategy != POOL_LOADBALANCE) {
pool = cp;
goto out;
} else
pool = NULL;
for (i ... | false | false | false | false | false | 0 |
emulib_EnableSound (uae_u32 val)
{
if (!sound_available || currprefs.produce_sound == 2)
return 0;
currprefs.produce_sound = val;
return 1;
} | false | false | false | false | false | 0 |
visit(const char* value,orbOptions::Source) throw (orbOptions::BadParam) {
unsigned int v;
if( sscanf(value,"%o",&v) != 1 ) {
throw orbOptions::BadParam(key(),value,
"Invalid value, expect mode bits in octal radix");
}
orbParameters::unixTransportPermission = v;
} | false | false | false | false | false | 0 |
sm501fb_suspend_fb(struct sm501fb_info *info,
enum sm501_controller head)
{
struct fb_info *fbi = info->fb[head];
struct sm501fb_par *par = fbi->par;
if (par->screen.size == 0)
return 0;
/* blank the relevant interface to ensure unit power minimised */
(par->ops.fb_blank)(FB_BLANK_POWERDOWN, fbi);
/... | false | false | false | false | false | 0 |
pkinit_get_deferred_id_flags(pkinit_deferred_id *identities,
const char *identity)
{
int i;
for (i = 0; identities != NULL && identities[i] != NULL; i++) {
if (strcmp(identities[i]->identity, identity) == 0)
return identities[i]->ck_flags;
}
return 0;
} | false | false | false | false | false | 0 |
silence_gen_alter(silence_gen_state_t *s, int silent_samples)
{
/* Block negative silences */
if (silent_samples < 0)
{
if (-silent_samples > s->remaining_samples)
silent_samples = -s->remaining_samples;
}
s->remaining_samples += silent_samples;
s->total_samples += silent_sam... | false | false | false | false | false | 0 |
draw_edges_mmx(uint8_t *buf, int wrap, int width, int height, int w)
{
uint8_t *ptr, *last_line;
int i;
last_line = buf + (height - 1) * wrap;
/* left and right */
ptr = buf;
if(w==8)
{
__asm__ volatile(
"1: \n\t"
"movd (%0... | false | false | false | false | false | 0 |
CommentOperator(List *opername, List *arguments, char *comment)
{
TypeName *typenode1 = (TypeName *) linitial(arguments);
TypeName *typenode2 = (TypeName *) lsecond(arguments);
Oid oid;
/* Look up the operator */
oid = LookupOperNameTypeNames(NULL, opername,
typenode1, typenode2,
false, ... | false | false | false | false | false | 0 |
remove_empty(hwloc_topology_t topology, hwloc_obj_t *pobj)
{
hwloc_obj_t obj = *pobj, child, *pchild;
for_each_child_safe(child, obj, pchild)
remove_empty(topology, pchild);
if (obj->type != HWLOC_OBJ_NODE
&& !obj->first_child /* only remove if all children were removed above, so that we don't remove ... | false | false | false | false | false | 0 |
soap_fdelete(struct soap_clist *p)
{ switch (p->type)
{
case SOAP_TYPE_vector:
if (p->size < 0)
SOAP_DELETE((vector*)p->ptr);
else
SOAP_DELETE_ARRAY((vector*)p->ptr);
break;
case SOAP_TYPE_matrix:
if (p->size < 0)
SOAP_DELETE((matrix*)p->ptr);
else
SOAP_DELETE_ARRAY((matrix*)p->ptr);
break;
... | false | false | false | false | false | 0 |
_enter_buffered_busy(buffered *self)
{
if (self->owner == PyThread_get_thread_ident()) {
PyErr_Format(PyExc_RuntimeError,
"reentrant call inside %R", self);
return 0;
}
Py_BEGIN_ALLOW_THREADS
PyThread_acquire_lock(self->lock, 1);
Py_END_ALLOW_THREADS
return 1... | false | false | false | false | false | 0 |
timer_callback (GkmTimer *timer, gpointer user_data)
{
GkmObject *self = user_data;
glong after, idle, offset;
GkmObjectTransient *transient;
GTimeVal tv;
g_return_if_fail (GKM_IS_OBJECT (self));
g_object_ref (self);
g_return_if_fail (self->pv->transient);
transient = self->pv->transient;
g_return_if_fail (... | false | false | false | false | false | 0 |
drbd_rs_cancel_all(struct drbd_device *device)
{
spin_lock_irq(&device->al_lock);
if (get_ldev_if_state(device, D_FAILED)) { /* Makes sure ->resync is there. */
lc_reset(device->resync);
put_ldev(device);
}
device->resync_locked = 0;
device->resync_wenr = LC_FREE;
spin_unlock_irq(&device->al_lock);
wake_up(... | false | false | false | false | false | 0 |
ompi_osc_rdma_process_flush (ompi_osc_rdma_module_t *module, int source,
ompi_osc_rdma_header_flush_t *flush_header)
{
ompi_osc_rdma_header_flush_ack_t flush_ack;
OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,
"ompi_osc_rdma_process_... | false | false | false | false | false | 0 |
snd_rme96_apply_dac_volume(struct rme96 *rme96)
{
if (RME96_DAC_IS_1852(rme96)) {
snd_rme96_write_SPI(rme96, (rme96->vol[0] << 2) | 0x0);
snd_rme96_write_SPI(rme96, (rme96->vol[1] << 2) | 0x2);
} else if (RME96_DAC_IS_1855(rme96)) {
snd_rme96_write_SPI(rme96, (rme96->vol[0] & 0x3FF) | 0x000);
snd_rme96_write_... | false | false | false | false | false | 0 |
thread_signals(apr_thread_t *thread, void *data)
{
apr_status_t rc;
error_log(LOG_DEBUG, thread, "Signal thread: Starting.");
rc = apr_signal_thread(handle_signals);
if (rc != APR_SUCCESS) {
error_log(LOG_DEBUG, thread, "Signal thread: Error %d", rc);
logc_shutdown(1);
}
return... | false | false | false | false | false | 0 |
OpFgets()
{
fah_fgets_it in ;
fah_fgets_ot out ;
char *buff ;
u_short fid ;
/* obtain fid, length of string */
if (!readn(newsock, (char *)&in, sizeof(in)))
return ;
fid = ntohs(in.fid) ;
/* check if valid fid */
if (!(fid < TABLE_SIZE && table[fid].fp != NULL))
{
out.statu... | false | false | false | false | false | 0 |
hdb_remove_aliases(krb5_context context, HDB *db, krb5_data *key)
{
const HDB_Ext_Aliases *aliases;
krb5_error_code code;
hdb_entry oldentry;
krb5_data value;
size_t i;
code = db->hdb__get(context, db, *key, &value);
if (code == HDB_ERR_NOENTRY)
return 0;
else if (code)
return code;
... | false | false | false | false | true | 1 |
isOSSDevice(const QByteArray& lastElement, const char* lastElementAscii)
{
m_driver = Solid::AudioInterface::UnknownAudioDriver;
m_type = Solid::AudioInterface::UnknownAudioInterfaceType;
m_cardnum = 0;
m_deviceFile = m_device->property("DEVNAME").toString();
if (lastElement.startsWith("dsp")) {
... | false | false | false | false | false | 0 |
icd()
{
if(icd_detected())
{
printf("ICD version \"%s\" was found.\n",icd_version());
printf("Target controller is %s.\n", icd_target());
printf("Vdd: %.1f\t",icd_vdd());
printf("Vpp: %.1f\n",icd_vpp());
if(icd_has_debug_module())
puts("Debug module is present");
else
puts(... | false | false | false | false | false | 0 |
opal_dss_unpack(opal_buffer_t *buffer, void *dst, int32_t *num_vals,
opal_data_type_t type)
{
int rc, ret;
int32_t local_num, n=1;
opal_data_type_t local_type;
/* check for error */
if (NULL == buffer || NULL == dst || NULL == num_vals) {
return OPAL_ERR_BAD_PARAM;
}... | false | false | false | false | false | 0 |
p_check_image_numpart (GapStoryElem *stb_elem, char *filename)
{
char *l_basnam;
long l_number;
l_basnam = gap_lib_alloc_basename(filename, &l_number);
if(l_basnam)
{
if(l_number > 0)
{
/* the image has a numberpart and probably one of series of frames */
stb_elem->from_frame = l_number;... | false | false | false | false | false | 0 |
_TIFFSetGetType(TIFFDataType type, short count, unsigned char passcount)
{
if (type == TIFF_ASCII && count == TIFF_VARIABLE && passcount == 0)
return TIFF_SETGET_ASCII;
else if (count == 1 && passcount == 0) {
switch (type)
{
case TIFF_BYTE:
case TIFF_UNDEFINED:
return TIFF_SETGET_U... | false | false | false | false | false | 0 |
rsa_get_internal(hx509_context context,
hx509_private_key key,
const char *type)
{
if (strcasecmp(type, "rsa-modulus") == 0) {
return BN_dup(key->private_key.rsa->n);
} else if (strcasecmp(type, "rsa-exponent") == 0) {
return BN_dup(key->private_key.rsa->e);
} else
return NULL;
} | false | false | false | false | false | 0 |
threadpool_clear_queue (ThreadPool *tp, MonoDomain *domain)
{
MonoObject *obj;
MonoMList *other = NULL;
MonoCQ *queue = tp->queue;
if (!queue)
return;
while (mono_cq_dequeue (queue, &obj)) {
if (obj == NULL)
continue;
if (obj->vtable->domain != domain)
other = mono_mlist_prepend (other, obj);
threa... | false | false | false | false | false | 0 |
foo_scroll_area_invalidate_region (FooScrollArea *area,
cairo_region_t *region)
{
GtkWidget *widget;
g_return_if_fail (FOO_IS_SCROLL_AREA (area));
widget = GTK_WIDGET (area);
cairo_region_union (area->priv->update_region, region);
if (gtk_widget_get_realized (widget))
... | false | false | false | false | false | 0 |
scan_unsigned(const char **bufp, unsigned *out, int width, int base)
{
unsigned result = 0;
int scanned_so_far = 0;
const int hex = base==16;
tor_assert(base == 10 || base == 16);
if (!bufp || !*bufp || !out)
return -1;
if (width<0)
width=MAX_SCANF_WIDTH;
while (**bufp && (hex?TOR_ISXDIGIT(**bufp... | false | false | false | false | false | 0 |
calculate_sub_circles(float radius_multiplier)
{
/*
* The new way of doing it, is as follows:
* [Outer loop: for all contours]
* - Estimate a subcircle-radius: Average of line-segment-lengths * 3.5 (maybe this should be a parameter ?)
* [Loop: for all points]
* - Create a subcircle for the next two p... | false | false | false | false | false | 0 |
view_terminal_dispose (GObject *object)
{
GiggleViewTerminalPriv *priv = GET_PRIV (object);
if (priv->notebook) {
g_signal_handlers_disconnect_by_func (priv->notebook,
view_terminal_tab_remove_cb,
object);
priv->notebook = NULL;
}
G_OBJECT_CLASS (giggle_view_terminal_parent_class)->dis... | false | false | false | false | false | 0 |
imc_get_coeffs (IMCContext* q) {
int i, j, cw_len, cw;
for(i = 0; i < BANDS; i++) {
if(!q->sumLenArr[i]) continue;
if (q->bandFlagsBuf[i] || q->bandWidthT[i]) {
for(j = band_tab[i]; j < band_tab[i+1]; j++) {
cw_len = q->CWlengthT[j];
cw = 0;
... | false | false | false | false | false | 0 |
st_theme_node_get_background_paint_box (StThemeNode *node,
const ClutterActorBox *actor_box,
ClutterActorBox *paint_box)
{
StShadow *background_image_shadow;
ClutterActorBox shadow_box;
g_return_if_fail (ST_IS_THEME_N... | false | false | false | false | false | 0 |
Multimap()
{
cxxtools::xmlrpc::Service service;
service.registerMethod("multiplymultimap", *this, &XmlRpcCallbackTest::multiplyMultimap);
_server->addService("/test", service);
cxxtools::xmlrpc::HttpClient client(_loop, "", _port, "/test");
cxxtools:... | false | false | false | false | false | 0 |
maRestartServer(cchar *ip, int port)
{
MaAppweb *appweb;
MaServer *server;
HttpEndpoint *endpoint;
appweb = MPR->appwebService;
server = mprGetFirstItem(appweb->servers);
lock(appweb->servers);
endpoint = mprGetFirstItem(server->endpoints);
httpStopEndpoint(endpoint);
... | false | false | false | false | false | 0 |
render()
{
const WidgetLookFeel& wlf = getLookNFeel();
InventoryItem* item = dynamic_cast<InventoryItem*>(d_window);
if (!item)
// render basic imagery
wlf.getStateImagery(d_window->isDisabled() ? "Disabled" : "Enabled").render(*d_window);
if (item->isBeingDragged())
wlf.getSt... | false | false | false | true | false | 1 |
ipath_user_sdma_queue_destroy(struct ipath_user_sdma_queue *pq)
{
if (!pq)
return;
kmem_cache_destroy(pq->pkt_slab);
dma_pool_destroy(pq->header_cache);
kfree(pq);
} | false | false | false | false | false | 0 |
addAppletActions(KMenu &desktopMenu, Applet *applet, QEvent *event)
{
foreach (QAction *action, applet->contextualActions()) {
if (action) {
desktopMenu.addAction(action);
}
}
if (!applet->d->failed) {
QAction *configureApplet = applet->d->actions->action("configure");
... | false | false | false | false | false | 0 |
remove_conflicts()
{
register int i;
register int symbol;
register action *p, *pref;
SRtotal = 0;
RRtotal = 0;
SRconflicts = NEW2(nstates, short);
RRconflicts = NEW2(nstates, short);
for (i = 0; i < nstates; i++)
{
SRcount = 0;
RRcount = 0;
symbol = -1;
for (p = parser[i]; p; p ... | false | false | false | false | true | 1 |
gedit_tab_dispose (GObject *object)
{
GeditTab *tab = GEDIT_TAB (object);
if (tab->priv->print_job != NULL)
{
g_signal_handlers_disconnect_by_func (tab->priv->print_job,
done_printing_cb, tab);
g_object_unref (tab->priv->print_job);
tab->priv->print_job = NULL;
tab->p... | false | false | false | false | false | 0 |
NSSUTIL_ArgSkipParameter(char *string)
{
char *end;
/* look for the end of the <name>= */
for (;*string; string++) {
if (*string == '=') { string++; break; }
if (NSSUTIL_ArgIsBlank(*string)) return(string);
}
end = NSSUTIL_ArgFindEnd(string);
if (*end) end++;
return end;
} | false | false | false | false | false | 0 |
ArgusBackList(struct ArgusListStruct *list)
{
void *retn = NULL;
if (list->start)
retn = list->start->prv->obj;
#ifdef ARGUSDEBUG
ArgusDebug (6, "ArgusBackList (0x%x) returning 0x%x\n", list, retn);
#endif
return (retn);
} | false | false | false | false | false | 0 |
test_status_ignore__negative_ignores_in_slash_star(void)
{
git_status_options status_opts = GIT_STATUS_OPTIONS_INIT;
git_status_list *list;
int found_look_ma = 0, found_what_about = 0;
size_t i;
static const char *test_files[] = {
"empty_standard_repo/bin/look-ma.txt",
"empty_standard_repo/bin/what-about-me.tx... | false | false | false | false | false | 0 |
GDALRegister_ADRG()
{
GDALDriver *poDriver;
if( GDALGetDriverByName( "ADRG" ) == NULL )
{
poDriver = new GDALDriver();
poDriver->SetDescription( "ADRG" );
poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
"ARC Digitized Raster Graphics" );
... | false | false | false | false | false | 0 |
operator==(const TimeZoneRule& that) const {
if (this == &that) {
return TRUE;
}
if (typeid(*this) != typeid(that)) {
return FALSE;
}
AnnualTimeZoneRule *atzr = (AnnualTimeZoneRule*)&that;
return (*fDateTimeRule == *(atzr->fDateTimeRule) &&
fStartYear == atzr->fStartY... | false | false | false | false | false | 0 |
hdpvr_set_audio(struct hdpvr_device *dev, u8 input,
enum v4l2_mpeg_audio_encoding codec)
{
int ret = 0;
if (dev->flags & HDPVR_FLAG_AC3_CAP) {
mutex_lock(&dev->usbc_mutex);
memset(dev->usbc_buf, 0, 2);
dev->usbc_buf[0] = input;
if (codec == V4L2_MPEG_AUDIO_ENCODING_AAC)
dev->usbc_buf[1] = 0;
else ... | false | false | false | false | false | 0 |
delfeed (lofig)
/*===========================================================================*/
lofig_list *lofig;
{
loins_list *loins, *temploins;
for (loins = lofig->LOINS; loins != NULL; loins = temploins) {
temploins = loins->NEXT;
if (incatalogfeed(loins->FIGNAME))
if (delloins (lofig, loins->... | false | false | false | false | false | 0 |
vm_object_dump(vm_instance_t *vm)
{
vm_obj_t *obj;
printf("VM \"%s\" (%u) object list:\n",vm->name,vm->instance_id);
for(obj=vm->vm_object_list;obj;obj=obj->next) {
printf(" - %-15s [data=%p]\n",obj->name,obj->data);
}
printf("\n");
} | false | false | false | false | false | 0 |
datetime_astimezone(PyDateTime_DateTime *self, PyObject *args, PyObject *kw)
{
PyObject *result;
PyObject *offset;
PyObject *temp;
PyObject *tzinfo;
_Py_IDENTIFIER(fromutc);
static char *keywords[] = {"tz", NULL};
if (! PyArg_ParseTupleAndKeywords(args, kw, "O!:astimezone", keywords,
... | false | false | false | false | false | 0 |
mpc860_scc_update_irq(struct mpc860_data *d,u_int scc_chan)
{
struct mpc860_scc_chan *chan = &d->scc_chan[scc_chan];
if (chan->scce & chan->sccm)
d->cipr |= scc_chan_info[scc_chan].cipr_irq;
else
d->cipr &= ~scc_chan_info[scc_chan].cipr_irq;
mpc860_update_cpm_int_status(d);
return(0);
} | false | false | false | false | false | 0 |
open_ins_file(fc_type fc, rbool report_error)
{
ins_buff=NULL;
ins_line=0;
if (ins_descr!=NULL) return 1;
if (filevalid(insfile,fINS)) {
textrewind(insfile);
return 1;
}
if (agx_file) {
ins_descr=read_descr(ins_ptr.start,ins_ptr.size);
if (ins_descr!=NULL) return 1;
/* Note that if t... | false | false | false | false | false | 0 |
gru_check_context_placement(struct gru_thread_state *gts)
{
struct gru_state *gru;
/*
* If the current task is the context owner, verify that the
* context is correctly placed. This test is skipped for non-owner
* references. Pthread apps use non-owner references to the CBRs.
*/
gru = gts->ts_gru;
if (!gru... | false | false | false | false | false | 0 |
LI49()
{ VMB49 VMS49 VMV49
goto TTL;
TTL:;
base[0]= ((object)VV[67]);
base[1]= (((object)VV[8])->s.s_dbind);
vs_top=(vs_base=base+0)+2;
Ladjoin();
vs_top=sup;
(((object)VV[8])->s.s_dbind)= vs_base[0];
{object V78 = Cnil;
VMR49(V78)}
base[0]=base[0];
return Cnil;
} | false | false | false | false | false | 0 |
lookupDefaultUidGid(uid_t &uid, gid_t &gid) {
struct passwd *userEntry;
userEntry = getpwnam(defaultUser.c_str());
if (userEntry == NULL) {
throw NonExistentUserException("Default user '" + defaultUser +
"' does not exist.");
}
uid = userEntry->pw_uid;
gid = lookupGid(defaultGroup);
if (gid == (gid_t) -1... | false | false | false | false | false | 0 |
avatar_chooser_update_preview_cb (GtkFileChooser *file_chooser,
TpawAvatarChooser *self)
{
gchar *filename;
filename = gtk_file_chooser_get_preview_filename (file_chooser);
if (filename != NULL)
{
GtkWidget *image;
GdkPixbuf *pixbuf = NULL;
GdkPixbuf *scaled_pixbuf;
pixbuf = gdk... | false | false | false | false | false | 0 |
AddWeapon(short id, char name[], short wpndmg, short wpndmg_z1,
short wpndmg_z2, short freq, short speed, short slot, short price,
short range, short accuracy, short ammo1, short ammo2, int reloadtime,
short special, short team)
{
if (name != NULL)
{
weapons[id].name = malloc(strlen(name) + 1);
if (weapons[... | false | true | false | false | false | 1 |
alloc_inode(struct fs_info *fs, uint32_t ino, size_t data)
{
struct inode *inode = zalloc(sizeof(struct inode) + data);
if (inode) {
inode->fs = fs;
inode->ino = ino;
inode->refcnt = 1;
}
return inode;
} | false | false | false | false | false | 0 |
accumulator_output(struct fortuna_state *st, unsigned char *dst, size_t len)
{
/* Reseed the generator with data from pools if we have accumulated enough
* data and enough time has passed since the last accumulator reseed. */
if (st->pool0_bytes >= MIN_POOL_LEN && enough_time_passed(st))
accumulato... | 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.