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 |
|---|---|---|---|---|---|---|
cell_edited(GtkCellRendererText *cell,
gchar *path_string,
gchar *new_text,
struct w *widgets)
{
GtkTreeIter iter;
GtkTreePath *path=NULL;
int column = (int) g_object_get_data(G_OBJECT(cell), "column");
path = gtk_tree_path_new_from_string(path_string);
gtk_tree_model_get_ite... | false | false | false | false | false | 0 |
count_reflog_ent(unsigned char *osha1, unsigned char *nsha1,
const char *email, unsigned long timestamp, int tz,
const char *message, void *cb_data)
{
struct cmd_reflog_expire_cb *cb = cb_data;
if (!cb->expire_total || timestamp < cb->expire_total)
cb->recno++;
return 0;
} | false | false | false | false | false | 0 |
_e2_output_clear_action (gpointer from, E2_ActionRuntime *art)
{
#ifdef E2_TABS_DETACH
_e2_output_clear_buffer (&app.tab);
#else
// gdk_threads_enter ();
//order of things here is to handle clearing when the text buffer is being added to
GtkTextTagTable *table = gtk_text_buffer_get_tag_table (app.tab.buffer);
GtkTe... | false | false | false | false | false | 0 |
cavan_usb_bluk_rw(struct cavan_usb_descriptor *desc, void *buff, size_t length, int read)
{
int ret;
struct usbdevfs_urb *urb;
pthread_cond_t *notify;
int fd = desc->fd;
pthread_mutex_t *lock = &desc->lock;
if (read)
{
urb = &desc->urb_read;
notify = &desc->notify_read;
}
else
{
urb = &desc->urb_write;... | false | true | false | false | true | 1 |
free_translation(struct ast_channel *clonechan)
{
if (ast_channel_writetrans(clonechan))
ast_translator_free_path(ast_channel_writetrans(clonechan));
if (ast_channel_readtrans(clonechan))
ast_translator_free_path(ast_channel_readtrans(clonechan));
ast_channel_writetrans_set(clonechan, NULL);
ast_channel_readtra... | false | false | false | false | false | 0 |
OnShake() {
LOG(INFO) << ">>>>> SHAKE <<<<< >>>>> SHAKE <<<<< >>>>> SHAKE <<<<<";
std::vector<Port*> ports;
std::vector<Connection*> connections;
for (size_t i = 0; i < ports_.size(); ++i) {
if (ports_[i].ready)
ports.push_back(ports_[i].port);
}
for (size_t i = 0; i < ports.size(); ++i) {
... | false | false | false | false | false | 0 |
ov51x_led_control(struct sd *sd, int on)
{
if (sd->invert_led)
on = !on;
switch (sd->bridge) {
/* OV511 has no LED control */
case BRIDGE_OV511PLUS:
reg_w(sd, R511_SYS_LED_CTL, on);
break;
case BRIDGE_OV518:
case BRIDGE_OV518PLUS:
reg_w_mask(sd, R518_GPIO_OUT, 0x02 * on, 0x02);
break;
case BRIDGE_OV51... | false | false | false | false | false | 0 |
recdef_lookup(GCfunc *fn)
{
if (fn->c.ffid < sizeof(recff_idmap)/sizeof(recff_idmap[0]))
return recff_idmap[fn->c.ffid];
else
return 0;
} | false | false | false | false | false | 0 |
cifs_stats_proc_write(struct file *file,
const char __user *buffer, size_t count, loff_t *ppos)
{
bool bv;
int rc;
struct list_head *tmp1, *tmp2, *tmp3;
struct TCP_Server_Info *server;
struct cifs_ses *ses;
struct cifs_tcon *tcon;
rc = kstrtobool_from_user(buffer, count, &bv);
if (rc == 0) {
#ifdef CONFIG_CI... | false | false | false | false | false | 0 |
icalcalendar_new_impl(void)
{
struct icalcalendar_impl* impl;
if ( ( impl = (struct icalcalendar_impl*)
malloc(sizeof(struct icalcalendar_impl))) == 0) {
icalerror_set_errno(ICAL_NEWFAILED_ERROR);
return 0;
}
return impl;
} | false | false | false | false | false | 0 |
vs_reset_owner(VNodeID owner_id)
{
unsigned int i;
for(i = 0; i < VSNodeStorage.node_length; i++)
if(VSNodeStorage.nodes[i] != NULL)
if(VSNodeStorage.nodes[i]->owner == owner_id)
VSNodeStorage.nodes[i]->owner = ~0;
} | false | false | false | false | false | 0 |
mousein(ButWin *win, int x, int y, ButSet *butset) {
static But *but;
assert(MAGIC(win));
if (win->lock) {
butset->dynamic = FALSE;
butset->numButs = 1;
butset->buts = &but;
but = win->lock;
} else
butWin_findButSet(win, x, y, butset);
} | false | false | false | false | false | 0 |
take( const Meta::AlbumPtr album )
{
for( int i = 0, end = this->size(); i < end; ++i )
{
const CoverFetchUnit::Ptr unit = m_queue.at( i );
if( unit->album() == album )
{
m_queue.removeAt( i );
return unit;
}
}
// need to test if album exists with ... | false | false | false | false | false | 0 |
config_parse_symbol(CONFIG_REC *rec, CONFIG_NODE *node)
{
CONFIG_NODE *newnode;
GTokenType last_char;
int print_warning;
char *key;
g_return_val_if_fail(rec != NULL, G_TOKEN_ERROR);
g_return_val_if_fail(node != NULL, G_TOKEN_ERROR);
config_parse_get_token(rec->scanner, node);
last_char = (GTokenType) (node->... | false | false | false | false | false | 0 |
matchGlyphClasses(const le_uint16 *classArray, le_uint16 glyphCount,
GlyphIterator *glyphIterator,
const ClassDefinitionTable *classDefinitionTable,
le_bool backtrack)
{
le_in... | false | false | false | false | true | 1 |
dump(orbOptions::sequenceString& result) {
CORBA::String_var kv;
CORBA::ULong l;
const char* format = "unixTransportPermission = %4o";
l = strlen(format) + 10;
kv = CORBA::string_alloc(l);
sprintf(kv,format,orbParameters::unixTransportPermission);
l = result.length();
result.length(l... | false | false | false | false | false | 0 |
trecurse (const void *vroot, __action_fn_t action, int level)
{
const_node root = (const_node) vroot;
if (root->left == NULL && root->right == NULL)
(*action) (root, leaf, level);
else
{
(*action) (root, preorder, level);
if (root->left != NULL)
trecurse (root->left, action, level + 1);
... | false | false | false | false | false | 0 |
replace_caller_series (int targ, int src, DATASET *dset)
{
int t;
/* replace data values */
for (t=dset->t1; t<=dset->t2; t++) {
dset->Z[targ][t] = dset->Z[src][t];
}
/* replace variable info? */
series_set_label(dset, targ, series_get_label(dset, src));
series_set_display_name(dset, targ... | false | false | false | false | false | 0 |
AreaPick(double x0, double y0, double x1, double y1,
vtkRenderer *renderer)
{
this->Initialize();
this->X0 = x0;
this->Y0 = y0;
this->X1 = x1;
this->Y1 = y1;
if (renderer)
{
this->Renderer = renderer;
}
this->SelectionPoint[0] = (this->X0+this->X1)*0.5;
this->Se... | false | false | false | false | false | 0 |
lpfc_debug_save_data(struct lpfc_hba *phba, struct scsi_cmnd *cmnd)
{
void *src, *dst;
struct scatterlist *sgde = scsi_sglist(cmnd);
if (!_dump_buf_data) {
lpfc_printf_log(phba, KERN_ERR, LOG_BG,
"9050 BLKGRD: ERROR %s _dump_buf_data is NULL\n",
__func__);
return;
}
if (!sgde) {
lpfc_printf_log(phb... | false | true | false | false | false | 1 |
OutHeader(guint value, guint bytes) {
unsigned char str[4];
register guint k;
register int is = 4 - bytes;
for (k=0; k<bytes; k++)
str[k] = (value << 8*(is + k)) >> 24;
(void)fwrite(str, sizeof(unsigned char), bytes, output);
} | false | false | false | false | false | 0 |
rsa2_verifysig(void *key, char *sig, int siglen,
char *data, int datalen)
{
struct RSAKey *rsa = (struct RSAKey *) key;
Bignum in, out;
char *p;
int slen;
int bytes, i, j, ret;
unsigned char hash[20];
getstring(&sig, &siglen, &p, &slen);
if (!p || slen != 7 || memcmp(p, "ssh-rsa", ... | true | true | false | false | false | 1 |
pppoe_server_free(struct pppoe_serv_t *serv)
{
struct delayed_pado_t *pado;
pthread_rwlock_wrlock(&serv_lock);
list_del(&serv->entry);
pthread_rwlock_unlock(&serv_lock);
while (!list_empty(&serv->pado_list)) {
pado = list_entry(serv->pado_list.next, typeof(*pado), entry);
free_delayed_pado(pado);
}
triton... | false | false | false | false | false | 0 |
ecs_tab_int__trie_et_renvoie(const ecs_tab_int_t this_vect,
ecs_tab_int_t vect_renum)
{
size_t ival;
ecs_tab_int_t vect_trie;
/*xxxxxxxxxxxxxxxxxxxxxxxxxxx Instructions xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
for (ival = 0; ival < this_vect.nbr; ival++)
vect_renum.val... | false | false | false | false | false | 0 |
peak_play (ao_instance_t * _instance, int flags, sample_t * samples)
{
peak_instance_t * instance = (peak_instance_t *) _instance;
int i;
(void)flags;
for (i = 0; i < 256 * 2; i++) {
#ifdef LIBDCA_FIXED
float f = fabs (samples[i] * (1.0 / (1 << 30)));
#else
float f = fabs (samples[i]);
#endif
if (i... | false | false | false | false | false | 0 |
lcdm001_get_key (Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
char in = '\0';
const char *key = NULL;
read(p->fd, &in, 1);
if (in == p->pause_key) {
key = "Enter";
} else if (in == p->back_key) {
key = "Left";
} else if (in == p->forward_key) {
key = "Right";
} else if (in == p->main... | false | false | false | false | false | 0 |
Farrele()
{
truc *ptr;
truc obj;
byte *cptr;
long index;
int flg;
flg = arrindex(argStkPtr-1,&index);
switch(flg) {
case fVECTOR:
ptr = vectele(argStkPtr-1,index);
if(ptr)
return(*ptr);
else
return(brkerr());
case fSTRING:
case fBY... | false | false | false | false | false | 0 |
sizeHint( Qt::SizeHint which, const QSizeF & constraint ) const
{
if( m_fixedAdd )
// return QSizeF( m_icon->size().width() + 2 * m_iconPadding, QGraphicsWidget::sizeHint( which,constraint
//).height() );
return QGraphicsWidget::sizeHint(which, constraint);
else
if( which == Qt::MinimumSi... | false | false | false | false | false | 0 |
gst_mss_stream_get_fragment_url (GstMssStream * stream, gchar ** url)
{
gchar *tmp;
gchar *start_time_str;
GstMssStreamFragment *fragment;
GstMssStreamQuality *quality = stream->current_quality->data;
g_return_val_if_fail (stream->active, GST_FLOW_ERROR);
if (stream->current_fragment == NULL) /* stream is... | false | false | false | false | false | 0 |
close()
{
if(m_isDatabaseOpen) {
QSqlDatabase database = QSqlDatabase::database(m_connectionName, false);
if (database.isValid()){
if(database.isOpen()) {
database.close();
m_isDatabaseOpen = false;
return true;
}
} else... | false | false | false | false | false | 0 |
maker_asahi_tagname(unsigned short tag,int model)
{
char *tagname = (char *)0;
int noteversion = 0;
/* Should have to do this only once, and only for unrecognized */
/* models. If the model is recognized (or the user has forced a */
/* noteversion) noteversion will already be set. ... | false | false | false | false | false | 0 |
memcg_init_list_lru_node(struct list_lru_node *nlru)
{
int size = memcg_nr_cache_ids;
nlru->memcg_lrus = kmalloc(size * sizeof(void *), GFP_KERNEL);
if (!nlru->memcg_lrus)
return -ENOMEM;
if (__memcg_init_list_lru_node(nlru->memcg_lrus, 0, size)) {
kfree(nlru->memcg_lrus);
return -ENOMEM;
}
return 0;
} | false | false | false | false | false | 0 |
GetXLogRecPtrForTemp(void)
{
static XLogRecPtr counter = {0, 1};
counter.xrecoff++;
if (counter.xrecoff == 0)
{
counter.xlogid++;
counter.xrecoff++;
}
return counter;
} | false | false | false | false | false | 0 |
read(SWFStream& in)
{
in.ensureBytes(1);
boost::uint8_t count = in.read_u8(); // How many colorings.
in.ensureBytes(count*5 + 8 + 8 + 2 + 1);
m_colors.reserve(count);
m_alphas.reserve(count);
m_ratios.reserve(count);
for (int i = 0; i < count; ++i)
{
m_colors.push_back(in.read_... | false | false | false | false | false | 0 |
pdf_next_widget(fz_widget *previous)
{
pdf_annot *annot = (pdf_annot *)previous;
if (annot)
annot = annot->next;
while (annot && annot->type == FZ_WIDGET_TYPE_NOT_WIDGET)
annot = annot->next;
return (fz_widget *)annot;
} | false | false | false | false | false | 0 |
rtarea_wput (uaecptr addr, uae_u32 value)
{
#ifdef JIT
special_mem |= S_WRITE;
#endif
addr &= 0xffff;
if (addr < RTAREA_WRITEOFFSET)
return;
rtarea_bput (addr, value >> 8);
rtarea_bput (addr + 1, value & 0xff);
} | false | false | false | false | false | 0 |
cogorc_convert_UYVY_Y444 (guint8 * ORC_RESTRICT d1, int d1_stride, guint8 * ORC_RESTRICT d2, int d2_stride, guint8 * ORC_RESTRICT d3, int d3_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func... | false | false | false | false | false | 0 |
addCuts(OsiCuts & cs, OsiRowCut ** whichRow,int iPass)
{
int numberCuts=cs.sizeRowCuts();
int i ;
if (numberCuts_<nRows_) {
if ((iPass&1)==1) {
for (i=0;i<numberCuts_;i++) {
cs.insert(*rowCut_[i]);
if (whichRow) {
int iRow= rowCut_[i]->whichRow();
if (iRow>=0&&!whichRow[iRow])
... | false | false | false | false | false | 0 |
bitcount(const algo_t * that)
{
int rc;
if (that->gfc->mode_gr == 2) {
rc = scale_bitcount(that->cod_info);
}
else {
rc = scale_bitcount_lsf(that->gfc, that->cod_info);
}
if (rc == 0) {
return;
}
/* this should not happen due to the way the scalefactors are ... | false | false | false | false | false | 0 |
ario_server_preferences_sync_server (ArioServerPreferences *server_preferences)
{
ARIO_LOG_FUNCTION_START;
int crossfadetime;
int state;
gboolean updating;
long last_update;
gchar *last_update_char;
GtkTreeIter iter;
GSList *tmp;
ArioServerOutput *... | false | false | false | false | false | 0 |
cb_button_release(GtkWidget *widget,
GdkEventButton *event,
gpointer data)
{
if (WEJPSCROLLER(data)->scroll_delay > 0)
WEJPSCROLLER(data)->scroll = TRUE;
return TRUE;
} | false | false | false | false | false | 0 |
b43_nphy_tables_init_rev7_volatile(struct b43_wldev *dev)
{
struct ssb_sprom *sprom = dev->dev->bus_sprom;
u8 antswlut;
int core, offset, i;
const int antswlut0_offsets[] = { 0, 4, 8, }; /* Offsets for values */
const u8 antswlut0_values[][3] = {
{ 0x2, 0x12, 0x8 }, /* Core 0 */
{ 0x2, 0x18, 0x2 }, /* Core 1 ... | false | false | false | false | false | 0 |
postUpdate(int /*index*/, bool geoToo)
{
if (geoToo) {
layoutDirty = true;
q->updateGeometry();
}
q->update();
} | false | false | false | false | false | 0 |
borg_delete_kill(int i)
{
borg_kill *kill = &borg_kills[i];
/* Paranoia -- Already wiped */
if (!kill->r_idx) return;
/* Note */
borg_note(format("# Forgetting a monster '%s' at (%d,%d)",
(r_info[kill->r_idx].name),
kill->y, kill->x));
/* Clear goals ... | false | false | false | false | false | 0 |
civ_population(const struct player *pplayer)
{
int ppl=0;
city_list_iterate(pplayer->cities, pcity)
ppl+=city_population(pcity);
city_list_iterate_end;
return ppl;
} | false | false | false | false | false | 0 |
script_erase_input (const zchar *buf)
{
int width;
int i;
for (i = 0, width = 0; buf[i] != 0; i++)
width++;
fseek (sfp, -width, SEEK_CUR); script_width -= width;
} | false | false | false | false | false | 0 |
vtkMINCImageWriterCreateIdentString()
{
// A static counter for this process.
static int identx = 1;
// The separator between element.
static const char *itemsep = ":";
// Get username and hostname
const char *username = 0;
const char *hostname = 0;
#ifdef _WIN32
char usernametext[100];
DWORD numcha... | false | false | false | false | false | 0 |
gsf_open_pkg_lookup_rel_by_id (GsfInput *opkg, char const *id)
{
GsfOpenPkgRels *rels = gsf_open_pkg_get_rels (opkg);
return rels ? g_hash_table_lookup (rels->by_id, id) : NULL;
} | false | false | false | false | false | 0 |
cuddReclaim(
DdManager * table,
DdNode * n)
{
DdNode *N;
int ord;
DdNodePtr *stack = table->stack;
int SP = 1;
double initialDead = table->dead;
N = Cudd_Regular(n);
#ifdef DD_DEBUG
assert(N->ref == 0);
#endif
do {
if (N->ref == 0) {
N->ref = 1;
table->dead--;
if (... | false | false | false | false | false | 0 |
test_ser_nr_Caemtables_destroy (void)
{
struct yytbl_dmap *dmap=0;
if(!0){
/* Walk the dmap, freeing the pointers */
for(dmap=yydmap; dmap->dm_id; dmap++) {
void * v;
v = dmap->dm_arr;
if(v && *(char**)v){
test_ser_nr_Caemfree(*(char**)... | false | false | false | false | false | 0 |
HandleGameObjectRemove(GameObject* go)
{
// save capture point slider value (negative value if locked)
if (go->GetGOInfo()->type == GAMEOBJECT_TYPE_CAPTURE_POINT)
{
CapturePointSlider value(go->GetCapturePointSliderValue(), go->getLootState() != GO_ACTIVATED);
sOutdoorPvPMgr.SetCapturePointS... | false | false | false | false | false | 0 |
get_aa_value(int str)
{
int stones[MAX_BOARD * MAX_BOARD];
int k;
int num_stones = findstones(str, MAX_BOARD * MAX_BOARD, stones);
int value = 0;
for (k = 0; k < num_stones; k++)
value += aa_values[stones[k]];
return value;
} | false | false | false | false | false | 0 |
find_vertex(graph *g, int x, int y){
vertex *v = g->verticies;
vertex *match = 0;
while(v){
vertex *next=v->next;
int xd=x-v->x;
int yd=y-v->y;
if(xd*xd + yd*yd <= V_RADIUS_SQ) match=v;
v=next;
}
return match;
} | false | false | false | false | false | 0 |
iks_base64_encode(const char *buf, int len)
{
char *res, *save;
int k, t;
len = (len > 0) ? (len) : (iks_strlen(buf));
save = res = iks_malloc((len*8) / 6 + 4);
if (!save) return NULL;
for (k = 0; k < len/3; ++k) {
*res++ = base64_charset[*buf >> 2];
t = ((*buf & 0x03) << 4);
buf++;
*res++ = base64_char... | false | false | false | false | false | 0 |
operator=(const char * rhs)
{
// treat null string assignment as a clear
if (!rhs || !*rhs)
pimpl->clear();
else
pimpl->assign (rhs);
return *this;
} | false | false | false | false | false | 0 |
ping_end (void)
{
slurm_mutex_lock(&lock_mutex);
if (ping_count > 0)
ping_count--;
else
fatal ("ping_count < 0");
slurm_mutex_unlock(&lock_mutex);
} | false | false | false | false | false | 0 |
xauth_create(ike_sa_t *ike_sa, bool initiator)
{
private_xauth_t *this;
INIT(this,
.public = {
.task = {
.get_type = _get_type,
.migrate = _migrate,
.destroy = _destroy,
},
.queue_mode_config_push = _queue_mode_config_push,
},
.initiator = initiator,
.ike_sa = ike_sa,
.status = XAUTH_F... | false | false | false | false | false | 0 |
m(const Particle& pp1, const Particle& pp2) {
double m2 = pow2(pp1.e() + pp2.e()) - pow2(pp1.px() + pp2.px())
- pow2(pp1.py() + pp2.py()) - pow2(pp1.pz() + pp2.pz());
return (m2 > 0. ? sqrt(m2) : 0.);
} | false | false | false | false | false | 0 |
tokenGetUnicode(
const char * pszToken,
void ** ppvVal,
FLMUINT * puiValLen,
FLMUINT * puiValBufSize)
{
RCODE rc = FERR_OK;
FLMUINT uiLen = f_strlen( pszToken) + 1;
FLMUNICODE * puzTmp;
// Just make sure we have enough to cover the maximum number
// of unicode characters that could be created.
if( ... | false | false | false | false | false | 0 |
regcache_lzo_write(struct regmap *map,
unsigned int reg, unsigned int value)
{
struct regcache_lzo_ctx *lzo_block, **lzo_blocks;
int ret, blkindex, blkpos;
size_t blksize, tmp_dst_len;
void *tmp_dst;
/* index of the compressed lzo block */
blkindex = regcache_lzo_get_blkindex(map, reg);
/* register ind... | false | false | false | false | false | 0 |
close_pcsc_reader_wrapped (int slot)
{
long err;
reader_table_t slotp;
size_t len;
int i;
unsigned char msgbuf[9];
slotp = reader_table + slot;
if (slotp->pcsc.req_fd == -1
|| slotp->pcsc.rsp_fd == -1
|| slotp->pcsc.pid == (pid_t)(-1) )
{
log_error ("close_pcsc_reader: pcsc-wrapper... | false | false | false | false | false | 0 |
packbuf(char **buf,
int *blen,
int lcrlf) /* EOLs are local or CRLF */
{
register int i = 0;
register LINE *lp;
register int retval = 0;
register char *bufp;
register char *eobuf;
if(anycb() != FALSE){
lp = lforw(curbp->b_linep);
do{ /* how many chars? */
... | false | false | false | false | false | 0 |
EpdPow2(int n, EpDouble *epd)
{
if (n <= EPD_MAX_BIN) {
EpdConvert(pow((double)2.0, (double)n), epd);
} else {
EpDouble epd1, epd2;
int n1, n2;
n1 = n / 2;
n2 = n - n1;
EpdPow2(n1, &epd1);
EpdPow2(n2, &epd2);
EpdMultiply3(&epd1, &epd2, epd);
}
} | false | false | false | false | false | 0 |
eg_surf_minify(struct radeon_surface *surf,
struct radeon_surface_level *surflevel,
unsigned bpe,
unsigned level,
unsigned slice_pt,
unsigned mtilew,
unsigned... | false | false | false | false | false | 0 |
ajMartqueryDel(AjPMartquery *thys)
{
AjPMartquery pthis = NULL;
if(!thys)
return;
if(!*thys)
return;
pthis = *thys;
ajMartLocDel(&pthis->Loc);
ajMartDatasetDel(&pthis->Dataset);
ajMartAttributeDel(&pthis->Atts);
ajMartFilterDel(&pthis->Filters);
if(pthis->Config)... | false | false | false | false | false | 0 |
intel_sst_runtime_suspend(struct device *dev)
{
int ret = 0;
struct intel_sst_drv *ctx = dev_get_drvdata(dev);
if (ctx->sst_state == SST_RESET) {
dev_dbg(dev, "LPE is already in RESET state, No action\n");
return 0;
}
/* save fw context */
if (ctx->ops->save_dsp_context(ctx))
return -EBUSY;
/* Move the S... | false | false | false | false | false | 0 |
RequestUpdateExtent (
vtkInformation * vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
{
// get the info objects
vtkInformation* outInfo = outputVector->GetInformationObject(0);
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
if (this->FinalE... | false | false | false | false | false | 0 |
shortHtmlDescription() const
{
if (!_trContext.isEmpty())
return QApplication::translate(_trContext.toUtf8(), _descr.toUtf8());
return QApplication::translate(Trans::Constants::CONSTANTS_TR_CONTEXT, _descr.toUtf8());;
} | false | false | false | false | false | 0 |
cbf_free_getopt_handle(cbf_getopt_handle handle) {
void *memblock;
cbf_failnez( cbf_clear_getopt_handle(handle) )
memblock = (void *) handle;
if (handle) {
return cbf_free(&memblock, NULL);
}
... | false | false | false | false | false | 0 |
uninit_device_table_dma(void)
{
u32 devid;
for (devid = 0; devid <= amd_iommu_last_bdf; ++devid) {
amd_iommu_dev_table[devid].data[0] = 0ULL;
amd_iommu_dev_table[devid].data[1] = 0ULL;
}
} | false | false | false | false | false | 0 |
repetitions(const Board & board) const
{
int rep = 0;
for (std::list<GameEntry>::const_reverse_iterator it = entries.rbegin();
it != entries.rend(); it++) {
if (it->get_board() == board)
rep++;
}
return rep;
} | false | false | false | false | false | 0 |
BoundImage(gx_device_printer *pDev, struct bounding *pBox)
{
int x, y, flag;
int LineSize = gdev_mem_bytes_per_scan_line((gx_device *)pDev);
int Xsize, Ysize, Pt, Pb, Pl, Pr;
int Xres = (int)pDev->x_pixels_per_inch,
Yres = (int)pDev->y_pixels_per_inch,
hei... | false | false | false | false | false | 0 |
G_RunEntity (edict_t *ent)
{
if (ent->prethink)
ent->prethink (ent);
switch ( (int)ent->movetype)
{
case MOVETYPE_PUSH:
case MOVETYPE_STOP:
SV_Physics_Pusher (ent);
break;
case MOVETYPE_NONE:
SV_Physics_None (ent);
break;
case MOVETYPE_NOCLIP:
SV_Physics_Noclip (ent);
break;
case MOVETYPE_STEP:
... | false | false | false | false | false | 0 |
execute_command_line_and_wait_until_second_command_returns_success(const std::string& command, const std::string& second_command, const SlotProgress& slot_progress, const std::string& success_text)
{
#ifdef GLOM_SPAWN_DEBUG
std::cout << "debug: Command: " << command << std::endl;
#endif //GLOM_SPAWN_DEBUG
std:... | false | false | false | false | false | 0 |
flashWriteWord(u32 addr, u32 word) {
vu16 *flashAddr = (vu16 *)addr;
vu32 lhWord = (vu32)word & 0x0000FFFF;
vu32 hhWord = ((vu32)word & 0xFFFF0000) >> 16;
u32 rwmVal = GET_REG(FLASH_CR);
SET_REG(FLASH_CR, FLASH_CR_PG);
/* apparently we need not write to FLASH_AR and can
simply do a nati... | false | false | false | false | false | 0 |
factory( const QString &_name, QLibrary::LoadHints hint )
{
KLibrary* lib = library( _name, hint);
if ( !lib )
return 0;
KPluginFactory* fac = lib->factory();
if ( !fac ) {
kLibLoaderPrivate->errorString = errorString( ErrNoFactory );
return 0;
}
return fac;
} | false | false | false | false | false | 0 |
bend_process(void)
{
queue* elem, *tmp;
QUEUE_FOR_EACH(routes_orig, elem, tmp) {
route_head* route_orig = (route_head*)elem;
process_route_orig(route_orig);
}
} | false | false | false | false | false | 0 |
read_file_contents(const char *filename) {
int fd = open(filename, O_RDONLY);
if (fd == -1)
return lcdf::String();
lcdf::String text = read_file_contents(fd);
if (text.empty() && errno) {
int saved_errno = errno;
close(fd);
errno = saved_errno;
} else
close(... | false | false | false | false | false | 0 |
xstrdup(const char *str)
{
size_t siz,
rsiz;
char *result;
if (str == NULL) {
return NULL;
}
siz = strlen(str) + 1;
result = (char *)xmalloc(siz);
rsiz = strlcpy(result, str, siz);
xassert(rsiz == siz-1);
return result;
} | false | false | false | false | false | 0 |
lhLoadPage(lhash_kv_engine *pEngine,pgno pnum,lhpage *pMaster,lhpage **ppOut,int iNest)
{
unqlite_page *pRaw;
lhpage *pPage = 0; /* cc warning */
int rc;
/* Aquire the page from the pager first */
rc = pEngine->pIo->xGet(pEngine->pIo->pHandle,pnum,&pRaw);
if( rc != UNQLITE_OK ){
return rc;
}
if( pRaw->pUserDa... | false | false | false | false | false | 0 |
Connect(const char* host, const char* port) {
if (!IsValid()) {
return false;
}
// Lookup host and port.
struct addrinfo *result = NULL;
struct addrinfo hints;
memset(&hints, 0, sizeof(addrinfo));
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;
int s... | false | false | false | false | false | 0 |
openconnect_set_client_cert (struct openconnect_info *vpninfo, char *cert, char *sslkey)
{
vpninfo->cert = cert;
if (sslkey)
vpninfo->sslkey = sslkey;
else
vpninfo->sslkey = cert;
} | false | false | false | false | false | 0 |
hkl_sample_get_reflection_mesured_angle(HklSample const *self,
size_t idx1, size_t idx2)
{
if (!self
|| idx1 >= HKL_LIST_LEN(self->reflections)
|| idx2 >= HKL_LIST_LEN(self->reflections))
return GSL_NAN;
return hkl_vector_angle(&self->reflections[idx1]->_hkl,
&self->reflections[idx2]->_hk... | false | false | false | false | false | 0 |
slider_moved (GtkWidget *widget, gpointer data)
{
GtkSatModule *mod = GTK_SAT_MODULE (data);
if (mod->throttle) {
/* "press" the stop button to trigger a transition into manual mode */
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mod->tmgStop), TRUE);
}
tmg_time_set (widget, data);... | false | false | false | false | false | 0 |
UpdateAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
{
return;
}
if (m_creature->GetHealthPercent() <= m_fHealthCheck)
{
if (DoCastSpellIfCan(m_creature, SPELL_SHIELDWALL) == CAST_OK)
... | false | false | false | false | false | 0 |
format(std::string& result, const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6)
{
std::vector<Any> args;
args.push_back(value1);
args.push_back(value2);
args.push_back(value3);
args.push_back(value4);
args.push_back(value5);
ar... | false | false | false | false | false | 0 |
static_br_start (const char *element,
const char **attributes, gamgi_html *html)
{
int fileline;
/******************************************
* used only in error messages: file line *
* indicates where current element starts *
******************************************/
fileline = XML_GetCurrentLineNumber (html->m... | false | false | false | false | false | 0 |
find_module (handle, dir, libdir, dlname, old_name, installed)
lt_dlhandle *handle;
const char *dir;
const char *libdir;
const char *dlname;
const char *old_name;
int installed;
{
/* Try to open the old library first; if it was dlpreopened,
we want the preopened version of it, even ... | false | false | false | false | false | 0 |
ene_rx_enable_fan_input(struct ene_device *dev, bool enable)
{
if (!dev->hw_fan_input)
return;
if (!enable)
ene_write_reg(dev, ENE_FAN_AS_IN1, 0);
else {
ene_write_reg(dev, ENE_FAN_AS_IN1, ENE_FAN_AS_IN1_EN);
ene_write_reg(dev, ENE_FAN_AS_IN2, ENE_FAN_AS_IN2_EN);
}
} | false | false | false | false | false | 0 |
av_base64_decode(uint8_t *out, const char *in, int out_size)
{
int i, v;
uint8_t *dst = out;
v = 0;
for (i = 0; in[i] && in[i] != '='; i++) {
unsigned int index= in[i]-43;
if (index>=FF_ARRAY_ELEMS(map2) || map2[index] == 0xff)
return -1;
v = (v << 6) + map2[index];
... | false | false | false | false | true | 1 |
createAniso0_0(BSDF* bsdf)
{
const float aniso1 = 0.0;
const float aniso2 = 0.0;
Spectrum Ks(1);
MicrofacetDistribution* distribution =
BSDF_ALLOC(arena, Anisotropic(aniso1, aniso2));
Fresnel* fresnel = BSDF_ALLOC(arena, FresnelNoOp)();
BxDF* bxdf = BSDF_ALLOC(arena, Microfacet)(Ks, fres... | false | false | false | false | false | 0 |
vval_hasx(word32 *ap, word32 *bp, int32 blen)
{
register int32 wi;
for (wi = 0; wi < wlen_(blen); wi++)
{
if ((ap[wi] & bp[wi]) != 0L) return(TRUE);
}
return(FALSE);
} | false | false | false | false | false | 0 |
fini (xlator_t *this)
{
glusterd_conf_t *conf = NULL;
if (!this || !this->private)
goto out;
conf = this->private;
if (conf->pmap)
FREE (conf->pmap);
if (conf->handle)
glusterd_store_handle_destroy (conf->handle);
glusterd_... | false | false | false | false | false | 0 |
leftshift_onebit(unsigned char *input, unsigned char *output)
{
int i;
unsigned char overflow = 0;
for (i = BLOCK_SIZE - 1; i >= 0; i--) {
output[i] = input[i] << 1;
output[i] |= overflow;
overflow = (input[i] & 0x80) ? 1 : 0;
}
} | false | false | false | false | false | 0 |
R_InitSpriteLumps(void)
{
int i;
patch_t *patch;
firstspritelump = W_GetNumForName(DEH_String("S_START")) + 1;
lastspritelump = W_GetNumForName(DEH_String("S_END")) - 1;
numspritelumps = lastspritelump - firstspritelump + 1;
spritewidth = Z_Malloc(numspritelumps * sizeof(fixed_t), PU_STATIC, 0)... | false | false | false | false | false | 0 |
rtl_hw_start_8168cp_1(void *ioaddr, struct pci_device *pdev)
{
static struct ephy_info e_info_8168cp[] = {
{ 0x01, 0, 0x0001 },
{ 0x02, 0x0800, 0x1000 },
{ 0x03, 0, 0x0042 },
{ 0x06, 0x0080, 0x0000 },
{ 0x07, 0, 0x2000 }
};
DBGP ( "rtl_hw_start_8168cp_1\n" );
rtl_csi_access_enable(ioaddr);
rtl_ephy_in... | false | false | false | false | false | 0 |
can_scroll(Smart_Data *sd, int dir)
{
Evas_Coord mx = 0, my = 0, px = 0, py = 0, minx = 0, miny = 0;
sd->pan_func.max_get(sd->pan_obj, &mx, &my);
sd->pan_func.min_get(sd->pan_obj, &minx, &miny);
sd->pan_func.get(sd->pan_obj, &px, &py);
switch (dir)
{
case LEFT:
if (px > minx) return E... | false | false | false | false | false | 0 |
PyramidToTetra(const vtkIdType *pyramId,
const vtkIdType *cellIds,
vtkCellArray *newCellArray)
{
vtkIdType xmin;
unsigned int i,j,idpy;
vtkIdType tab[4];
// the table 'vpy' set 3 possibilities of the smallest index
// vertices{... | false | false | false | false | false | 0 |
unmarshalWChar(cdrStream& stream)
{
_CORBA_UShort tc;
_CORBA_Octet len = stream.unmarshalOctet();
_CORBA_Octet o;
switch (len) {
case 0:
tc = 0; // Evil but it might happen, I suppose
break;
case 1:
o = stream.unmarshalOctet();
tc = o;
break;
case 2:
{
_CORBA_Octet* p = (... | false | false | false | false | false | 0 |
mem_cgroup_iter_break(struct mem_cgroup *root,
struct mem_cgroup *prev)
{
if (!root)
root = root_mem_cgroup;
if (prev && prev != root)
css_put(&prev->css);
} | 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.