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 |
|---|---|---|---|---|---|---|
GOUse_go_gauntlet_gate(Player* pPlayer, GameObject* pGo)
{
ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData();
if (!pInstance)
{
return false;
}
if (pInstance->GetData(TYPE_BARON_RUN) != NOT_STARTED)
{
return false;
}
if (Group* pGroup = pPlayer->G... | false | false | false | false | false | 0 |
_nc_tic_dir(const char *path)
{
if (!KeepTicDirectory) {
if (path != 0) {
TicDirectory = path;
HaveTicDirectory = TRUE;
} else if (!HaveTicDirectory && use_terminfo_vars()) {
char *envp;
if ((envp = getenv("TERMINFO")) != 0)
return _nc_tic_dir(envp);
}
}
return TicDirectory;
} | false | false | false | false | false | 0 |
choose_emit_func( struct gl_context *ctx, GLuint count, GLubyte *dest)
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
struct tnl_clipspace_attr *a = vtx->attr;
const GLuint attr_count = vtx->attr_count;
GLuint j;
for (j = 0; j < attr_count; j++)... | false | false | false | false | false | 0 |
ath10k_wmi_op_gen_peer_delete(struct ath10k *ar, u32 vdev_id,
const u8 peer_addr[ETH_ALEN])
{
struct wmi_peer_delete_cmd *cmd;
struct sk_buff *skb;
skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd));
if (!skb)
return ERR_PTR(-ENOMEM);
cmd = (struct wmi_peer_delete_cmd *)skb->data;
cmd->vdev_id = __cpu_to_l... | false | false | false | false | false | 0 |
got_it(imm_struct *dev)
{
dev->base = dev->dev->port->base;
if (dev->cur_cmd)
dev->cur_cmd->SCp.phase = 1;
else
wake_up(dev->waiting);
} | false | false | false | false | false | 0 |
addTag(Tag const& tag)
{
bool present = false;
for ( std::vector<Tag>::iterator it = tags.begin(); (it != tags.end()) && !present; ++it ) {
if (tag.key == it->key) {
present = true;
for ( std::vector<Label>::const_iterator it2 = tag.labels.begin(); it2 != tag.labels.end(); ++it... | false | false | false | false | false | 0 |
onButtonRelease(FXObject*,FXSelector,void* ptr){
FXEvent* event=(FXEvent*)ptr;
FXTRACE((200,"%s::onButtonRelease %p\n",getClassName(),this));
if(event->moved){handle(this,FXSEL(SEL_COMMAND,ID_UNPOST),NULL);}
//popdown(0);
return 1;
} | false | false | false | false | false | 0 |
SameFile(const char* file1, const char* file2)
{
#ifdef _WIN32
HANDLE hFile1, hFile2;
hFile1 = CreateFile( file1,
GENERIC_READ,
FILE_SHARE_READ ,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS,
... | false | false | false | false | false | 0 |
ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan,
s16 nf)
{
s8 noise = ATH_DEFAULT_NOISE_FLOOR;
if (nf) {
s8 delta = nf - ATH9K_NF_CAL_NOISE_THRESH -
ath9k_hw_get_default_nf(ah, chan);
if (delta > 0)
noise += delta;
}
return noise;
} | false | false | false | false | false | 0 |
unparse(ostream &os, ostream_manipulator separator) const
{
os << "<HEAD>" << separator;
if (title.get()) {
os << "<TITLE>" << separator;
title->unparse(os, separator);
os << "</TITLE>" << separator;
}
if (isindex_attributes.get()) {
os << "<ISINDEX"<< isindex_attributes << ">" << std::endl;
}... | false | false | false | false | false | 0 |
infoFormat(struct parse_state *ps)
{
char *p;
if (!FileTok(ps,"=, \n\t",NO_NEWLINE,&p)) {
DXAddMessage("#10865","format");
goto error;
}
if (!p){
DXSetError(ERROR_DATA_INVALID,"#10865","format");
goto error;
}
if (!get_format(ps,&p,&_dxd_gi_format,&_dxd_gi_byteorder))
goto error;
if (_d... | false | false | false | false | false | 0 |
IIT_annotation (char **restofheader, T this, int index, bool *alloc_header_p) {
int recno;
char *annotation, *p;
int len;
#ifdef HAVE_64_BIT
UINT8 start;
#else
unsigned int start;
#endif
recno = index - 1; /* Convert to 0-based */
#ifdef WORDS_BIGENDIAN
#ifdef HAVE_64_BIT
if (this->annot_pointers_8p == t... | false | true | false | false | false | 1 |
pixRotateOrth(PIX *pixs,
l_int32 quads)
{
PROCNAME("pixRotateOrth");
if (!pixs)
return (PIX *)ERROR_PTR("pixs not defined", procName, NULL);
if (quads < 0 || quads > 4)
return (PIX *)ERROR_PTR("quads not in {0,1,2,3,4}", procName, NULL);
if (quads == 0 || quads == 4)... | false | false | false | false | false | 0 |
WriteTag (const char *dir, const char *tag, const char *date, int nonbranch,
const char *update_dir, const char *repository)
{
FILE *fout;
char *tmp;
if (noexec)
return;
if (dir != NULL)
tmp = Xasprintf ("%s/%s", dir, CVSADM_TAG);
else
tmp = xstrdup (CVSADM_TAG);
if (tag || date... | false | false | false | false | false | 0 |
SeqfileGetLine(SQFILE *V)
{
if (V->ssimode >= 0)
if (0 != SSIGetFilePosition(V->f, V->ssimode, &(V->ssioffset)))
Die("SSIGetFilePosition() failed");
if (sre_fgets(&(V->buf), &(V->buflen), V->f) == NULL)
*(V->buf) = '\0';
V->linenumber++;
} | false | false | false | false | false | 0 |
fat_rebuild_parent(struct super_block *sb, int parent_logstart)
{
int search_clus, clus_to_match;
struct msdos_dir_entry *de;
struct inode *parent = NULL;
struct inode *dummy_grand_parent = NULL;
struct fat_slot_info sinfo;
struct msdos_sb_info *sbi = MSDOS_SB(sb);
sector_t blknr = fat_clus_to_blknr(sbi, parent_... | false | false | false | false | false | 0 |
GDS_prt_thin_lon(unsigned char *gds) {
int iy, i, col, pl;
iy = GDS_LatLon_ny(gds);
iy = (iy + 1) / 2;
iy = GDS_LatLon_ny(gds);
if ((pl = GDS_PL(gds)) == -1) {
fprintf(stderr,"\nprogram error: GDS_prt_thin\n");
return;
}
for (col = i = 0; i < iy; i++) {
if (col == 0) printf(" ");
pri... | true | true | false | false | false | 1 |
decode1b64(char c)
{
unsigned char i = '\0';
switch (c) {
case '+':
i = 62;
break;
case '/':
i = 63;
break;
case '=':
i = 0;
break;
default: // must be A-Z, a-z or 0-9
i = '9' - c;
if (i > 0x3F) { // under 9
i = 'Z' - c;
if (i > 0x3F) { // over Z
i = 'z' - c;
if (i > 0x3F) { // over... | false | false | false | false | false | 0 |
UpOne() {if (parents.size()>=2) {return parents.at(parents.size()-2);} return 0;} | false | false | false | false | false | 0 |
pretty_print_size(int64_t inp) {
static char output[100];
if (inp<1024) {
snprintf(output, sizeof(output), "%" PRId64, inp);
return output;
}
inp /= 1024;
if (inp<1024) {
snprintf(output, sizeof(output), "%" PRId64 "K", inp);
return output;
}
inp /= 1024;
if (inp<1024) {
snprintf(ou... | false | false | false | false | false | 0 |
skip_atom (const char **in)
{
register const char *inptr;
decode_lwsp (in);
inptr = *in;
while (is_atom (*inptr))
inptr++;
*in = inptr;
} | false | false | false | false | false | 0 |
bnx2x_eee_an_resolve(struct bnx2x_phy *phy,
struct link_params *params,
struct link_vars *vars)
{
struct bnx2x *bp = params->bp;
u16 adv = 0, lp = 0;
u32 lp_adv = 0;
u8 neg = 0;
bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_EEE_ADV, &adv);
bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_LP_... | false | false | false | false | false | 0 |
to_string() {
stringstream out;
out << data;
return out.str();
} | false | false | false | false | false | 0 |
isns_attr_list_get_ipaddr(const isns_attr_list_t *list,
uint32_t tag, struct in6_addr *value)
{
isns_attr_t *attr;
if (!(attr = __isns_attr_list_find(list, tag))
|| !ISNS_ATTR_IS_IPADDR(attr))
return 0;
*value = attr->ia_value.iv_ipaddr;
return 1;
} | false | false | false | false | false | 0 |
rasteropHipLow(l_uint32 *data,
l_int32 pixh,
l_int32 depth,
l_int32 wpl,
l_int32 y,
l_int32 h,
l_int32 shift)
{
l_int32 i;
l_uint32 *line;
/* clip band if necessary */
if (y < 0) {
h += ... | false | false | false | false | false | 0 |
P_Make_Record_Type (Object name, Object fields) {
Object s, ismem;
GC_Node2;
if (TYPE(name) == T_Symbol)
name = SYMBOL(name)->name;
else if (TYPE(name) != T_String)
Wrong_Type_Combination (name, "string or symbol");
Check_List (fields);
for (s = fields; !Nullp (s); s = Cdr (s)) ... | false | false | false | false | false | 0 |
totem_playlist_get_playing (TotemPlaylist *playlist)
{
GtkTreeIter iter;
TotemPlaylistStatus status;
g_return_val_if_fail (TOTEM_IS_PLAYLIST (playlist), TOTEM_PLAYLIST_STATUS_NONE);
if (gtk_tree_model_get_iter (playlist->priv->model, &iter, playlist->priv->current) == FALSE)
return TOTEM_PLAYLIST_STATUS_NONE;
... | false | false | false | false | false | 0 |
initialise(struct gn_statemachine *state)
{
nk6160_driver_instance *drvinst;
gn_error error;
char model[GN_MODEL_MAX_LENGTH + 1];
gn_data data;
gn_phone_model *pm;
/* Copy in the phone info */
memcpy(&(state->driver), &driver_nokia_6160, sizeof(gn_driver));
if (!(drvinst = malloc(sizeof(nk6160_driver_instance... | false | false | false | false | false | 0 |
hud_reticle_pick_target()
{
reticle_list *cur_rl, *save_rl, *new_rl;
object *return_objp;
int in_save_list, i;
return_objp = NULL;
// As a first step, see if both ships and debris are in the list. If so, cull the debris.
int debris_in_list = 0;
int ship_in_list = 0;
for ( cur_rl = GET_FIRST(&Reticle_cur... | false | false | false | true | false | 1 |
FieldSpaceUsed(const FieldDescriptor* field) {
typedef FieldDescriptor FD; // avoid line wrapping
if (field->label() == FD::LABEL_REPEATED) {
switch (field->cpp_type()) {
case FD::CPPTYPE_INT32 : return sizeof(RepeatedField<int32 >);
case FD::CPPTYPE_INT64 : return sizeof(RepeatedField<int64 ... | false | false | false | false | false | 0 |
strbuf_split_buf(const char *str, size_t slen, int delim, int max)
{
int alloc = 2, pos = 0;
const char *n, *p;
struct strbuf **ret;
struct strbuf *t;
ret = xcalloc(alloc, sizeof(struct strbuf *));
p = n = str;
while (n < str + slen) {
int len;
if (max <= 0 || pos + 1 < max)
n = memchr(n, delim, slen - (... | false | false | false | false | false | 0 |
Sort(size_t tableLimit)
{
std::sort(m_coll.begin(), m_coll.end(), TargetPhraseOrderByScore());
if (m_coll.size() > tableLimit) {
CollType::iterator iter;
for (iter = m_coll.begin() + tableLimit ; iter != m_coll.end(); ++iter) {
delete *iter;
}
m_coll.resize(tableLimit);
}
} | false | false | false | false | false | 0 |
adwaita_draw_box (GtkStyle * style,
GdkWindow * window,
GtkStateType state_type,
GtkShadowType shadow_type,
GdkRectangle * area,
GtkWidget * widget,
const gchar * detail,
gint x,
... | false | false | false | false | false | 0 |
InitLocks(void)
{
HASHCTL info;
long init_table_size,
max_table_size;
bool found;
/*
* Compute init/max size to request for lock hashtables. Note these
* calculations must agree with LockShmemSize!
*/
max_table_size = NLOCKENTS();
init_table_size = max_table_size / 2;
/*
* Allocate hash table f... | false | false | false | false | false | 0 |
fs_ini_file_get_value(fs_ini_file *ini_file, const char *group_name,
const char *key) {
fs_hash_table *group = fs_hash_table_lookup(ini_file->groups, group_name);
if (group == NULL) {
return NULL;
}
char *value = fs_hash_table_lookup(group, key);
if (value == NULL) {
return N... | false | false | false | false | false | 0 |
BaseToBase(cmsUInt32Number in, int BaseIn, int BaseOut)
{
char Buff[100];
int i, len;
cmsUInt32Number out;
for (len=0; in > 0 && len < 100; len++) {
Buff[len] = (char) (in % BaseIn);
in /= BaseIn;
}
for (i=len-1, out=0; i >= 0; --i) {
out = out * BaseOut + Buff[i];
... | true | true | false | false | false | 1 |
ath10k_pci_wake(struct ath10k *ar)
{
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
unsigned long flags;
int ret = 0;
if (ar_pci->pci_ps == 0)
return ret;
spin_lock_irqsave(&ar_pci->ps_lock, flags);
ath10k_dbg(ar, ATH10K_DBG_PCI_PS, "pci ps wake refcount %lu awake %d\n",
ar_pci->ps_wake_refcount, ar_p... | false | false | false | false | false | 0 |
add_group_to_groups(Groups *groups, Group_definition *gd)
{
Group_definition **gdp;
for (gdp = &groups->group_definition_head; *gdp != NULL; gdp = &(*gdp)->next)
;
*gdp = gd;
} | false | false | false | false | false | 0 |
cut_score(
int *ccoef, /* cut left hand side coefficients */
int crhs, /* cut right hand side */
double viol, /* cut violation */
short int only_viol /* flag which tells whether only an inequality of
slack smaller than MAX_SLACK is of interest (TRUE)
otherwise (FALSE) */
)
{
int j, norm;
/* ve... | false | false | false | false | false | 0 |
searchSubFromHere(const DcmTagKey &tag,
DcmStack &resultStack,
OFBool searchIntoSub)
{
DcmObject *dO;
OFCondition l_error = EC_TagNotFound;
if (!elementList->empty())
{
elementList->seek(ELP_first);
do {
... | false | false | false | false | false | 0 |
GetAllDependences(VarsContainer& res_cont, bool with_self)
{
for (std::vector<SyntaxNode*>::iterator it = args.begin(); it != args.end(); ++ it)
(*it)->GetAllDependences(res_cont);
} | false | false | false | false | false | 0 |
REMwrite(p, i, escdot)
register char *p;
register int i;
register BOOL escdot;
{
static char HDR[] = "Content-Transfer-Encoding:";
static char COD[] =
"Content-Transfer-Encoding: quoted-printable\r\n";
register char *dest;
int size;
/* Buffer too full? */
if (REMbuffend - REMb... | false | false | false | false | false | 0 |
DetectWindowEffects(void)
{
// Algorithm:
// Scan the linedef list looking for possible candidates,
// checking for an odd number of one-sided linedefs connected
// to a single vertex. This idea courtesy of Graham Jackson.
int i;
int one_siders;
int two_siders;
for (i=0; i < num_linedefs; i++)
... | false | false | false | false | false | 0 |
parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
{
struct predicate *our_pred;
uintmax_t num;
char suffix;
enum comparison_type c_type;
int blksize = 512;
int len;
/* XXX: cannot (yet) convert to ue collect_arg() as this
* function modifies the args in-place.
*/
if ((argv... | false | false | false | false | false | 0 |
BTDM_1AntForDhcp(struct rtw_adapter *padapter)
{
struct hal_data_8723a *pHalData;
u8 BtState;
struct bt_coexist_8723a *pBtCoex;
struct btdm_8723a_1ant *pBtdm8723;
pHalData = GET_HAL_DATA(padapter);
pBtCoex = &pHalData->bt_coexist.halCoex8723;
BtState = pBtCoex->c2hBtInfo;
pBtdm8723 = &pBtCoex->btdm1Ant;
RTPR... | false | false | false | false | false | 0 |
gnc_plugin_customer_import_showGUI(void)
{
CustomerImportGui *gui;
//gktbuilderXML *xml;
GtkBuilder *builder;
GList *glist;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
// if window exists already, activate it
glist = gnc_find_gui_components ("dialog-customer_import_gui", NULL,... | false | false | false | false | false | 0 |
pushNewPixel(L_QUEUE *lq,
l_int32 x,
l_int32 y,
l_int32 *pminx,
l_int32 *pmaxx,
l_int32 *pminy,
l_int32 *pmaxy)
{
L_NEWPIXEL *np;
PROCNAME("pushNewPixel");
if (!lq) {
L_ERROR("queue not defined\n", procName);
... | false | false | false | false | false | 0 |
update_sec_level(struct io_data *data)
{
GError *err = NULL;
int sec_level;
if (!bt_io_get(data->io, data->type, &err,
BT_IO_OPT_SEC_LEVEL, &sec_level,
BT_IO_OPT_INVALID)) {
printf("bt_io_get(OPT_SEC_LEVEL): %s\n", err->message);
g_clear_error(&err);
return;
}
printf("sec_level=%d\n", sec_level);... | false | false | false | false | false | 0 |
__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
Py_intptr_t __pyx_v_aligned_p;
size_t __pyx_v_offset;
void *__pyx_r;
int __pyx_t_1;
/* "View.MemoryView":296
* cdef void *align_pointer(void *memory, size_t alignment) nogil:
* "Align pointer memory on a given boundary"
* cdef P... | false | false | false | false | false | 0 |
cag_alloc_str_str(void *to, const void *from)
{
static struct str_str {
char *key;
char *data;
} *x;
const struct str_str *y;
x = to;
y = from;
x->key = cag_strdup(y->key);
if (!x->key)
return 0;
x->data = cag_strdup(y->data);
if (!x->data) {
free(x->key);
return 0;
}
return 1;
} | false | false | false | false | false | 0 |
do_sync_erase(struct ubi_device *ubi, int pnum)
{
int err, retries = 0;
struct erase_info ei;
wait_queue_head_t wq;
dbg_io("erase PEB %d", pnum);
ubi_assert(pnum >= 0 && pnum < ubi->peb_count);
if (ubi->ro_mode) {
ubi_err(ubi, "read-only mode");
return -EROFS;
}
retry:
init_waitqueue_head(&wq);
memset(&... | false | false | false | false | false | 0 |
ndmca_media_calculate_offsets (struct ndm_session *sess)
{
struct ndm_control_agent *ca = &sess->control_acb;
struct ndm_job_param * job = &ca->job;
int n_media = job->media_tab.n_media;
struct ndmmedia * me;
int i;
unsigned long long offset = 0;
for (i = 0; i < n_media; i++) {
me = &job->media_tab.media... | false | false | false | false | false | 0 |
embSignatureAlignSeqall(const EmbPSignature sig, AjPSeqall db,
ajuint n,
EmbPHitlist *hitlist, ajuint nterm)
{
ajint nhits = 0; /* Number of hits written to Hitlist object*/
ajuint hitcnt = 0; /* Counter of number of hits */
EmbPHit hit = NULL; /* The curre... | false | false | false | false | false | 0 |
dump(std::ostream &out) const
{
out << std::endl << "\tJPEG_DQT_Parameters:" << std::endl;
unsigned t;
for (t=0; t<nTables; ++t) {
out << "\t\t QuantizationTableElementPrecision = " << QuantizationTableElementPrecision[t] << std::endl;
out << "\t\t QuantizationTableIdentifier = " ... | false | false | false | false | false | 0 |
seqset_simplify(struct seqset *set)
{
int out = 0;
unsigned i;
/* nothing to simplify */
if (!set->len)
return;
/* Sort the ranges using our special comparator */
qsort(set->set, set->len, sizeof(struct seq_range), comp_coalesce);
/* Merge intersecting/adjacent ranges */
for (i = 1;... | false | false | false | false | false | 0 |
xbasename(char *path)
{
char *cp;
while ((cp = strrchr(path, '/')) && cp[1] == '\0')
*cp = '\0';
if (!cp) return path;
return cp + 1;
} | false | false | false | false | false | 0 |
get_fill_size(const fheap_test_param_t *tparam)
{
switch(tparam->fill) {
case FHEAP_TEST_FILL_LARGE:
return((size_t)(-1));
case FHEAP_TEST_FILL_SINGLE:
return((size_t)0);
case FHEAP_TEST_FILL_N:
default:
HDassert(0 && "Unknown bulk fill type?!?")... | false | false | false | false | false | 0 |
recurse_vec(const char *name, const struct frame *frame,
struct coord *res)
{
const struct vec *v;
if (!frame)
return 0;
for (v = frame->vecs; v; v = v->next)
if (v->name == name) {
*res = v->pos;
return 1;
}
return recurse_vec(name, frame->curr_parent, res);
} | false | false | false | false | false | 0 |
qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
{
/* no need to update area if we are just freeing the surface normally */
if (do_update_area)
qxl_update_surface(qdev, surf);
/* nuke the surface id at the hw */
qxl_hw_surface_dealloc(qdev, surf);
} | false | false | false | false | false | 0 |
wstr_n_from_c(const char *s, size_t length)
{
static char escapes[] = "\aa\bb\ff\nn\rr\tt\vv";
static wchar_t *buf;
static size_t bufmax;
size_t remainder;
const char *ip;
wchar_t *op;
/*
* Do the conversion "long hand". This is because some
* impleme... | false | false | false | false | true | 1 |
filter_view_context_item_to_entry(struct filter_view *fv, struct context_item *item)
{
if (item->items == NULL) {
gtk_entry_set_text(item->entry, "");
} else {
GString *s = g_string_new("");
size_t i;
for (i = 0; i < apol_vector_get_size(item->items); i++) {
char *t = apol_vector_get_element(item->items, i... | false | false | false | false | false | 0 |
disable_noname_group_capture(Node** root, regex_t* reg, ScanEnv* env)
{
int r, i, pos, counter;
BitStatusType loc;
GroupNumRemap* map;
map = (GroupNumRemap* )xalloca(sizeof(GroupNumRemap) * (env->num_mem + 1));
CHECK_NULL_RETURN_MEMERR(map);
for (i = 1; i <= env->num_mem; i++) {
map[i].new_val = 0;
}... | false | false | false | false | false | 0 |
reconfigure() {
Fluxbox *fluxbox = Fluxbox::instance();
focusedWinFrameTheme()->setAlpha(*resource.focused_alpha);
unfocusedWinFrameTheme()->setAlpha(*resource.unfocused_alpha);
m_menutheme->setAlpha(*resource.menu_alpha);
clampMenuDelay(*resource.menu_delay);
m_menutheme->setDelay(*resource.... | false | false | false | false | false | 0 |
ExecuteTextPropertyModifiedEvent(vtkObject* object,
unsigned long enumEvent, void*)
{
if(!object || enumEvent != vtkCommand::ModifiedEvent)
{
return;
}
vtkTextProperty* tp = vtkTextProperty::SafeDownCast(object);
if(!tp)
{
return;
}
this->CheckTextBoundary();
} | false | false | false | false | false | 0 |
removeItem()
{
if (!d->m_ui->categoryTreeView->selectionModel()->hasSelection())
return;
QModelIndexList list1 = d->m_ui->categoryTreeView->selectionModel()->selectedIndexes();
if (!list1.count())
return;
QList<QPersistentModelIndex> list2;
QString names;
QModelIndex last;
forea... | false | false | false | false | false | 0 |
bfa_flash_update_part(struct bfa_flash_s *flash, enum bfa_flash_part_type type,
u8 instance, void *buf, u32 len, u32 offset,
bfa_cb_flash_t cbfn, void *cbarg)
{
bfa_trc(flash, BFI_FLASH_H2I_WRITE_REQ);
bfa_trc(flash, type);
bfa_trc(flash, instance);
bfa_trc(flash, len);
bfa_trc(flash, offset);
if (!bfa_ioc_i... | false | false | false | false | false | 0 |
OptimizeOnceStoredGlobal(GlobalVariable *GV, Value *StoredOnceVal,
Module::global_iterator &GVI,
TargetData *TD) {
// Ignore no-op GEPs and bitcasts.
StoredOnceVal = StoredOnceVal->stripPointerCasts();
// If we are dealing with a pointer g... | false | false | false | false | false | 0 |
xmsgsource_check(
GSource *source)
{
XMsgSource *xms = (XMsgSource *)source;
return xms->xfer && g_async_queue_length(xms->xfer->queue) > 0;
} | false | false | false | false | false | 0 |
beh_delbereg (listbereg, ptbereg, mode)
struct bereg *listbereg; /* list of bereg containing the object */
struct bereg *ptbereg; /* pointer of the BEREG to be deleted */
char mode; /* recursive delete or not (Y or N) */
{
struct bereg headreg;
struct bereg *ptlastreg;
if ((listbereg != NULL) && ... | false | false | false | false | false | 0 |
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
if (!battery_config) return 0;
if (cfdata->show_alert)
{
_ensure_alert_time(cfdata);
battery_config->alert = cfdata->alert_time;
battery_config->alert_p = cfdata->alert_percent;
#ifdef HAVE_ENOTIFY
... | false | false | false | false | false | 0 |
insert(std::string n, std::string exec, BaseMenu *sub, int func)
{
BaseMenuItem *item = new BaseMenuItem();
const char* temp = exec.c_str();
if(temp[0] == '~')
{
std::string exec_temp = getenv("HOME");
exec_temp += temp;
exec = temp;
}
item->exec = exec;
item->name = n;
item->is_selected=False;
ite... | false | false | false | false | false | 0 |
evas_object_table_iterator_new(const Evas_Object *o)
{
Evas_Object_Table_Iterator *it;
EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
if (!priv->children) return NULL;
it = calloc(1, sizeof(Evas_Object_Table_Iterator));
if (!it) return NULL;
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERA... | false | false | false | false | false | 0 |
visit(alu_packed_node& n, bool enter) {
if (enter) {
indent();
dump_flags(n);
dump_op(n, n.op_ptr()->name);
sblog << " ";
dump_live_values(n, true);
++level;
} else {
--level;
if (!n.live_after.empty()) {
indent();
dump_live_values(n, false);
}
}
// proccess children only if their src/dst... | false | false | false | false | false | 0 |
fs_raw_conference_dispose (GObject * object)
{
FsRawConference *self = FS_RAW_CONFERENCE (object);
GList *item;
if (self->priv->disposed)
return;
for (item = g_list_first (self->priv->participants);
item;
item = g_list_next (item))
g_object_weak_unref (G_OBJECT (item->data), _remove_part... | false | false | false | false | false | 0 |
my_quit (void)
{
CWINDOW *win = CWINDOW_Main;
gApplication::suspendEvents(false);
if (win)
{
while (gtk_events_pending ()) gtk_main_iteration();
if (win->ob.widget) ((gMainWindow*)win->ob.widget)->destroy();
while (gtk_events_pending ()) gtk_main_iteration();
}
} | false | false | false | false | false | 0 |
H5F_get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_list, hbool_t app_ref, size_t *obj_id_count_ptr)
{
size_t obj_id_count=0; /* Number of open IDs */
H5F_olist_t olist; /* Structure to hold search results */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_... | false | false | false | false | false | 0 |
check_array_access_stm(Statement *stm_head, Operand *arg)
{
Statement *s;
Quadruple *qr;
Boolean has_array_access;
for (s = stm_head; s != NULL; s = s->next) {
for (qr = search_temp_qr(arg, s->qr_head);
qr != NULL;
qr = search_temp_qr(arg, qr->next)) {
switch (qr->ope) {
case OPE... | false | false | false | false | false | 0 |
unity_internal_utils_async_once_notify_all (UnityInternalUtilsAsyncOnce* self) {
UnityInternalUtilsDelegateWrapper** _tmp0_ = NULL;
gint _tmp0__length1 = 0;
UnityInternalUtilsDelegateWrapper** _tmp3_ = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->callbacks;
_tmp0__length1 = self->priv->callbacks_le... | false | false | false | false | false | 0 |
DB_StringUnify (char *pmod, char *pstr)
{
int uni;
if (*pmod == '\0')
return (*pstr == '\0');
if ( *pmod == *pstr
|| (*pmod == '?' && *pstr != '\0')
)
return (DB_StringUnify (pmod + 1, pstr + 1));
if (*pmod == '*') {
if ( *(pmod + 1) == '\0' )
return (OFTrue);
whil... | false | false | false | false | false | 0 |
nfs3svc_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, inode_t *inode,
struct iatt *buf, struct iatt *preparent,
struct iatt *postparent)
{
nfsstat3 stat = NFS3ERR_SERVERFAULT;
... | false | false | false | false | false | 0 |
can_use_analyze_subscript_affine_affine (tree *chrec_a, tree *chrec_b)
{
tree diff, type, left_a, left_b, right_b;
if (chrec_contains_symbols (CHREC_RIGHT (*chrec_a))
|| chrec_contains_symbols (CHREC_RIGHT (*chrec_b)))
/* FIXME: For the moment not handled. Might be refined later. */
return false;
... | false | false | false | false | false | 0 |
rflGetFileName(
FLMUINT uiDbVersion,
const char * pszDbName,
const char * pszRflDir,
FLMUINT uiFileNum,
char * pszRflFileName)
{
RCODE rc = FERR_OK;
char szDbPrefix[ F_FILENAME_SIZE];
char szBaseName[ F_FILENAME_SIZE];
// Get the full RFL file name.
if (RC_BAD( rc = rflGetDirAndPrefix( uiDbVersi... | false | false | false | false | false | 0 |
think_capture()
{
if( is_attack_camp ) // if this camp has been assigned to an attack mission already
return;
int targetTownRecno = think_capture_target_town();
if( !targetTownRecno )
return;
//----- if the target town is a nation town -----//
Town* targetTown = town_array[targetTownRecno];
Nation* ownNa... | false | false | false | false | true | 1 |
pmcraid_bist_done(struct pmcraid_cmd *cmd)
{
struct pmcraid_instance *pinstance = cmd->drv_inst;
unsigned long lock_flags;
int rc;
u16 pci_reg;
rc = pci_read_config_word(pinstance->pdev, PCI_COMMAND, &pci_reg);
/* If PCI config space can't be accessed wait for another two secs */
if ((rc != PCIBIOS_SUCCESSFUL ... | false | false | false | false | false | 0 |
isolderthan(char *a, char *b)
{
Dir ad, bd;
if(localstat(a, &ad)<0)
return(0);
if(localstat(b, &bd)<0)
return(0);
return ad.mtime > bd.mtime;
} | false | false | false | false | false | 0 |
dialogToParams() const
{
InsetCommandParams params(insetCode());
params["target"] = qstring_to_ucs4(targetED->text());
params["name"] = qstring_to_ucs4(nameED->text());
if (webRB->isChecked())
params["type"] = qstring_to_ucs4("");
else if (emailRB->isChecked())
params["type"] = qstring_to_ucs4("mailto:");
el... | false | false | false | false | false | 0 |
isRealUrl(const string& s) {
unsigned l = findLabelColon(s);
return l > 0 && s.length() >= l + 3 && s[l + 1] == '/' && s[l + 2] == '/';
} | false | false | false | false | false | 0 |
filterlang(char *d, const char *s)
{
if(strlen(s) == 2)
{
loopi(2) d[i] = tolower(s[i]);
d[2] = '\0';
if(islower(d[0]) && islower(d[1])) return;
}
*d = '\0';
} | false | false | false | false | false | 0 |
mov_write_string_data_tag(ByteIOContext *pb, const char *data, int lang, int long_style)
{
if(long_style){
int64_t pos = url_ftell(pb);
put_be32(pb, 0); /* size */
put_tag(pb, "data");
put_be32(pb, 1);
put_be32(pb, 0);
put_buffer(pb, data, strlen(data));
retur... | false | false | false | false | false | 0 |
FstabStorageAccess(Solid::Backends::Fstab::FstabDevice *device) :
QObject(device),
m_fstabDevice(device)
{
QStringList currentMountPoints = FstabHandling::currentMountPoints(device->device());
if (currentMountPoints.isEmpty()) {
QStringList mountPoints = FstabHandling::mountPoints(device->device... | false | false | false | false | false | 0 |
throwspell()
{
coord cc;
if (u.uinwater) {
pline("You're joking! In this weather?"); return 0;
} else if (Is_waterlevel(&u.uz)) {
You("had better wait for the sun to come out."); return 0;
}
pline("Where do you want to cast the spell?");
cc.x = u.ux;
cc.y = u.uy;
if (getpos(&cc, TRUE, "the desired p... | false | false | false | false | false | 0 |
internalResume()
{
m_internalSuspended = false;
if ( m_slave && !suspended )
m_slave->resume();
} | false | false | false | false | false | 0 |
append(struct message *mp)
{
if (msgCount + 1 >= msgspace)
message = srealloc(message, (msgspace += 64) * sizeof *message);
if (msgCount > 0)
message[msgCount - 1] = *mp;
} | false | false | false | true | false | 1 |
ngene_start_feed(struct dvb_demux_feed *dvbdmxfeed)
{
struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
struct ngene_channel *chan = dvbdmx->priv;
if (chan->users == 0) {
if (!chan->dev->cmd_timeout_workaround || !chan->running)
set_transfer(chan, 1);
}
return ++chan->users;
} | false | false | false | false | false | 0 |
ptaCopyRange(PTA *ptas,
l_int32 istart,
l_int32 iend)
{
l_int32 n, i, x, y;
PTA *ptad;
PROCNAME("ptaCopyRange");
if (!ptas)
return (PTA *)ERROR_PTR("ptas not defined", procName, NULL);
n = ptaGetCount(ptas);
if (istart < 0)
istart = 0;
if (istar... | false | false | false | false | false | 0 |
gtk_plot_dt_compare_nodes_xy_wise(gconstpointer a, gconstpointer b)
{
switch(gtk_plot_dt_compare_nodes_x_wise(a,b)) {
case -1:
return -1; break;
case 1:
return 1; break;
case 0:
switch(gtk_plot_dt_compare_nodes_y_wise(a,b)) {
case -1:
return -1; break;
case 1:
return 1; ... | false | false | false | false | false | 0 |
recomputeAllPoses(mrpt::aligned_containers<mrpt::poses::CPose3D>::vector_t & poses,
const mrpt::poses::CPose3D & pose0 )const
{
MRPT_UNUSED_PARAM(pose0);
const size_t N=m_links.size();
poses.resize(N+1);
CPose3D p = m_origin; // Cummulative pose
poses[0] = p;
for (size_t i=0;i<N;i++)
{
// Build the 3D po... | false | false | false | false | false | 0 |
vtkpow(long a, long b)
{
long a1 = a;
long b1 = b;
long c = 1;
while (b1 >= 1)
{
while ( ( b & 1 ) == 0)
{
b1 = b1 / 2;
a1 = a1 * a1;
}
b1 = b1 - 1;
c = c * a1;
}
return c;
} | false | false | false | false | false | 0 |
bfa_tskim_sm_active(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
{
bfa_trc(tskim->bfa, tskim->tsk_tag << 16 | event);
switch (event) {
case BFA_TSKIM_SM_DONE:
bfa_sm_set_state(tskim, bfa_tskim_sm_iocleanup);
bfa_tskim_cleanup_ios(tskim);
break;
case BFA_TSKIM_SM_CLEANUP:
bfa_sm_set_state(tskim, ... | false | false | false | false | false | 0 |
swarmActivity(const int S, const int D, const Position *const Xi, const int nb_eval, const int outlev)
{
int s, d;
double swarm_activity;
double position_dist[PSO_S_MAX]; // Euclidian distance of position and prev position
double diff; // just a helper variable for calculating the distance
//... | false | false | false | false | true | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.