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 |
|---|---|---|---|---|---|---|
_e_gadcon_layout_smart_gadcons_asked_position_set(E_Smart_Data *sd)
{
E_Gadcon_Layout_Item *bi;
Eina_List *l;
Evas_Object *item;
#if 0
EINA_LIST_FOREACH(sd->items, l, item)
{
bi = evas_object_data_get(item, "e_gadcon_layout_data");
if (!bi) continue;
bi->x = bi->ask.pos;
... | false | false | false | false | false | 0 |
Debug(ostream& os, unsigned int level) const{
if (!code) return os;
DebugIndent(os, level) << GetOperator() << endl;
return code->Debug(os, level+1);
} | false | false | false | false | false | 0 |
kbd_set_token_bit(u8 bit)
{
int id;
int ret;
if (bit >= ARRAY_SIZE(kbd_tokens))
return -EINVAL;
id = find_token_id(kbd_tokens[bit]);
if (id == -1)
return -EINVAL;
get_buffer();
buffer->input[0] = da_tokens[id].location;
buffer->input[1] = da_tokens[id].value;
dell_send_request(buffer, 1, 0);
ret = buff... | false | false | false | false | false | 0 |
table(const int & tableref) const
{
return d_database->m_Tables.value(tableref, QString());
} | false | false | false | false | false | 0 |
qat_uclo_map_uof_obj(struct icp_qat_fw_loader_handle *handle,
void *addr_ptr, int mem_size)
{
struct icp_qat_uof_filehdr *filehdr;
struct icp_qat_uclo_objhandle *objhdl;
BUILD_BUG_ON(ICP_QAT_UCLO_MAX_AE >=
(sizeof(handle->hal_handle->ae_mask) * 8));
if (!handle || !addr_ptr || mem_size < 24)
return -... | false | false | false | false | false | 0 |
test_network_remote_remotes__query_refspecs(void)
{
git_remote *remote;
git_strarray array;
int i;
cl_git_pass(git_remote_create_inmemory(&remote, _repo, NULL, "git://github.com/libgit2/libgit2"));
for (i = 0; i < 3; i++) {
cl_git_pass(git_remote_add_fetch(remote, fetch_refspecs[i]));
cl_git_pass(git_remote_... | false | false | false | false | false | 0 |
wont_be_on_nf_4_cycle(EDGE *e)
/* returns 1 if after switching e won't be on an nf 4-cycle. Assumes that
there are no nf 3-cycles either before or after the switching. */
/* Alternative version:
{
EDGE *e1,*e2,*e3;
int k1,k2,k3;
RESETMARKS_V;
for (e1 = e->prev->invers->next,
... | false | false | false | false | false | 0 |
PyThreadState_DeleteCurrent()
{
PyThreadState *tstate = (PyThreadState*)_Py_atomic_load_relaxed(
&_PyThreadState_Current);
if (tstate == NULL)
Py_FatalError(
"PyThreadState_DeleteCurrent: no current tstate");
_Py_atomic_store_relaxed(&_PyThreadState_Current, NULL);
tstate_del... | false | false | false | false | false | 0 |
modperl_env_magic_clear_all(pTHX_ SV *sv, MAGIC *mg)
{
request_rec *r = (request_rec *)EnvMgObj;
if (r) {
apr_table_clear(r->subprocess_env);
MP_TRACE_e(MP_FUNC,
"[%s/0x%lx] clearing all magic off r->subprocess_env",
modperl_pid_tid(r->pool), modperl_interp... | false | false | false | false | false | 0 |
mic_create_debug_dir(struct mic_device *mdev)
{
char name[16];
if (!mic_dbg)
return;
scnprintf(name, sizeof(name), "mic%d", mdev->id);
mdev->dbg_dir = debugfs_create_dir(name, mic_dbg);
if (!mdev->dbg_dir)
return;
debugfs_create_file("smpt", 0444, mdev->dbg_dir, mdev, &smpt_file_ops);
debugfs_create_file... | true | true | false | false | false | 1 |
gearman_worker_define_function(gearman_worker_st *worker,
const char *function_name, const size_t function_name_length,
const gearman_function_t function,
const uint32_t timeou... | false | false | false | false | false | 0 |
ttm_bo_force_list_clean(struct ttm_bo_device *bdev,
unsigned mem_type, bool allow_errors)
{
struct ttm_mem_type_manager *man = &bdev->man[mem_type];
struct ttm_bo_global *glob = bdev->glob;
int ret;
/*
* Can't use standard list traversal since we're unlocking.
*/
spin_lock(&glob->lru_lock);
while (!lis... | false | false | false | false | false | 0 |
_equalInsertStmt(const InsertStmt *a, const InsertStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(cols);
COMPARE_NODE_FIELD(selectStmt);
COMPARE_NODE_FIELD(onConflictClause);
COMPARE_NODE_FIELD(returningList);
COMPARE_NODE_FIELD(withClause);
return true;
} | false | false | false | false | false | 0 |
wrap_parse_add_file_msg (char *buf, struct wrap_msg_buf *wmsg)
{
struct wrap_add_file * res = &wmsg->body.add_file;
char * scan = buf+3;
char * p;
int rc;
wmsg->msg_type = WRAP_MSGTYPE_ADD_FILE;
res->fstat.valid = 0;
res->fhinfo = WRAP_INVALID_FHINFO;
while (*scan && *scan == ' ')
scan++;
if (*scan ... | false | false | false | false | false | 0 |
qh_hashridge_find (setT *hashtable, int hashsize, ridgeT *ridge,
vertexT *vertex, vertexT *oldvertex, int *hashslot) {
unsigned hash;
ridgeT *ridgeA;
*hashslot= 0;
zinc_(Zhashridge);
hash= qh_gethash (hashsize, ridge->vertices, qh hull_dim-1, 0, vertex);
while ((ridgeA= (ridgeT *)SETelem_(ha... | false | false | false | false | true | 1 |
getFQDNName(SPtr<TDUID> duid) {
int cpt = 1;
string res = "";
SPtr<TFQDN> foo = FQDNLst.getFirst();
FQDNLst.first();
foo = FQDNLst.get();
while(!(*(*foo).Duid == *duid) && cpt<FQDNLst.count()){
foo = FQDNLst.get();
cpt++;
}
if (cpt<FQDNLst.count()) {
res = (*foo).Name;... | false | false | false | false | false | 0 |
restart( const QList<KCard*> & cards )
{
foreach ( KCard * c, cards )
{
c->setPos( talon->pos() );
c->setFaceUp( false );
talon->add( c );
}
for ( int r = 0; r < 4; r++ )
{
for ( int c = 0; c < 8; ++c )
{
KCard * card = talon->topCard();
... | false | false | false | false | false | 0 |
update()
{
// output data
while (! delay) {
u8 cmnd;
u8 data;
// decode data
if (! decode_octet (& cmnd))
return false;
if (! decode_octet (& data))
return false;
// check for special commands
switch (cmnd) {
// delay
case 0xff:
delay = 1 + (u8) (dat... | false | false | false | false | false | 0 |
shutterSpeed() const
{
if (d_func()->exposureControl)
return d_func()->exposureControl->exposureParameter(QCameraExposureControl::ShutterSpeed).toReal();
return -1.0;
} | false | false | false | false | false | 0 |
flmCurSetupPosKeyArray(
CURSOR * pCursor
)
{
RCODE rc = FERR_OK;
FDB * pDb = NULL;
// Optimize the subqueries as necessary
if (!pCursor->bOptimized)
{
if (RC_BAD( rc = flmCurPrep( pCursor)))
{
goto Exit;
}
}
// Set up the pDb
pDb = pCursor->pDb;
if (RC_BAD(rc = flmCurDbInit( pCursor)))
{
go... | false | false | false | false | false | 0 |
on_menu_toggle_all_additional_widgets1_activate(GtkMenuItem *menuitem, gpointer user_data)
{
static gint hide_all = -1;
GtkCheckMenuItem *msgw = GTK_CHECK_MENU_ITEM(
ui_lookup_widget(main_widgets.window, "menu_show_messages_window1"));
GtkCheckMenuItem *toolbari = GTK_CHECK_MENU_ITEM(
ui_lookup_widget(main_widge... | false | false | false | false | false | 0 |
x_order(const active_line *lp1, const active_line *lp2)
{
bool s1;
INCR(order);
if (lp1->x_current < lp2->x_current)
return -1;
else if (lp1->x_current > lp2->x_current)
return 1;
/*
* We need to compare the slopes of the lines. Start by
* checking one fast case, where th... | false | false | false | false | false | 0 |
BackslashQuoteString(const char *s, char *q)
{
char *p = q;
while (*s) {
switch (*s) {
case ' ':
case '$':
case '"':
case '[':
case ']':
case '{':
case '}':
case ';':
case '\\':
*... | false | false | false | false | false | 0 |
NeedCacheCompatibility(int major, int minor)
{
// Compatibility is not needed if the cache version is zero because
// the cache was created or modified by the user.
if(this->CacheMajorVersion == 0)
{
return false;
}
// Compatibility is needed if the cache version is equal to or lower
// than the ... | false | false | false | false | false | 0 |
replace_pwron_info_list_free(List *head)
{
List *li;
Replace_pwron_info *rpi;
for (li = head; li; li = li->next) {
rpi = list_first_data(li);
free(rpi);
}
list_free(head);
} | false | false | false | false | false | 0 |
_ds_ff_pref_set (
config_t config,
const char *username,
const char *home,
const char *preference,
const char *value,
void *ignore)
{
char filename[MAX_FILENAME_LENGTH];
FILE *out_file;
config = config; /* Keep compiler happy */
ignore = ignore; /* Keep compiler happy */
if (username == NULL) {
... | true | true | false | false | false | 1 |
nfs3_rmdir (rpcsvc_request_t *req, struct nfs3_fh *fh, char *name)
{
xlator_t *vol = NULL;
nfsstat3 stat = NFS3ERR_SERVERFAULT;
int ret = -EFAULT;
struct nfs3_state *nfs3 = NULL;
nfs3_call_sta... | false | false | false | false | false | 0 |
rhcs_get_confignames(StonithPlugin* p)
{
struct pluginDevice * sd;
int i;
if (Debug) {
LOG(PIL_DEBUG, "%s: called.", __FUNCTION__);
}
sd = (struct pluginDevice *)p;
if (sd->subplugin != NULL) {
if (!sd->metadata && !load_metadata(sd)) {
return NULL;
}
proc_xpath("/resource-agent/parameters/paramet... | false | false | false | false | false | 0 |
is_2616_token(const char c) {
switch (c) {
case ' ': case ';': case ',': case '"': case '\t':
/* The chars we are expecting are listed above;
the chars below are just for completeness. */
case '?': case '=': case '@': case ':': case '\\': case '/':
case '(': case ')':
case '<': ca... | false | false | false | false | false | 0 |
_dbus_pending_call_ref_unlocked (DBusPendingCall *pending)
{
dbus_int32_t old_refcount;
old_refcount = _dbus_atomic_inc (&pending->refcount);
_dbus_pending_call_trace_ref (pending, old_refcount, old_refcount + 1,
"ref_unlocked");
return pending;
} | false | false | false | false | false | 0 |
renderTargetDebris(object *target_objp)
{
vec3d obj_pos = ZERO_VECTOR;
vec3d camera_eye = ZERO_VECTOR;
matrix camera_orient = IDENTITY_MATRIX;
debris *debrisp;
vec3d orient_vec, up_vector;
float factor;
int flags=0;
debrisp = &Debris[target_objp->instance];
if ( Detail.targetview_model ) {
// take the fo... | false | false | false | false | false | 0 |
qla2x00_sysfs_read_dcbx_tlv(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
{
struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj,
struct device, kobj)));
struct qla_hw_data *ha = vha->hw;
int rval;
if (!capable(... | false | true | false | false | false | 1 |
set_type_package_list (tree type)
{
int i;
const char *type_string = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
const char *ptr;
int qualifications;
tree list = NULL_TREE, elt;
for (ptr = type_string, qualifications = 0; *ptr; ptr++)
if (*ptr == '.')
qualifications += 1;
for (ptr = typ... | false | false | false | false | false | 0 |
hix5hd2_net_close(struct net_device *dev)
{
struct hix5hd2_priv *priv = netdev_priv(dev);
hix5hd2_port_disable(priv);
hix5hd2_irq_disable(priv);
napi_disable(&priv->napi);
netif_stop_queue(dev);
hix5hd2_free_dma_desc_rings(priv);
if (priv->phy) {
phy_stop(priv->phy);
phy_disconnect(priv->phy);
}
clk_dis... | false | false | false | false | false | 0 |
isl_basic_map_extend_constraints(
struct isl_basic_map *base, unsigned n_eq, unsigned n_ineq)
{
if (!base)
return NULL;
return isl_basic_map_extend_space(base, isl_space_copy(base->dim),
0, n_eq, n_ineq);
} | false | false | false | false | false | 0 |
se_prop_read_xine_id_string (const se_prop_t *prop, se_prop_read_t *value)
{
xine_cfg_entry_t entry;
if (xine_config_lookup_entry (xine, (const char *) prop->data, &entry))
value->s = entry.str_value;
else
value->s = "";
} | false | false | false | false | false | 0 |
nsprefix(const QString &s) const
{
QStringList::ConstIterator it = d->nsnames.constBegin();
QStringList::ConstIterator it2 = d->nsvalues.constBegin();
for(; it != d->nsnames.constEnd(); ++it) {
if((*it) == s)
return (*it2);
++it2;
}
return QString::null;
} | false | false | false | false | false | 0 |
remove_jid_suffix (TpawAccountWidget *self,
const gchar *str)
{
g_assert (self->priv->jid_suffix != NULL);
if (!g_str_has_suffix (str, self->priv->jid_suffix))
return g_strdup (str);
return g_strndup (str, strlen (str) - strlen (self->priv->jid_suffix));
} | false | false | false | false | false | 0 |
myentity_count_channels_with_flagset(myentity_t *mt, unsigned int flagset)
{
mowgli_node_t *n;
chanacs_t *ca;
unsigned int count = 0;
MOWGLI_ITER_FOREACH(n, mt->chanacs.head)
{
ca = n->data;
if (ca->level & flagset)
count++;
}
return count;
} | false | false | false | false | false | 0 |
rtw_indicate_connect23a(struct rtw_adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
"+rtw_indicate_connect23a\n");
pmlmepriv->to_join = false;
if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) {
set_fwstate(pmlmepriv, _FW_LINKED);
rtw... | false | false | false | false | false | 0 |
do_system_authentication(const char *username,
const char *password,
int *uid,
int *gid,
error_handler_t *error_handler)
{
auth_r... | false | false | false | false | false | 0 |
peas_engine_constructor (GType type,
guint n_construct_params,
GObjectConstructParam *construct_params)
{
/* We don't support calling PeasEngine API without module support */
if (!g_module_supported ())
{
g_error ("libpeas... | false | false | false | false | false | 0 |
new_node(rbtree *tree, Var key, Var value)
{
rbnode *rn = (rbnode *)mymalloc(sizeof *rn, M_NODE);
if (rn == NULL)
return NULL;
rn->red = 1;
rn->key = key;
rn->value = value;
rn->link[0] = rn->link[1] = NULL;
return rn;
} | false | false | false | false | false | 0 |
e_box_unpack(Evas_Object *obj)
{
E_Box_Item *bi;
E_Smart_Data *sd;
if (!obj) return;
bi = evas_object_data_get(obj, "e_box_data");
if (!bi) return;
sd = bi->sd;
if (!sd) return;
_e_box_unpack_internal(sd, bi);
} | false | false | false | false | false | 0 |
ThreadedRequestData (
vtkInformation * vtkNotUsed( request ),
vtkInformationVector** vtkNotUsed( inputVector ),
vtkInformationVector * vtkNotUsed( outputVector ),
vtkImageData ***inData,
vtkImageData **outData,
int outExt[6], int id)
{
int idx1, outComp;
outComp = 0;
for (idx1 = 0; idx1 < this->... | false | false | false | false | false | 0 |
data_search_cmp_bool(const struct ast_data_search *root, const char *name,
unsigned int value)
{
struct ast_data_search *child;
unsigned int node_value;
enum data_search_comparison cmp_type;
child = data_search_get_node(root, name);
if (!child) {
return 0;
}
node_value = abs(ast_true(child->value));
cmp_ty... | false | false | false | false | false | 0 |
setNonBlock()
{
if (fcntl(myFD, F_SETFL, O_NONBLOCK) != 0)
{
myErrorStr="Failure to fcntl O_NONBLOCK";
perror("fcntl");
return(false);
}
else
{
myNonBlocking = true;
return(true);
}
} | false | false | false | false | false | 0 |
dwarf2out_return_reg (const char *label, unsigned int sreg)
{
reg_save (label, DWARF_FRAME_RETURN_COLUMN, DWARF_FRAME_REGNUM (sreg), 0);
} | false | false | false | false | false | 0 |
_update_info_block(List block_list,
GtkTreeView *tree_view)
{
ListIterator itr;
sview_block_info_t *block_ptr = NULL;
GtkTreeModel *model = gtk_tree_view_get_model(tree_view);
static GtkTreeModel *last_model = NULL;
char *name = NULL;
if (!block_list) {
g_print("No block_list given");
return;
}
... | false | false | false | false | false | 0 |
L2()
{register object *base=vs_base;
register object *sup=base+VM2; VC2
vs_check;
{object V4;
V4=(base[0]);
vs_top=sup;
goto TTL;
TTL:;
base[2]= (V4);
vs_top=(vs_base=base+2)+1;
(void) (*Lnk7)();
vs_top=sup;
base[1]= vs_base[0];
base[2]= ((object)VV[0]);
vs_top=(vs_base=base+1)+2;
(void) (*Lnk8)();
retur... | false | false | false | false | false | 0 |
add_new_crt_to_rdn_seq (gnutls_certificate_credentials_t res, int new)
{
gnutls_datum_t tmp;
int ret;
size_t newsize;
unsigned char *newdata;
unsigned i;
/* Add DN of the last added CAs to the RDN sequence
* This will be sent to clients when a certificate
* request message is sent.
*/
/* FIXME:... | false | false | false | false | false | 0 |
goBackAll() {
if (moves.empty())
return;
cursor=moves.begin();
} | false | false | false | false | false | 0 |
get_footer_height (GthContactSheetCreator *self,
int with_spacing)
{
int h;
if ((self->priv->footer == NULL) || (strcmp (self->priv->footer, "") == 0))
return 0;
h = get_text_height (self,
self->priv->footer,
self->priv->theme->footer_font_name,
self->priv->page_w... | false | false | false | false | false | 0 |
b_vformat_attribute_get_values_decoded (b_VFormatAttribute *attr)
{
g_return_val_if_fail (attr != NULL, NULL);
if (!attr->decoded_values) {
GList *l;
switch (attr->encoding) {
case VF_ENCODING_RAW:
case VF_ENCODING_8BIT:
for (l = attr->values; l; l = l->next)
attr->decoded_values = g_list_append (attr... | false | false | false | false | false | 0 |
Contour(double value,
vtkDataArray* cellScalars,
vtkIncrementalPointLocator* locator,
vtkCellArray *verts,
vtkCellArray* lines,
vtkCellArray*... | false | false | false | false | false | 0 |
hv_clone( HV * source, HV * clone ) {
HE * iter = NULL;
TRACE( ( "Cloning HASH\n" ) );
hv_iterinit( source );
while ( iter = hv_iternext( source ) ) {
SV * key = hv_iterkeysv( iter );
hv_store_ent( clone, key, sv_clone( hv_iterval( source, iter ) ), 0 );
}
return (SV*)clone;
} | false | false | false | false | false | 0 |
OnEditEOLMode(wxCommandEvent& event)
{
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if (ed)
{
int mode = -1;
if (event.GetId() == idEditEOLCRLF)
mode = wxSCI_EOL_CRLF;
else if (event.GetId() == idEditEOLCR)
mode = wxSCI_EOL_CR;... | false | false | false | false | false | 0 |
find_higher_axes(void)
{
int i, j, k ;
SYMMETRY_ELEMENT * axis ;
for( i = 0 ; i < _mol->NumAtoms() ; i++ ){
for( j = i + 1 ; j < _mol->NumAtoms() ; j++ ){
if( !equivalentAtoms(*_mol->GetAtom(i+1), *_mol->GetAtom(j+1)) )
continue ;
if( fabs( DistanceFromCente... | false | false | false | false | false | 0 |
PieceProgressCallback()
{
float width = this->ProgressRange[1]-this->ProgressRange[0];
float pieceProgress = this->PieceReaders[this->Piece]->GetProgress();
float progress = this->ProgressRange[0] + pieceProgress*width;
this->UpdateProgressDiscrete(progress);
if(this->AbortExecute)
{
this->PieceReader... | false | false | false | false | false | 0 |
SeekTime(double timepos)
{
double t = GetTime();
if ((timepos - t) < 0.002 && (timepos - t) > -0.002 && timepos > 0.002)
{
//printf("---------SEEK DISCARD %f %f\n", t, timepos);
return 0;
}
return ReadStream::SeekTime(timepos);
} | false | false | false | false | false | 0 |
store_target(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t count)
{
char *endchar;
unsigned long long target_bytes;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
target_bytes = memparse(buf, &endchar);
balloon_set_new_target(target_bytes >> PAGE_SHIFT);
return... | false | false | false | false | false | 0 |
operator==(const FertilityCalculatorThreadMessage& rhs) const
{
if(typeid(rhs)==typeid(FCTUpdateCompletionPercent))
{
const FCTUpdateCompletionPercent& r = dynamic_cast<const FCTUpdateCompletionPercent&>(rhs);
if(r.percent == percent)
return true;
}
return false;
} | false | false | false | false | false | 0 |
ReadVertexIndices (CObject *object, Chunk *previousChunk)
{
Uint16 index = 0;
previousChunk->bytesRead += file->readUInt16 ((Uint16 *) &object->numTriangles);
object->triangle = new CTriangle [object->numTriangles];
if (object->triangle == NULL) error_outofmemory ();
memset (object->triangle, 0, sizeo... | false | false | false | false | false | 0 |
do_select_row (GdMainView *self,
GtkTreeIter *iter,
gboolean value)
{
GtkTreeModel *model;
GtkTreeModelFilter *filter;
GtkTreeIter my_iter, child_iter;
model = self->priv->model;
my_iter = *iter;
while (GTK_IS_TREE_MODEL_FILTER (model))
{
filter = GTK_TREE_MODEL_FIL... | false | false | false | false | false | 0 |
Unlock()
{
if (!m_fLocked)
return;
if (unlink(m_path.c_str()) != 0 && errno != ENOENT)
throw AppInstException(errno);
m_fLocked = false;
} | false | false | false | false | false | 0 |
EmitSwapFPIntParams(const MCSubtargetInfo &STI,
Mips16HardFloatInfo::FPParamVariant PV,
bool LE, bool ToFP) {
using namespace Mips16HardFloatInfo;
unsigned MovOpc = ToFP ? Mips::MTC1 : Mips::MFC1;
switch (PV) {
case FSig:
Emit... | false | false | false | false | false | 0 |
SetLastPiece(unsigned p)
{
if(last_piece==NO_PIECE || parent->my_bitfield->get_bit(last_piece))
last_piece=p;
if(parent->last_piece==NO_PIECE || parent->my_bitfield->get_bit(parent->last_piece))
parent->last_piece=p;
} | false | false | false | false | false | 0 |
reload_service_accounts(int service_id)
{
LList *node = accounts;
LList *account_pairs = NULL;
eb_local_account *oela = NULL;
eb_local_account *nela = NULL;
const int buffer_size = 256;
char buff[buffer_size];
char buff2[buffer_size];
LList *saved_info = NULL;
saved_info = ay_save_account_information(service_... | false | false | false | false | false | 0 |
mjpeg_decode_com(MJpegDecodeContext *s)
{
int len = get_bits(&s->gb, 16);
if (len >= 2 && 8*len - 16 + get_bits_count(&s->gb) <= s->gb.size_in_bits) {
char *cbuf = av_malloc(len - 1);
if (cbuf) {
int i;
for (i = 0; i < len - 2; i++)
cbuf[i] = get_bits(&s->... | false | false | false | false | false | 0 |
PyFile_WriteString(const char *s, PyObject *f)
{
if (f == NULL) {
/* Should be caused by a pre-existing error */
if (!PyErr_Occurred())
PyErr_SetString(PyExc_SystemError,
"null file for PyFile_WriteString");
return -1;
}
else if (PyFile_Check(... | false | false | false | false | false | 0 |
Callback()
{
CQueryObject * queryobject;
m_pQueueMutex->Lock();
// get searches from the queue
while ( (queryobject = m_pQueryQueue->Next(0)) != 0 )
{
// remove it from the list
m_pQueryQueue->Remove(queryobject);
// query timeout in seconds
if ( (time(0)-queryobject->tTimeout) > QUERY_TIMEOUT )
{
... | false | false | false | false | false | 0 |
slotNetworkError()
{
// clear state
if (!m_netReply)
return;
dropNetworkConnection();
m_progress = 0.0;
setAcceptHoverEvents(true);
} | false | false | false | false | false | 0 |
insnWithID(insn_t &Insn, unsigned Opcode) const {
BitsInit &Bits = getBitsField(*AllInstructions[Opcode]->TheDef, "Inst");
for (unsigned i = 0; i < BitWidth; ++i)
Insn.push_back(bitFromBits(Bits, i));
} | false | false | false | false | false | 0 |
lit_compare(struct literal *l1,
struct literal *l2)
{
if (l1->sign > l2->sign)
return(GREATER_THAN);
else if (l1->sign < l2->sign)
return(LESS_THAN);
else if (answer_lit(l1) && !answer_lit(l2))
return(GREATER_THAN);
else if (!answer_lit(l1) && answer_lit(l2))
return(LESS_THAN);
else {
i... | false | false | false | false | false | 0 |
pop_zm_stack(void)
{ assembly_operand st;
if (version_number < 5) assemblez_0(pop_zc);
else
{ st.marker = 0; st.type = VARIABLE_OT; st.value = 0;
assemblez_1_branch(jz_zc, st, -2, TRUE);
}
} | false | false | false | false | false | 0 |
itemHit(int playerNumber, int, int)
{
//kDebug() << "Got Item Hit for " << playerNumber;
newApple();
players[playerNumber]->setEnlargement(3);
players[playerNumber]->addScore(5);
if (velocity > 15)
{
velocity--;
timer->stop();
timer->start(velocity);
}
emit updatedScore();
} | false | false | false | false | false | 0 |
vpfe_get_subdev_input_index(struct vpfe_device *vpfe,
int *subdev_index,
int *subdev_input_index,
int app_input_index)
{
int i, j = 0;
for (i = 0; i < ARRAY_SIZE(vpfe->cfg->asd); i++) {
if (app_input_index < (j + 1)) {
*subdev_index = i;
*subdev_input_index = app_input_index - j;
retu... | false | false | false | false | false | 0 |
updateGroup()
{
if (!_lineCall) return;
TraceFunction* f = _lineCall->call()->called();
QColor c = GlobalGUIConfig::functionColor(_view->groupType(), f);
setIcon(4, colorPixmap(10, 10, c));
} | false | false | false | false | false | 0 |
Neg(Type *type, Expression *e1)
{ Expression *e;
Loc loc = e1->loc;
if (e1->type->isreal())
{
e = new RealExp(loc, -e1->toReal(), type);
}
else if (e1->type->isimaginary())
{
e = new RealExp(loc, -e1->toImaginary(), type);
}
else if (e1->type->iscomplex())
{
... | false | false | false | false | false | 0 |
resp_rewind(struct scsi_lu *lu)
{
int fd;
ssize_t rd;
struct ssc_info *ssc = dtype_priv(lu);
struct blk_header_info *h = &ssc->c_blk;
fd = lu->fd;
dprintf("*** Backing store fd: %s %d %d ***\n", lu->path, lu->fd, fd);
rd = ssc_read_blkhdr(fd, h, 0);
if (rd) {
eprintf("fail to read the first block header\n"... | false | false | false | false | false | 0 |
fetion_sip_create(fetion_account *ac)
{
g_return_val_if_fail(ac != NULL, NULL);
fetion_sip *sip = g_new0(fetion_sip, 1);
if (ac->sid) {
sip->from = g_strdup(ac->sid);
}
sip->header = NULL;
sip->sequence = 2;
ac->sip = sip;
return sip;
} | false | false | false | false | false | 0 |
kptoprint(int key) {
switch (key) {
case SDLK_KP_PERIOD: key = SDLK_PERIOD; break;
case SDLK_KP_DIVIDE: key = SDLK_SLASH; break;
case SDLK_KP_MULTIPLY: key = SDLK_ASTERISK; break;
case SDLK_KP_MINUS: key = SDLK_MINUS; break;
case SDLK_KP_PLUS: key = SDLK_PLUS; break;
case SDLK_KP_EQUALS: key = SDLK_EQUALS;... | false | false | false | false | false | 0 |
qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
ModernDateEditor *_t = static_cast<ModernDateEditor *>(_o);
switch (_id) {
case 0: _t->dateChanged((*reinterpret_cast< const QDa... | false | false | false | false | false | 0 |
addOffset(int32_t offset) {
int32_t i=start+offset;
if(i>=capacity) {
i-=capacity;
}
list[i]=TRUE;
++length;
} | false | false | false | false | false | 0 |
qHash(const KParts::ScriptableExtension::FunctionRef& f)
{
return qHash(qMakePair(f.base, f.field));
}
} | false | false | false | false | false | 0 |
get_num_mipmap_levels(int w, int h)
{
int size, levels = 0;
// make sure we can and should generate mipmaps before trying to use them
if ( !Cmdline_mipmap || !Is_Extension_Enabled(OGL_SGIS_GENERATE_MIPMAP) )
return 1;
size = MAX(w, h);
while (size > 0) {
size >>= 1;
levels++;
}
return (levels > 1) ? le... | false | false | false | false | false | 0 |
print0x0002(std::ostream& os,
const Value& value,
const ExifData*)
{
if (value.count() > 1) {
os << value.toLong(1);
}
else {
os << "(" << value << ")";
}
ret... | false | false | false | false | false | 0 |
per_write_choice(STREAM* s, uint8 choice)
{
stream_write_uint8(s, choice);
} | false | false | false | false | false | 0 |
migrate_parse_ldap_source (ParseData *parse_data)
{
if (parse_data->soup_uri->host != NULL)
g_key_file_set_string (
parse_data->key_file,
E_SOURCE_EXTENSION_AUTHENTICATION,
"Host", parse_data->soup_uri->host);
if (parse_data->soup_uri->port != 0)
g_key_file_set_integer (
parse_data->key_file,
E_SO... | false | false | false | false | false | 0 |
add_replace_string(replace_struct* replace, const char* search_str, const char* replace_str)
{
if(replace->length >= MAX_REPLACE_LENGTH)
error_exit("overflow in replace structure");
strcpy(replace->replace[replace->length][0], search_str);
strcpy(replace->replace[replace->length++][1], replace_str);
} | false | true | true | false | false | 1 |
s_visit_program(program_t* programa, ... )
{
printf("[semantic] Visitando programa (%d)...\n", programa->node_type);
statement_list_t* stmt = programa->head;
while (stmt != 0) {
s_visit_statement_list (stmt);
stmt = stmt->next;
}
} | false | false | false | false | false | 0 |
SetRepository (char *value)
{ char ebuff[CF_EXPANDSIZE];
if (*value != '/')
{
yyerror("File repository must be an absolute directory name");
}
if (strlen(VREPOSITORY) != 0)
{
yyerror("Redefinition of system variable repository");
}
ExpandVarstring(value,ebuff,"");
VREPOSITORY = strdup(ebuff);
} | true | true | false | false | false | 1 |
net_linux_send(JsNetwork *net, int sckt, const void *buf, size_t len) {
NOT_USED(net);
fd_set writefds;
FD_ZERO(&writefds);
FD_SET(sckt, &writefds);
struct timeval time;
time.tv_sec = 0;
time.tv_usec = 0;
int n = select(sckt+1, 0, &writefds, 0, &time);
if (n==SOCKET_ERROR ) {
// we probably disco... | false | false | false | false | false | 0 |
DSDPConeComputeX( DSDPCone K, double mu, DSDPVec y, DSDPVec dy, DSDPVec AX, double *tracexs){
int info;
double trxs;
DSDPFunctionBegin;
if (K.dsdpops->conecomputex){
trxs=0;
info=K.dsdpops->conecomputex(K.conedata,mu,y,dy,AX,&trxs);DSDPChkConeError(K,info);
*tracexs+=trxs;
} else {
DSDPNoOpera... | false | false | false | false | false | 0 |
httpRequestPackDebug(request_t * req, Packer * p)
{
assert(req && p);
/* Client info */
packerPrintf(p, "Client: %s ", inet_ntoa(req->client_addr));
packerPrintf(p, "http_port: %s:%d", inet_ntoa(req->my_addr), req->my_port);
if (req->auth_user_request && authenticateUserRequestUsername(req->auth_use... | false | false | false | true | false | 1 |
__seq_get(seq, txn, delta, retp, flags)
DB_SEQUENCE *seq;
DB_TXN *txn;
u_int32_t delta, flags;
db_seq_t *retp;
{
DB *dbp;
DB_SEQ_RECORD *rp;
DB_THREAD_INFO *ip;
ENV *env;
int handle_check, ret;
dbp = seq->seq_dbp;
env = dbp->env;
rp = seq->seq_rp;
ret = 0;
ENV_GET_THREAD_INFO(env, ip);
STRIP_AUTO_COMMI... | false | false | false | true | false | 1 |
dm_ulog_tfr_init(void)
{
int r;
void *prealloced;
INIT_LIST_HEAD(&receiving_list);
prealloced = kmalloc(DM_ULOG_PREALLOCED_SIZE, GFP_KERNEL);
if (!prealloced)
return -ENOMEM;
prealloced_cn_msg = prealloced;
prealloced_ulog_tfr = prealloced + sizeof(struct cn_msg);
r = cn_add_callback(&ulog_cn_id, "dmlogus... | false | false | false | false | false | 0 |
iassist_proposals(IAnjutaEditorAssist* iassist,
IAnjutaProvider* provider,
GList* proposals,
const gchar* pre_word,
gboolean finished,
GError** e)
{
Sourceview* sv = ANJUTA_SOURCEVIEW(iassist);
GtkSourceCompletion* completion = ... | false | false | false | false | false | 0 |
pmbus_dev_attr_init(struct device_attribute *dev_attr,
const char *name,
umode_t mode,
ssize_t (*show)(struct device *dev,
struct device_attribute *attr,
char *buf),
ssize_t (*store)(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count))
{
sysfs_att... | false | false | false | false | false | 0 |
ShowPath(Layer,Path,Terminate)
int Layer;
struct p *Path;
int Terminate; /* If True, the path is closed */
{
struct p *Pair;
int firstX,firstY,X,Y,lastX,lastY;
Pair = Path;
firstX = lastX = Pair->pX;
firstY = lastY = Pair->pY;
Pair = Pair->pSucc;
while (Pair != NULL) {
X = Pair... | false | false | false | true | false | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.