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 |
|---|---|---|---|---|---|---|
paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const
{
QStyleOptionViewItemV4 opt(option);
initStyleOption(&opt,index);
//Get the current cell color
QColor backgroundColor = index.data(Qt::BackgroundRole).value<QColor>();
if (backgr... | false | false | false | false | false | 0 |
getSkeleton() {
UnicodeString result;
for(int32_t i=0; i< UDATPG_FIELD_COUNT; ++i) {
if (original[i].length()!=0) {
result += original[i];
}
}
return result;
} | false | false | false | false | false | 0 |
map_name( const char *arg, char **result, int reserve, const char *in, const char *out )
{
char *p;
int i, l, ll, num, inl, outl;
l = strlen( arg );
if (!in) {
copy:
*result = nfmalloc( reserve + l + 1 );
memcpy( *result + reserve, arg, l + 1 );
return 0;
}
inl = strlen( in );
if (out) {
outl = strle... | false | true | false | false | false | 1 |
ath5k_hw_txpower(struct ath5k_hw *ah, struct net80211_channel *channel,
u8 ee_mode, u8 txpower)
{
struct ath5k_rate_pcal_info rate_info;
u8 type;
int ret;
if (txpower > AR5K_TUNE_MAX_TXPOWER) {
DBG("ath5k: invalid tx power %d\n", txpower);
return -EINVAL;
}
if (txpower == 0)
txpower = AR5K_TUNE_DEFAULT_T... | false | false | false | false | false | 0 |
nullify_returns_r (tree* tp, int* walk_subtrees, void* data)
{
tree nrv = (tree) data;
/* No need to walk into types. There wouldn't be any need to walk into
non-statements, except that we have to consider STMT_EXPRs. */
if (TYPE_P (*tp))
*walk_subtrees = 0;
else if (TREE_CODE (*tp) == RETURN_STMT)
... | false | false | false | false | false | 0 |
iwl_dbgfs_send_echo_cmd_write(struct iwl_mvm *mvm, char *buf,
size_t count, loff_t *ppos)
{
int ret;
mutex_lock(&mvm->mutex);
ret = iwl_mvm_send_cmd_pdu(mvm, ECHO_CMD, 0, 0, NULL);
mutex_unlock(&mvm->mutex);
return ret ?: count;
} | false | false | false | false | false | 0 |
IsAvailable(SocketId socket) const
{
scoped_lock lock(m_mutex);
SocketQueueMap::const_iterator qi = m_socketQueues.find(socket);
if( qi == m_socketQueues.end() )
return false;
return qi->second->m_queue.size() > 0;
} | false | false | false | false | false | 0 |
elm_glview_resize_policy_set(Evas_Object *obj,
Elm_GLView_Resize_Policy policy)
{
ELM_GLVIEW_CHECK(obj) EINA_FALSE;
ELM_GLVIEW_DATA_GET(obj, sd);
if (policy == sd->scale_policy) return EINA_TRUE;
switch (policy)
{
case ELM_GLVIEW_RESIZE_POLICY_RECREATE:
case EL... | false | false | false | false | false | 0 |
ffgbyt(fitsfile *fptr, /* I - FITS file pointer */
LONGLONG nbytes, /* I - number of bytes to read */
void *buffer, /* O - buffer to read into */
int *status) /* IO - error status */
/*
get (read) the requested number of ... | false | false | false | false | false | 0 |
view_new (PopplerDocument *doc)
{
View *view;
GtkWidget *window;
GtkWidget *sw;
GtkWidget *vbox, *hbox;
guint n_pages;
view = g_slice_new0 (View);
view->doc = doc;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "destroy",
G_CALLBACK (destroy_window_call... | false | false | false | false | false | 0 |
tpacpi_disable_brightness_delay(void)
{
if (acpi_evalf(hkey_handle, NULL, "PWMS", "qvd", 0))
pr_notice("ACPI backlight control delay disabled\n");
} | false | false | false | false | false | 0 |
dis_mat(char *s,double m[3][3]) {
gprint("\n Matrix {%s} \n",s);
for (int i = 0; i < 3; i++) {
gprint(" %f %f %f \n",m[0][i],m[1][i],m[2][i]);
}
} | false | false | false | false | false | 0 |
do_release_shlib (void *nodep, VISIT value, int level)
{
struct __gconv_loaded_object *obj = *(struct __gconv_loaded_object **) nodep;
if (value != preorder && value != leaf)
return;
if (obj == release_handle)
{
/* This is the object we want to unload. Now decrement the
reference counter. */
... | false | false | false | false | false | 0 |
gdip_is_scaled (GpGraphics *graphics)
{
cairo_matrix_t matrix;
cairo_get_matrix (graphics->ct, &matrix);
return ((matrix.xx != 1.0f) || (matrix.yy != 1.0f));
} | false | false | false | false | false | 0 |
fetch_worker_and_sub_worker(status_endpoint_t *p,
const char *operation,
const char **worker,
const char **sub_worker,
jk_logger_t *l)
{
status_worker_t *w = p-... | false | false | false | false | false | 0 |
set(const std::string& name, const std::string& val)
{
data_iterator iter = data.find(name);
if ((iter != data.end()) && (iter->second.t == Appcfg_string))
{
iter->second.sval = val;
return true;
}
return false;
} | false | false | false | false | false | 0 |
acpi_ns_check_reference(struct acpi_evaluate_info *info,
union acpi_operand_object *return_object)
{
/*
* Check the reference object for the correct reference type (opcode).
* The only type of reference that can be converted to an union acpi_object is
* a reference to a named object (reference class: NAME)
... | false | false | false | true | false | 1 |
player_outfit(struct player *p)
{
const struct start_item *si;
object_type object_type_body;
/* Give the player starting equipment */
for (si = p_ptr->class->start_items; si; si = si->next)
{
/* Get local object */
struct object *i_ptr = &object_type_body;
/* Prepare the item */
object_prep(i_ptr, si->ki... | false | false | false | false | false | 0 |
pci_slot_resetable(struct pci_slot *slot)
{
struct pci_dev *dev;
list_for_each_entry(dev, &slot->bus->devices, bus_list) {
if (!dev->slot || dev->slot != slot)
continue;
if (dev->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET ||
(dev->subordinate && !pci_bus_resetable(dev->subordinate)))
return false;
}
r... | false | false | false | false | false | 0 |
checkBoards(QDomElement & board, QHash<QString, QString> & fzzFilePaths)
{
while (!board.isNull()) {
QString boardname = board.attribute("name");
//DebugDialog::debug(QString("board %1").arg(boardname));
bool ok;
int optional = board.attribute("maxOptionalCount", "").toInt(&ok);
if (!ok) {
writePanelizerO... | false | false | false | false | false | 0 |
e_dbus_callback_new(E_DBus_Callback_Func cb_func, E_DBus_Unmarshal_Func unmarshal_func, E_DBus_Free_Func free_func, void *user_data)
{
E_DBus_Callback *cb;
if (!cb_func) return NULL;
cb = calloc(1, sizeof(E_DBus_Callback));
if (!cb) return NULL;
cb->cb_func = cb_func;
cb->unmarshal_func = unmarshal_func;
... | false | false | false | false | false | 0 |
setHotstartSolution(const double * solution, const int * priorities)
{
if (solution == NULL) {
delete [] hotstartSolution_;
hotstartSolution_ = NULL;
delete [] hotstartPriorities_;
hotstartPriorities_ = NULL;
} else {
int numberColumns = solver_->getNumCols();
hot... | false | false | false | false | false | 0 |
efx_sriov_set_vf_spoofchk(struct net_device *net_dev, int vf_i,
bool spoofchk)
{
struct efx_nic *efx = netdev_priv(net_dev);
if (efx->type->sriov_set_vf_spoofchk)
return efx->type->sriov_set_vf_spoofchk(efx, vf_i, spoofchk);
else
return -EOPNOTSUPP;
} | false | false | false | false | false | 0 |
opal_malloc_init(void)
{
#if OPAL_ENABLE_DEBUG
OBJ_CONSTRUCT(&malloc_stream, opal_output_stream_t);
malloc_stream.lds_is_debugging = true;
malloc_stream.lds_verbose_level = 5;
malloc_stream.lds_prefix = "malloc debug: ";
malloc_stream.lds_want_stderr = true;
opal_malloc_output = opal_output_open... | false | false | false | false | false | 0 |
account_list_set(void)
{
/* want to make sure we iterate *IN ORDER*, so therefore using
* gtk_tree_model_XXXX_nth_child() */
gint row, n_rows;
PrefsAccount *ac_prefs;
GtkTreeModel *model = gtk_tree_view_get_model
(GTK_TREE_VIEW(edit_account.list_view));
while (account_list)
account_list = g_list_remove(a... | false | false | false | false | false | 0 |
fop_create_cbk_stub (call_frame_t *frame,
fop_create_cbk_t fn,
int32_t op_ret,
int32_t op_errno,
fd_t *fd,
inode_t *inode,
struct iatt *buf,
struct iatt *preparent,
... | false | false | false | false | false | 0 |
wrong_priority(dns_rdataset_t *rds, int pass, dns_rdatatype_t preferred_glue) {
int pass_needed;
/*
* If we are not rendering class IN, this ordering is bogus.
*/
if (rds->rdclass != dns_rdataclass_in)
return (ISC_FALSE);
switch (rds->type) {
case dns_rdatatype_a:
case dns_rdatatype_aaaa:
if (preferred_... | false | false | false | false | false | 0 |
php_check_dots(const char *element, int n) /* {{{ */
{
for(n--; n >= 0; --n) {
if (element[n] != '.') {
return 1;
}
}
return 0;
} | false | false | false | false | false | 0 |
main(int argc, char **argv) {
int firstarg;
config.hostip = sdsnew("127.0.0.1");
config.hostport = 6379;
config.hostsocket = NULL;
config.repeat = 1;
config.interval = 0;
config.dbnum = 0;
config.interactive = 0;
config.shutdown = 0;
config.monitor_mode = 0;
config.pubsub_mo... | false | false | false | false | true | 1 |
delete_noop_moves (f)
rtx f ATTRIBUTE_UNUSED;
{
rtx insn, next;
basic_block bb;
int nnoops = 0;
FOR_EACH_BB (bb)
{
for (insn = bb->head; insn != NEXT_INSN (bb->end); insn = next)
{
next = NEXT_INSN (insn);
if (INSN_P (insn) && noop_move_p (insn))
{
rtx note;
/* If we'r... | false | false | false | false | false | 0 |
ast_dtmf_detect_init (dtmf_detect_state_t *s, unsigned int sample_rate)
{
int i;
s->lasthit = 0;
s->current_hit = 0;
for (i = 0; i < 4; i++) {
goertzel_init(&s->row_out[i], dtmf_row[i], DTMF_GSIZE, sample_rate);
goertzel_init(&s->col_out[i], dtmf_col[i], DTMF_GSIZE, sample_rate);
s->energy = 0.0;
}
s->cu... | false | false | false | false | false | 0 |
opj_stream_flush (opj_stream_private_t * p_stream, opj_event_mgr_t * p_event_mgr)
{
// the number of bytes written on the media.
// must be signed becuse "-1" is used to indicate an error in return values.
OPJ_INT32 l_current_write_nb_bytes = 0;
p_stream->m_current_data = p_stream->m_stored_data;
while
(... | false | false | false | false | false | 0 |
pcpu_page_first_chunk(size_t reserved_size,
pcpu_fc_alloc_fn_t alloc_fn,
pcpu_fc_free_fn_t free_fn,
pcpu_fc_populate_pte_fn_t populate_pte_fn)
{
static struct vm_struct vm;
struct pcpu_alloc_info *ai;
char psize_str[16];
int unit_pages;
size_t pages_size;
struct page **pages;
int unit, i, j, rc;
... | false | false | false | false | false | 0 |
set_recv_corrupt(bool arg, int frequency, int not_until_arg)
{
if (arg)
{
__function.frequency= frequency;
not_until= not_until_arg;
__function._corrupt= arg;
}
else
{
__function.frequency= 0;
not_until= 0;
__function._corrupt= false;
}
} | false | false | false | false | false | 0 |
bdi_alloc_node(gfp_t gfp_mask, int node_id)
{
struct backing_dev_info *bdi;
bdi = kmalloc_node(sizeof(struct backing_dev_info),
gfp_mask | __GFP_ZERO, node_id);
if (!bdi)
return NULL;
if (bdi_init(bdi)) {
kfree(bdi);
return NULL;
}
return bdi;
} | false | false | false | false | false | 0 |
xmms_config_property_callback_set (xmms_config_property_t *prop,
xmms_object_handler_t cb,
gpointer userdata)
{
g_return_if_fail (prop);
if (!cb)
return;
xmms_object_connect (XMMS_OBJECT (prop),
XMMS_IPC_SIGNAL_CONFIGVALU... | false | false | false | false | false | 0 |
backtr(th,mi,nd)
double th;
INT *mi, nd;
{ if (nd>0) return(th);
return(invlink(th,mi[MLINK]));
} | false | false | false | false | false | 0 |
imProcessCalcAutoGamma(const imImage* image)
{
float mean, min, max;
imStats stats[4];
imCalcImageStatistics(image, stats);
mean = stats[0].mean;
min = stats[0].min;
max = stats[0].max;
for (int i = 1; i < image->depth; i++)
{
if (stats[i].min < min)
min = stats[i].min;
if (stats[i].max > ... | false | false | false | false | false | 0 |
cli_cmd_volume_delete_cbk (struct cli_state *state, struct cli_cmd_word *word,
const char **words, int wordcount)
{
int ret = -1;
rpc_clnt_procedure_t *proc = NULL;
call_frame_t *frame = NULL;
char *volname =... | false | false | false | false | false | 0 |
addcheater(uaecptr addr, int size)
{
if (totaltrainers >= MAX_CHEAT_VIEW)
return 0;
trainerdata[totaltrainers].addr = addr;
trainerdata[totaltrainers].size = size;
totaltrainers++;
return 1;
} | false | false | false | false | false | 0 |
e_ews_connection_delete_folder (EEwsConnection *cnc,
gint pri,
const gchar *folder_id,
gboolean is_distinguished_id,
const gchar *delete_type,
GCancellable *can... | false | false | false | false | false | 0 |
unpack_exchange(double *buf)
{
int k;
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
int m = 1;
x[nlocal][0] = buf[m++];
x[nlocal][1] = buf[m++];
x[nlocal][2] = buf[m++];
v[nlocal][0] = buf[m++];
v[nlocal][1] = buf[m++];
v[nlocal][2] = buf[m++];
tag[nlocal] = static_cast<int> (buf[m++])... | false | false | false | false | false | 0 |
get(ArrayRef<Constant*> V) {
if (Constant *C = getImpl(V))
return C;
VectorType *Ty = VectorType::get(V.front()->getType(), V.size());
return Ty->getContext().pImpl->VectorConstants.getOrCreate(Ty, V);
} | false | false | false | false | false | 0 |
DumpData_16(FILE *trace, char *name, u16 *data, u16 dataLength, u32 indent, Bool XMTDump)
{
u32 i;
if (!name && !data) return;
if (name) StartAttribute(trace, name, indent, XMTDump);
if (!XMTDump) fprintf(trace, "\"");
for (i=0; i<dataLength; i++) {
if (XMTDump) {
fprintf(trace, "\'%d\'", data[i]);
if (i+1... | false | false | false | false | false | 0 |
get()
{
unsigned int v = getReplaced()->get();
if(m_pfnIsBreak(v, break_mask, break_value))
invokeAction();
return v;
} | false | false | false | false | false | 0 |
write_wstring (ACE_CDR::ULong len,
const ACE_CDR::WChar *x)
{
// Note: translator framework is not supported.
//
if (ACE_OutputCDR::wchar_maxbytes () == 0)
{
errno = EACCES;
return (this->good_bit_ = false);
}
if (static_cast<ACE_CDR::Short> (this->major_versio... | false | false | false | false | false | 0 |
getComponentColour(colour c, int component) {
if( component == 0 ) {
return makeColour( c.r, 0, 0 );
}
else if( component == 1 ) {
return makeColour( 0, c.g, 0 );
}
else if( component == 2 ) {
return makeColour( 0, 0, c.b );
}
return COLOUR_BLACK;
} | false | false | false | false | false | 0 |
output_data_internal(MLPDecodeContext *m, unsigned int substr,
uint8_t *data, unsigned int *data_size, int is32)
{
SubStream *s = &m->substream[substr];
unsigned int i, ch = 0;
int32_t *data_32 = (int32_t*) data;
int16_t *data_16 = (int16_t*) data;
if (*data_size < (... | false | false | false | false | false | 0 |
castlingRightsString(FenNotation notation) const
{
QString str;
for (int side = Side::White; side <= Side::Black; side++)
{
for (int cside = KingSide; cside >= QueenSide; cside--)
{
int rs = m_castlingRights.rookSquare[side][cside];
if (rs == 0)
continue;
int offset = (cside == QueenSide) ? -1: 1;... | false | false | false | false | false | 0 |
insert_pool_local( CoreSurfacePool *pool )
{
int i, n;
for (i=0; i<pool_count-1; i++) {
D_ASSERT( pool_order[i] >= 0 );
D_ASSERT( pool_order[i] < pool_count-1 );
D_MAGIC_ASSERT( pool_array[pool_order[i]], CoreSurfacePool );
if (pool_array[pool_order[i]]->desc.priorit... | false | false | false | false | false | 0 |
put_free_entry(grant_ref_t ref)
{
unsigned long flags;
spin_lock_irqsave(&gnttab_list_lock, flags);
gnttab_entry(ref) = gnttab_free_head;
gnttab_free_head = ref;
gnttab_free_count++;
check_free_callbacks();
spin_unlock_irqrestore(&gnttab_list_lock, flags);
} | false | false | false | false | false | 0 |
bkread(int fi, unsigned char *buff, int size)
{
int a, b;
if (!size) {
error = 0;
return 0;
}
for (a = b = 0; (a < size) && ((b = joe_read(fi, buff + a, size - a)) > 0); a += b) ;
if (b < 0)
error = -2;
else
error = 0;
return a;
} | true | true | false | false | true | 1 |
svnic_dev_open_done(struct vnic_dev *vdev, int *done)
{
u64 a0 = 0, a1 = 0;
int wait = VNIC_DVCMD_TMO;
int err;
*done = 0;
err = svnic_dev_cmd(vdev, CMD_OPEN_STATUS, &a0, &a1, wait);
if (err)
return err;
*done = (a0 == 0);
return 0;
} | false | false | false | false | false | 0 |
gst_camera_bin_video_reset_elements (gpointer u_data)
{
GstCameraBin2 *camerabin = GST_CAMERA_BIN2_CAST (u_data);
GST_DEBUG_OBJECT (camerabin, "Resetting video elements state");
g_mutex_lock (camerabin->video_capture_mutex);
/* reset element states to clear eos/flushing pads */
gst_element_set_state (camera... | false | false | false | false | false | 0 |
__memp_skip_curadj(dbc, pgno)
DBC * dbc;
db_pgno_t pgno;
{
BH *bhp;
DB_MPOOL *dbmp;
DB_MPOOLFILE *dbmfp;
DB_MPOOL_HASH *hp;
DB_TXN *txn;
ENV *env;
MPOOLFILE *mfp;
REGINFO *infop;
roff_t mf_offset;
int ret, skip;
u_int32_t bucket;
env = dbc->env;
dbmp = env->mp_handle;
dbmfp = dbc->dbp->mpf;
mfp = dbmf... | false | false | false | false | false | 0 |
DoACommand()
{
static wxString command;
wxString inputLine( GetACommand() );
//
bool continuing = false;
int len = inputLine.size();
if( inputLine[len-1] == ExGlobals::GetContinuationCharacter() )
{
if( --len == 0 )
{
ExGlobals::WarningMessage( wxT("continuation line is empty") );
comm... | false | false | false | false | false | 0 |
il3945_send_tx_power(struct il_priv *il)
{
int rate_idx, i;
const struct il_channel_info *ch_info = NULL;
struct il3945_txpowertable_cmd txpower = {
.channel = il->active.channel,
};
u16 chan;
if (WARN_ONCE
(test_bit(S_SCAN_HW, &il->status),
"TX Power requested while scanning!\n"))
return -EAGAIN;... | false | false | false | false | false | 0 |
finishConstruction(Parameter* parameters, RaisesSpec* raises,
ContextSpec* contexts)
{
parameters_ = parameters;
raises_ = raises;
contexts_ = contexts;
if (oneway_) {
if (returnType_ && returnType_->kind() != IdlType::tk_void) {
IdlError(file(), line(), "Oneway operation '%s' does not ret... | false | false | false | false | false | 0 |
EndSelectAction(vtkAbstractWidget *w)
{
vtkBoxWidget2 *self = reinterpret_cast<vtkBoxWidget2*>(w);
if ( self->WidgetState == vtkBoxWidget2::Start )
{
return;
}
// Return state to not active
self->WidgetState = vtkBoxWidget2::Start;
reinterpret_cast<vtkBoxRepresentation*>(self->WidgetRep)->
... | false | false | false | false | false | 0 |
search_provider_dispose (GObject *obj)
{
NautilusShellSearchProvider *self = NAUTILUS_SHELL_SEARCH_PROVIDER (obj);
if (self->name_owner_id != 0) {
g_bus_unown_name (self->name_owner_id);
self->name_owner_id = 0;
}
if (self->skeleton != NULL) {
g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_S... | false | false | false | false | false | 0 |
receiveAgentLine(char *dest,int limit) {
list<NetConnection *>::iterator ni;
global.debug("Global","receiveAgentLine");
if (Agents.empty())
return 0;
for(ni=Agents.begin();ni!=Agents.end();ni++)
if ( (*ni)->isConnected())
if ((*ni)->readLine(dest,limit)==0)
return 1;
return 0;
} | false | false | false | false | false | 0 |
ao_tasks_selection_changed_cb(gpointer t)
{
AoTasksPrivate *priv = AO_TASKS_GET_PRIVATE(t);
GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tree));
GtkTreeIter iter;
GtkTreeModel *model;
if (gtk_tree_selection_get_selected(selection, &model, &iter))
{
gint line;
gchar *filename,... | false | false | false | false | false | 0 |
test(char *URL)
{
CURL *c = NULL;
int res = 0;
CURLM *m = NULL;
fd_set rd, wr, exc;
int running;
start_test_timing();
global_init(CURL_GLOBAL_ALL);
easy_init(c);
/* The point here is that there must not be anything running on the given
proxy port */
if (libtest_arg2)
easy_setopt(c, CURL... | false | false | false | false | false | 0 |
DecodeGPRnopcRegisterClass(MCInst &Inst, unsigned RegNo,
uint64_t Address, const void *Decoder) {
DecodeStatus S = MCDisassembler::Success;
if (RegNo == 15)
S = MCDisassembler::SoftFail;
Check(S, DecodeGPRRegisterClass(Inst, RegNo, Address, Decoder));
return S;
} | false | false | false | false | false | 0 |
File2Mime (const char *fname)
{
HtConfiguration* config= HtConfiguration::config();
// default to "can't identify"
char content_type [100] = "application/x-unknown\n";
String cmd = config->Find ("content_classifier");
if (cmd.get() && *cmd)
{
cmd << " \"" << fname << '\"'; // allow file name... | false | false | false | false | false | 0 |
icon_theme_changed (GtkIconTheme *theme,
CcShellModel *self)
{
GtkTreeIter iter;
GtkTreeModel *model;
gboolean cont;
model = GTK_TREE_MODEL (self);
cont = gtk_tree_model_get_iter_first (model, &iter);
while (cont)
{
GdkPixbuf *pixbuf;
GIcon *icon;
gtk_tree_model_g... | false | false | false | false | false | 0 |
setupEngines()
{
// TODO: We'd like a list of engines that can be iterated over in compile
// time to generate multi-engine code.
typedef Core::EngineConfig<Cscope::Crossref> Config;
// Prefix group with "Engine_" so that engines do not overrun application
// groups by accident.
settings_->beginGroup(QString("En... | false | false | false | false | false | 0 |
uda1380_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level)
{
int pm = uda1380_read_reg_cache(codec, UDA1380_PM);
int reg;
struct uda1380_platform_data *pdata = codec->dev->platform_data;
switch (level) {
case SND_SOC_BIAS_ON:
case SND_SOC_BIAS_PREPARE:
/* ADC, DAC on */
uda1380_write... | false | false | false | false | false | 0 |
process_reads(int fd, short args, void *cbdata)
{
orte_dfs_request_t *read_dfs = (orte_dfs_request_t*)cbdata;
orte_dfs_tracker_t *tptr, *trk;
opal_list_item_t *item;
opal_buffer_t *buffer;
int64_t i64;
int rc;
/* look in our local records for this fd */
trk = NULL;
for (item = opal_... | false | false | false | false | false | 0 |
b43_nphy_set_rssi_2055_vcm(struct b43_wldev *dev,
enum n_rssi_type rssi_type, u8 *buf)
{
int i;
for (i = 0; i < 2; i++) {
if (rssi_type == N_RSSI_NB) {
if (i == 0) {
b43_radio_maskset(dev, B2055_C1_B0NB_RSSIVCM,
0xFC, buf[0]);
b43_radio_maskset(dev, B2055_C1_RX_BB_RSSICTL5,
0xF... | false | false | false | false | false | 0 |
getDescription() const {
return std::string((IsArg ? "Argument #" : "Return value #"))
+ utostr(Idx) + " of function " + F->getNameStr();
} | false | false | false | false | false | 0 |
set_bash_input ()
{
/* Make sure the fd from which we are reading input is not in
no-delay mode. */
#if defined (BUFFERED_INPUT)
if (interactive == 0)
sh_unset_nodelay_mode (default_buffered_input);
else
#endif /* !BUFFERED_INPUT */
sh_unset_nodelay_mode (fileno (stdin));
/* with_input_from_stdin ... | false | false | false | false | false | 0 |
compare(const Basic &o) const
{
CSYMPY_ASSERT(is_a<Pow>(o))
const Pow &s = static_cast<const Pow &>(o);
int base_cmp = base_->__cmp__(*s.base_);
if (base_cmp == 0)
return exp_->__cmp__(*s.exp_);
else
return base_cmp;
} | false | false | false | false | false | 0 |
gog_child_button_popdown (GogChildButton *child_button)
{
if (child_button->menu != NULL)
gtk_menu_popdown (GTK_MENU (child_button->menu));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (child_button->toggle_button), FALSE);
} | false | false | false | false | false | 0 |
onQueryTip(FXObject* sender,FXSelector sel,void* ptr){
if(FXScrollArea::onQueryTip(sender,sel,ptr)) return 1;
/*
FIXME
if((flags&FLAG_TIP) && (0<=cursor)){
FXString string=items[cursor]->getText().section('\t',0);
sender->handle(this,FXSEL(SEL_COMMAND,ID_SETSTRINGVALUE),(void*)&string);
return 1;
}
... | false | false | false | false | false | 0 |
ReadGeometryFromMIFFile(MIDDATAFile *fp)
{
const char *pszLine;
/* Go to the first line of the next feature */
while (((pszLine = fp->GetLine()) != NULL) &&
fp->IsValidFeature(pszLine) == FALSE)
;
return 0;
} | false | false | false | false | false | 0 |
TestLoadingScalar(
unsigned int internalFormat,
unsigned int format,
unsigned int type,
int textureSize[3],
int componentSize)
{
// componentSize=vtkAbstractArray::GetDataTypeSize(scalarType)*input->GetNumberOfScalarComponents()
bool result;
vtkgl::TexImage3D(vtkgl::PROXY_TEXTURE_3D,0,
... | false | false | false | false | false | 0 |
srv_set_io_thread_op_info(
/*======================*/
ulint i, /*!< in: the 'segment' of the i/o thread */
const char* str) /*!< in: constant char string describing the
state */
{
ut_a(i < SRV_MAX_N_IO_THREADS);
srv_io_thread_op_info[i] = str;
} | false | false | false | false | false | 0 |
help_bitfield(char **bit_names)
{
static char buffer[1024];
char *pos, sepa = ':';
unsigned int bit;
strcpy(buffer, "bitfield");
pos = strchr(buffer, '\0');
for (bit = 0; bit < 32; ++bit) {
if (bit_names[bit] == NULL)
continue;
snprintf(pos, sizeof(buffer) - (pos - buffer),
"%c %s", sepa, bit_names... | false | false | false | false | false | 0 |
checkbutton_toggled_cb (GtkWidget *widget,
CcWacomMappingPanel *self)
{
gboolean active;
active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
set_combobox_sensitive (self, active);
if (!active)
gtk_switch_set_active (GTK_SWITCH(self->priv->aspectswitch), FALSE);
update_mapping (self)... | false | false | false | false | false | 0 |
rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e)
{
char key[REND_SERVICE_ID_LEN_BASE32+2]; /* <version><query>\0 */
tor_assert(rend_cache);
if (!rend_valid_service_id(query))
return -1;
*e = NULL;
if (version != 0) {
tor_snprintf(key, sizeof(key), "2%s", query);
*e =... | false | false | false | false | false | 0 |
getViewBoxCoord(const QString & svg, int coord)
{
QRegExp re("viewBox=['\\\"]([^'\\\"]+)['\\\"]");
int ix = re.indexIn(svg);
if (ix < 0) return 0;
QString vb = re.cap(1);
QStringList coords = vb.split(" ");
QString c = coords.at(coord);
return c.toDouble();
} | false | false | false | false | false | 0 |
rb_big2ulong_pack(x)
VALUE x;
{
unsigned long num = big2ulong(x, "unsigned long");
if (!RBIGNUM(x)->sign) {
return -num;
}
return num;
} | false | false | false | false | false | 0 |
free_dof(DOF *dof, MESH *mesh, int position, const int is_coarse_dof)
{
FUNCNAME("free_dof");
DOF_ADMIN *admin;
int i, j, n, n0, ndof;
MESH_MEM_INFO* mem_info;
DEBUG_TEST_EXIT(mesh, "mesh=nil\n");
mem_info = (MESH_MEM_INFO*)mesh->mem_info;
DEBUG_TEST_EXIT(mem_info,"mesh \"%s\": mesh->mem_info=nil\... | false | false | false | false | false | 0 |
set_video_pass_theora(void * data, int pass, int total_passes,
const char * stats_file)
{
char * buf;
int ret;
theora_t * theora = data;
theora->pass = pass;
if(theora->pass == 1)
{
theora->stats_file = fopen(stats_file, "wb");
/* Get initial header */
if(... | false | false | false | false | true | 1 |
mono_class_get_field (MonoClass *class, guint32 field_token)
{
int idx = mono_metadata_token_index (field_token);
g_assert (mono_metadata_token_code (field_token) == MONO_TOKEN_FIELD_DEF);
return mono_class_get_field_idx (class, idx - 1);
} | false | false | false | false | false | 0 |
CreateTimer(int timerType)
{
int platformTimerId, timerId;
if ( timerType == VTKI_TIMER_FIRST )
{
unsigned long duration = this->TimerDuration;
timerId = vtkTimerId; //just use current id, assume we don't have mutliple timers
platformTimerId = this->InternalCreateTimer(timerId,RepeatingTimer,durat... | false | false | false | false | false | 0 |
rv770_get_engine_memory_ss(struct radeon_device *rdev)
{
struct rv7xx_power_info *pi = rv770_get_pi(rdev);
struct radeon_atom_ss ss;
pi->sclk_ss = radeon_atombios_get_asic_ss_info(rdev, &ss,
ASIC_INTERNAL_ENGINE_SS, 0);
pi->mclk_ss = radeon_atombios_get_asic_ss_info(rdev, &ss,
ASIC_INTERN... | false | false | false | false | false | 0 |
uclist_add_signature(const unsigned long int id,
const unsigned long int gid,
const uint32_t flags,
const uint32_t cpuid,
const uint32_t pf_mask,
const int32_t uc_rev,
const void * const uc,
const uint32_t uc_size,
const int strict,
struct intel_uclist_entry ** const uclist)
{
struct intel_u... | false | false | false | false | false | 0 |
globus_l_gram_fifo_to_iovec(
globus_fifo_t * fifo,
struct iovec ** iov,
int * num_iov)
{
globus_list_t *list;
size_t len;
char * str;
int ... | false | false | false | false | false | 0 |
hexdump(std::ostream& os, const byte* buf, long len, long offset)
{
const std::string::size_type pos = 8 + 16 * 3 + 2;
const std::string align(pos, ' ');
long i = 0;
while (i < len) {
os << " "
<< std::setw(4) << std::setfill('0') << std::hex
... | false | false | false | false | false | 0 |
dce4_dp_audio_set_dto(struct radeon_device *rdev,
struct radeon_crtc *crtc, unsigned int clock)
{
u32 value;
value = RREG32(DCCG_AUDIO_DTO1_CNTL) & ~DCCG_AUDIO_DTO_WALLCLOCK_RATIO_MASK;
value |= DCCG_AUDIO_DTO1_USE_512FBR_DTO;
WREG32(DCCG_AUDIO_DTO1_CNTL, value);
/* Two dtos; generally use dto1 for DP */
... | false | false | false | false | false | 0 |
VSM_Diag(struct VSM_data *vd, VSM_diag_f *func, void *priv)
{
CHECK_OBJ_NOTNULL(vd, VSM_MAGIC);
if (func == NULL)
vd->diag = (VSM_diag_f*)getpid;
else
vd->diag = func;
vd->priv = priv;
} | false | false | false | true | false | 1 |
xml_sax_page_breaks_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
XMLSaxParseState *state = (XMLSaxParseState *)xin->user_state;
if (NULL != state->page_breaks) {
print_info_set_breaks (state->sheet->print_info,
state->page_breaks);
state->page_breaks = NULL;
}
} | false | false | false | false | false | 0 |
deviceMinStep(device_ *r, double *minStep)
{
double localMinStep = 0.0;
ReturnErrIf(r == NULL);
ReturnErrIf(minStep == NULL);
ReturnErrIf(r->class == NULL);
if(r->class->minStep != NULL) {
ReturnErrIf(r->class->minStep(r, &localMinStep));
if((localMinStep > 0.0) && (localMinStep < *minStep)) {
*minStep... | false | false | false | false | false | 0 |
__qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type,
struct scsi_cmnd *cmd, int (*do_reset)(struct fc_port *, uint64_t, int))
{
scsi_qla_host_t *vha = shost_priv(cmd->device->host);
fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
int err;
if (!fcport) {
return FAILED;
}
err = fc... | false | false | false | false | false | 0 |
os_testing_mode(void)
{
static int warned;
assert(become_inited);
if (become_testing <= 0)
return 0;
if (!warned)
{
sub_context_ty *scp;
warned = 1;
scp = sub_context_new();
verbose_intl(scp, i18n("warning: test mode"));
sub_context_delete(scp);
}
return 1;
} | false | false | false | false | false | 0 |
setexp(const char *exp,
struct rfc1035_spf_info *info)
{
struct rfc1035_reply *reply;
char namebuf[RFC1035_MAXNAMESIZE+1];
char txtbuf[256];
int n;
char *str;
/*
** The argument to the explanation modifier is a domain-spec
** to be TXT queried. The result of the TXT query is a
** macro-string that is ma... | true | true | false | false | false | 1 |
get_encoding() const
{
xmlpp::string encoding;
if(impl_->encoding)
encoding = (const char*)impl_->encoding;
return encoding;
} | false | false | false | false | false | 0 |
realtek_refill_rx ( struct realtek_nic *rtl ) {
struct realtek_descriptor *rx;
struct io_buffer *iobuf;
unsigned int rx_idx;
physaddr_t address;
int is_last;
/* Do nothing in legacy mode */
if ( rtl->legacy )
return;
while ( ( rtl->rx.prod - rtl->rx.cons ) < RTL_NUM_RX_DESC ) {
/* Allocate I/O buffer */
... | 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.