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 |
|---|---|---|---|---|---|---|
jacob_dexpeD_de(const CPose3D &D, Eigen::Matrix<double,12,6> & jacob)
{
jacob.block<9,3>(0,0).setZero();
jacob.block<3,3>(9,0).setIdentity();
for (int i=0;i<3;i++) {
Eigen::Block< Eigen::Matrix<double,12,6>,3,3,false> trg_blc = jacob.block<3,3>(3*i,3);
mrpt::math::skew_symmetric3_neg( D.m_ROT.block<3,1>(0,i), tr... | false | false | false | false | false | 0 |
copy(const Color &col_copy) {
if (!col_copy.isAllocated()) {
free();
setRGB(col_copy.red(), col_copy.green(), col_copy.blue());
setPixel(col_copy.pixel());
return;
}
free();
allocate(col_copy.red(),
col_copy.green(),
col_copy.blue(),
... | false | false | false | false | false | 0 |
faulthandler_dump_traceback_later(PyObject *self,
PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = {"timeout", "repeat", "file", "exit", NULL};
double timeout;
PY_TIMEOUT_T timeout_us;
int repeat = 0;
PyObject *file = NULL;
int fd;
int exit = 0;
... | false | false | false | false | false | 0 |
rtnl_rtntype_a2n(int *id, char *arg)
{
char *end;
unsigned long res;
if (strcmp(arg, "local") == 0)
res = RTN_LOCAL;
else if (strcmp(arg, "nat") == 0)
res = RTN_NAT;
else if (matches(arg, "broadcast") == 0 ||
strcmp(arg, "brd") == 0)
res = RTN_BROADCAST;
else if (matches(arg, "anycast") == 0)
res = RT... | false | false | false | false | false | 0 |
write(WriteStream & os) const
{
if (!os.latex() || os.lockedMode()) {
os << (os.asciiOnly() ? escape(str_) : str_);
return;
}
docstring::const_iterator cit = str_.begin();
docstring::const_iterator end = str_.end();
// We may already be inside an \ensuremath command.
bool in_forced_mode = os.pendingBrace();... | false | false | false | false | false | 0 |
rls_lock_get(LOCK *lock, LOCKTYPE type)
{
if (loglevel > 2)
logit(LOG_DEBUG, "rls_lock_get: %X %s", lock,
type == readlock ? "readlock" : "writelock");
globus_mutex_lock(&lock->mtx);
if (type == readlock) {
while (lock->writer)
globus_cond_wait(&lock->cond, &lock->mtx);
lock->readers++;
... | false | false | false | false | false | 0 |
gem_mdc_clk_div(struct macb *bp)
{
u32 config;
unsigned long pclk_hz = clk_get_rate(bp->pclk);
if (pclk_hz <= 20000000)
config = GEM_BF(CLK, GEM_CLK_DIV8);
else if (pclk_hz <= 40000000)
config = GEM_BF(CLK, GEM_CLK_DIV16);
else if (pclk_hz <= 80000000)
config = GEM_BF(CLK, GEM_CLK_DIV32);
else if (pclk_hz ... | false | false | false | false | false | 0 |
isCacheFileNewer(const char *filename)
{
size_t len = 0;
try {
len = getFileLength(filename);
}
catch (std::runtime_error &e)
{
if (!is_daemonised) {
std::cerr << "Error reading file " << filename << ": " << e.what() << std::endl;
}
syslog(LOG_ERR, "Error reading file %s: %s", filename, e.what());
ret... | false | false | false | false | false | 0 |
ahd_find_syncrate(struct ahd_softc *ahd, u_int *period,
u_int *ppr_options, u_int maxsync)
{
if (*period < maxsync)
*period = maxsync;
if ((*ppr_options & MSG_EXT_PPR_DT_REQ) != 0
&& *period > AHD_SYNCRATE_MIN_DT)
*ppr_options &= ~MSG_EXT_PPR_DT_REQ;
if (*period > AHD_SYNCRATE_MIN)
*period = 0;
/* ... | false | false | false | false | false | 0 |
gsql_editor_class_init (GSQLEditorClass *klass)
{
GSQL_TRACE_FUNC;
GObjectClass *obj_class = G_OBJECT_CLASS (klass);
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
gtkobject_class->destroy = ... | false | false | false | false | false | 0 |
gst_discoverer_set_timeout (GstDiscoverer * dc, GstClockTime timeout)
{
GST_DEBUG_OBJECT (dc, "timeout : %" GST_TIME_FORMAT, GST_TIME_ARGS (timeout));
/* FIXME : update current pending timeout if we're running */
DISCO_LOCK (dc);
dc->priv->timeout = timeout;
DISCO_UNLOCK (dc);
} | false | false | false | false | false | 0 |
valid_pmbr(struct fdisk_context *cxt)
{
int i, part = 0, ret = 0; /* invalid by default */
struct gpt_legacy_mbr *pmbr = NULL;
uint32_t sz_lba = 0;
if (!cxt->firstsector)
goto done;
pmbr = (struct gpt_legacy_mbr *) cxt->firstsector;
if (le16_to_cpu(pmbr->signature) != MSDOS_MBR_SIGNATURE)
goto done;
/* s... | false | false | false | false | false | 0 |
_queue_remove(Evas_Object *obj, E_Widget_Queue_Item *qi, int del)
{
E_Widget_Data *wd;
wd = e_widget_data_get(obj);
if (!wd) return;
wd->queue.queue = eina_list_remove(wd->queue.queue, qi);
if (del)
{
if (qi->icon) evas_object_del(qi->icon);
if (qi->end) evas_object_del(qi->end);
... | false | false | false | false | false | 0 |
catalog_update(JCR *jcr, BSOCK *bs)
{
if (!jcr->pool->catalog_files) {
return; /* user disabled cataloging */
}
if (jcr->is_job_canceled()) {
goto bail_out;
}
if (!jcr->db) {
POOLMEM *omsg = get_memory(bs->msglen+1);
pm_strcpy(omsg, bs->msg);
bs->fsen... | false | false | false | false | false | 0 |
compileExpr6(void){
TKVMExprCode_base *l=compileExpr7();
if (!l) return NULL;
while(true){
lexer->skipWS();
Token token=lexer->next(ID_MODE);
if (token.str=="+"){
TKVMExprCode_base *r=compileExpr7();
if (!r) { lexer->error(RC.S(ERR_COMPILER_PARSE_ERROR_AFTER)+"'+'"); return l; }
l=new TKVMExprCodePLUS... | false | false | false | false | false | 0 |
capture_build_camp(int townRecno, int raceId)
{
Town* captureTown = town_array[townRecno];
//---- find the best available general for the capturing action ---//
int targetResistance;
int unitRecno = find_best_capturer(townRecno, raceId, targetResistance);
if( !unitRecno )
unitRecno = hire_best_capturer(townR... | false | false | false | false | false | 0 |
gen_aarch64_split_simd_movv16qi (rtx operand0,
rtx operand1)
{
rtx _val = 0;
start_sequence ();
{
rtx operands[2];
operands[0] = operand0;
operands[1] = operand1;
#line 472 "../../src/gcc/config/aarch64/aarch64-simd.md"
{
rtx dst = operands[0];
rtx src = operands[1];
if (GP_REGNUM_P (REG... | false | false | false | false | false | 0 |
beforeDrawToScreen()
{
SDL_Rect pos;
int screen_center_x, screen_center_y;
// save map images
if(make_map) {
if(cursor.pos_y >= SAVE_HEIGHT) {
make_map = 0;
SDL_Flip(map_screen);
fprintf(stderr, "saving map.bmp\n");
SDL_SaveBMP(map_screen, "map.bmp");
fprintf(stderr, "done sav... | false | false | false | false | false | 0 |
uct_prior_eye(struct uct *u, struct tree_node *node, struct prior_map *map)
{
/* Discourage playing into our own eyes. However, we cannot
* completely prohibit it:
* #######
* ...XX.#
* XOOOXX#
* X.OOOO#
* .XXXX.# */
foreach_free_point(map->b) {
if (!map->consider[c])
continue;
if (!board_is_one_po... | false | false | false | false | false | 0 |
utf8_decode(struct tar *tar, const char *src, size_t length)
{
wchar_t *dest;
ssize_t n;
/* Ensure pax_entry buffer is big enough. */
if (tar->pax_entry_length <= length) {
wchar_t *old_entry = tar->pax_entry;
if (tar->pax_entry_length <= 0)
tar->pax_entry_length = 1024;
... | false | false | false | false | false | 0 |
PKCS5PaddingLength(const std::string& data) {
if (data.empty()) return 0;
char length = data[data.size() - 1];
if (length > 0 && length <= 8) {
for (size_t i = 0; i < length; ++i) {
if (length != data[data.size() - i - 1]) {
return 0;
... | false | false | false | false | false | 0 |
lua_checkstack (lua_State *L, int size) {
int res = 1;
lua_lock(L);
if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK)
res = 0; /* stack overflow */
else if (size > 0) {
luaD_checkstack(L, size);
if (L->ci->top < L->top + size)
L->ci->top = L->top + size;
}
lua_unloc... | false | false | false | false | false | 0 |
m5mols_write(struct v4l2_subdev *sd, u32 reg, u32 val)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct m5mols_info *info = to_m5mols(sd);
u8 wbuf[M5MOLS_I2C_MAX_SIZE + 4];
u8 category = I2C_CATEGORY(reg);
u8 cmd = I2C_COMMAND(reg);
u8 size = I2C_SIZE(reg);
u32 *buf = (u32 *)&wbuf[4];
struct i2c_ms... | false | false | false | false | false | 0 |
Entry()
{
int imported = 0;
for (;;)
{
// search next queued job and start it
{
wxMutexLocker lock(s_mutex);
s_pfconverting = NULL;
for (std::list<ConvertJob*>::iterator it = s_jobs.begin(); it != s_jobs.end(); ++it) {
if ((*it)->state == CONV_QUEUE) {
s_pfconverting = *it;
break;
}
... | false | false | false | false | false | 0 |
do_rpc(ACCOUNT_IN& ai) {
int retval;
string url;
string parameter;
url = ai.url;
canonicalize_master_url(url);
url += "lookup_account.php?email_addr=";
parameter = ai.email_addr;
escape_url(parameter);
url += parameter;
url += "&passwd_hash=";
parameter = ai.passwd_hash;
... | false | false | false | false | false | 0 |
find_tag_end(char *p)
{
char *pp;
pp=p; if(*pp=='<') pp++;
for(; *pp && *pp!='>'; pp++) {
if(*pp=='<') {
pp=find_tag_end(pp)-1; continue;
}
if(*pp=='"') {
pp=strchr(pp+1,'"');
if(pp==NULL) return p+strlen(p); else continue;
}
if(*pp=='\'') {
pp=strchr(pp+1... | false | false | false | false | false | 0 |
findcom(prompt)
const char *prompt;
{
if (InJoverc) {
/* This is for faster startup. This just reads until a space or a
* tab or a newline character is reached, and then does a
* semi-hashed lookup on that string. This should be much faster
* than initializing the minibuffer for each line.
*/
char cm... | false | false | false | false | true | 1 |
lbs_start_card(struct lbs_private *priv)
{
struct net_device *dev = priv->dev;
int ret = -1;
lbs_deb_enter(LBS_DEB_MAIN);
/* poke the firmware */
ret = lbs_setup_firmware(priv);
if (ret)
goto done;
if (!lbs_disablemesh)
lbs_init_mesh(priv);
else
pr_info("%s: mesh disabled\n", dev->name);
if (lbs_cfg_... | false | false | false | false | false | 0 |
prefix_stat(const char *path, apr_pool_t *pool)
{
const char *curpath = path;
const char *root;
const char *slash;
char *statpath;
apr_status_t rv;
rv = apr_filepath_root(&root, &curpath, APR_FILEPATH_TRUENAME, pool);
if (rv != APR_SUCCESS) {
return 0;
}
/* let's recognize... | false | false | false | false | false | 0 |
handle_File_Creator(FitMsg_File_Creator *filecreator) {
unsigned short minor = filecreator->getSoftwareVersion() % 100;
unsigned short major = 0;
if (filecreator->getSoftwareVersion() > 100) {
major = (filecreator->getSoftwareVersion() - minor ) / 100;
}
stringstream ssMaj;
stringstream ssMin;
ssMaj << major;
... | false | false | false | false | false | 0 |
profile_ser_externalize(const char *unused, profile_t profile,
unsigned char **bufpp, size_t *remainp)
{
errcode_t retval;
size_t required;
unsigned char *bp;
size_t remain;
prf_file_t pfp;
prof_int32 f... | false | true | false | false | false | 1 |
pcice_ew_fill_net(struct fpga_model *model, int y, int *cur_x, int x_dir, struct w_net *net)
{
RC_CHECK(model);
net->last_inc = 0;
net->num_pts = 0;
if (is_atx(X_FABRIC_BRAM_COL|X_FABRIC_MACC_COL, model, *cur_x)) {
net->pt[net->num_pts].name =
is_atx(X_FABRIC_BRAM_COL, model, *cur_x)
? "BRAM_TTERM_PCICE_... | false | false | false | false | false | 0 |
fetch_one(struct remote *remote, int argc, const char **argv)
{
int i;
static const char **refs = NULL;
int ref_nr = 0;
int exit_code;
if (!remote)
die(_("No remote repository specified. Please, specify either a URL or a\n"
"remote name from which new revisions should be fetched."));
transport = transp... | false | true | false | false | false | 1 |
PyMemoryView_FromBuffer(Py_buffer *info)
{
_PyManagedBufferObject *mbuf;
PyObject *mv;
if (info->buf == NULL) {
PyErr_SetString(PyExc_ValueError,
"PyMemoryView_FromBuffer(): info->buf must not be NULL");
return NULL;
}
mbuf = mbuf_alloc();
if (mbuf == NULL)
... | false | false | false | false | false | 0 |
WriteRow(FILE *bdf,unsigned short *test, int bits, int bite ) {
int i;
int cnt=0x8, nibble=0;
char buffer[80], *pt=buffer;
for ( i=bits; i<bite; ++i ) {
if ( test[i>>4]&(1<<(15-(i&15))) )
nibble |= cnt;
if ( (cnt>>=1)==0 ) {
if ( nibble>=10 )
*pt++ = 'A'+nibble-10;
else
*pt++ = '0'... | false | false | false | false | false | 0 |
party_id_build_data(unsigned char *data, size_t datalen,
const struct ast_party_id *id, const char *label, const struct ast_party_id_ies *ies,
const struct ast_set_party_id *update)
{
size_t length;
size_t pos = 0;
int res;
/*
* The size of integer values must be fixed in case the frame is
* shipped to anoth... | false | false | false | false | false | 0 |
Normalize(const QString &username_in, QString &username_out ) {
// SASLprep
if (StringPrepCache::saslprep(username_in, 1024, username_out)) {
// '=' -> '=3D' and ',' -> '=2C'
username_out.replace("=", "=3D");
username_out.replace(",", "=2C");
return true;
} else {
return false;
}
} | false | false | false | false | false | 0 |
symkey_table_set
___P((unsigned int subtype,
___SCMOBJ new_table),
(subtype,
new_table)
unsigned int subtype;
___SCMOBJ new_table;)
{
switch (subtype)
{
case ___sKEYWORD:
___GSTATE->keyword_table = new_table;
break;
default: /* assume ___sSYMBOL */
___GSTATE-... | false | false | false | false | false | 0 |
TIFFRawStripSize(TIFF* tif, uint32 strip)
{
static const char module[] = "TIFFRawStripSize";
uint64 m;
tmsize_t n;
m=TIFFRawStripSize64(tif,strip);
if (m==(uint64)(-1))
n=(tmsize_t)(-1);
else
{
n=(tmsize_t)m;
if ((uint64)n!=m)
{
TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
n=0;
}
... | false | false | false | false | false | 0 |
pv_free_extra_list(void)
{
pv_extra_p xe;
pv_extra_p xe1;
if(_pv_extra_list!=0)
{
xe = *_pv_extra_list;
while(xe!=0)
{
xe1 = xe;
xe = xe->next;
pkg_free(xe1);
}
pkg_free(_pv_extra_list);
_pv_extra_list = 0;
}
return 0;
} | false | false | false | false | false | 0 |
set_safe_settings(void)
{
if (use_safe_settings)
{
int i;
dprintkl(KERN_INFO, "Using safe settings.\n");
for (i = 0; i < CFG_NUM; i++)
{
cfg_data[i].value = cfg_data[i].safe;
}
}
} | false | false | false | false | false | 0 |
aes_decrypt(const unsigned char *in, off_t *length, unsigned char *q, char *key, unsigned key_n, int has_iv)
{
unsigned long rk[RKLENGTH(256)];
unsigned char iv[16];
unsigned len = *length;
unsigned char pad, i;
int nrounds;
cli_dbgmsg("cli_pdf: aes_decrypt: key length: %d, data length: %d\n", ... | false | false | false | false | false | 0 |
luaH_next (lua_State *L, Table *t, StkId key) {
int i = findindex(L, t, key); /* find original element */
for (i++; i < t->sizearray; i++) { /* try first array part */
if (!ttisnil(&t->array[i])) { /* a non-nil value? */
setnvalue(key, cast_num(i+1));
setobj2s(L, key+1, &t->array[i]);
retur... | false | false | false | false | false | 0 |
gres_plugin_step_state_validate(char *req_config,
List *step_gres_list,
List job_gres_list, uint32_t job_id,
uint32_t step_id)
{
char *tmp_str, *tok, *last = NULL;
int i, rc, rc2, rc3;
gres_state_t *step_gres_ptr, *job_gres_ptr;
void *step_gres_data, *job_gres_data;
ListIterator job_gres_it... | false | false | false | false | false | 0 |
getp_propdef(VMG_ vm_obj_id_t self,
vm_val_t *retval, uint *in_argc,
vm_prop_id_t, vm_obj_id_t *)
{
uint argc = (in_argc != 0 ? *in_argc : 0);
vm_val_t val;
int flags;
int found;
vm_prop_id_t prop;
vm_obj_id_t source_obj;
stat... | false | false | false | false | false | 0 |
fstWriterUint32WithVarint32AndLength(struct fstWriterContext *xc, uint32_t *u, uint32_t v, const void *dbuf, uint32_t siz)
{
unsigned char *buf = xc->vchg_mem + xc->vchg_siz;
unsigned char *pnt = buf;
uint32_t nxt;
uint32_t len;
#ifdef FST_DO_MISALIGNED_OPS
(*(uint32_t *)(pnt)) = (*(uint32_t *)(u));
#else
memcpy(pnt, ... | false | false | false | false | false | 0 |
EndSelectAction(vtkAbstractWidget *w)
{
vtkSliderWidget *self = reinterpret_cast<vtkSliderWidget*>(w);
if ( self->WidgetState == vtkSliderWidget::Start )
{
return;
}
// If animating we do it and return
if ( self->WidgetState == vtkSliderWidget::Animating )
{
self->AnimateSlider(self->Widge... | false | false | false | false | false | 0 |
on_toolbar_view_toggled (GtkAction *action, AnjutaWindow *win)
{
gboolean status = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action));
if (status)
{
gtk_widget_show (win->toolbar);
}
else
{
gtk_widget_hide (win->toolbar);
}
g_settings_set_boolean (win->settings,
TOOLBAR_VIS... | false | false | false | false | false | 0 |
comment_tokenize(const String &s, int &pos_in, int &line)
{
const char *data = s.data();
int len = s.length();
int pos = pos_in;
while (1) {
while (pos < len && data[pos] != '%' && data[pos] != '(') {
if (data[pos] == '\n')
line++;
else if (data[pos] == '\r' && (pos + 1 == len || data[pos+1... | false | false | false | false | false | 0 |
flags(const QModelIndex &index) const
{
Qt::ItemFlags defaultFlags = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
if (index.isValid()) {
if (!hasChildren(this->index(index.row(), 0, index.parent()))) {
return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
}
}
retu... | false | false | false | false | false | 0 |
tg3_ump_link_report(struct tg3 *tp)
{
u32 data[4];
if (!tg3_flag(tp, 5780_CLASS) || !tg3_flag(tp, ENABLE_ASF))
return;
tg3_phy_gather_ump_data(tp, data);
tg3_wait_for_event_ack(tp);
tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_LINK_UPDATE);
tg3_write_mem(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 14);
tg3_write... | false | false | false | false | false | 0 |
hide(char backColor)
{
if( init_flag )
{
init_flag = 0;
if( x1 >= 0 ) // when create() hasn't been called x1 is -1
Vga::active_buf->bar( x1,y1,x2,y2,backColor );
}
} | false | false | false | false | false | 0 |
zanchorsearch(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
os_ptr op1 = op - 1;
uint size = r_size(op);
check_read_type(*op, t_string);
check_read_type(*op1, t_string);
if (size <= r_size(op1) && !memcmp(op1->value.bytes, op->value.bytes, size)) {
os_ptr op0 = op;
push(1);
*op0... | false | false | false | false | false | 0 |
rotor_angle(int nn) {
/*given nn, return the angle in 0.0-359.9 range (1=1.0E, 359=1.0W) */
int i;
float angle;
for (i=0; i<49; i++){
if (rotor[i].nn == nn) {
if(rotor[i].we_flag == 0) //west
angle = 360.00 - rotor[i].orbital_pos / 10;
else //east
angle = rotor[i].orbital_pos / 10;
return angle;
... | false | false | false | false | false | 0 |
log_file_init(struct log_file_t *lf)
{
spinlock_init(&lf->lock);
INIT_LIST_HEAD(&lf->msgs);
lf->fd = -1;
lf->new_fd = -1;
} | false | false | false | false | false | 0 |
momentum_start(void *_po, void *event_info)
{
Photo_Object *po = (Photo_Object *) _po;
Elm_Gesture_Momentum_Info *p = (Elm_Gesture_Momentum_Info *) event_info;
printf("momentum_start po->rotate=<%d> <%d,%d>\n", po->rotate, p->x2, p->y2);
/* If there's an active animator, stop it */
if (po->mom_timer)
... | false | false | false | false | false | 0 |
gfire_game_config_foreach(GCallback p_callback, gpointer p_data)
{
if(!gfire_games_config || !p_callback)
return FALSE;
GList *cur = gfire_games_config;
while(cur)
{
if(((gboolean(*)(const gfire_game_configuration*,gpointer))p_callback)((const gfire_game_configuration*)cur->data,
p_data))... | false | false | false | false | false | 0 |
_wi_set_description(wi_runtime_instance_t *instance) {
wi_set_t *set = instance;
_wi_set_bucket_t *bucket;
wi_mutable_string_t *string;
wi_string_t *description;
wi_uinteger_t i;
string = wi_mutable_string_with_format(WI_STR("<%@ %p>{count = %lu, mutable = %u, values = (\n"),
wi_runtime_class_name(se... | false | false | false | false | false | 0 |
sym_is(const char *name, unsigned namelen, const char *symbol)
{
if (namelen != strlen(symbol))
return false;
return memcmp(name, symbol, namelen) == 0;
} | false | false | false | false | false | 0 |
cheese_camera_get_balance_property_range (CheeseCamera *camera,
const gchar *property,
gdouble *min, gdouble *max, gdouble *def)
{
CheeseCameraPrivate *priv;
GParamSpec *pspec;
g_return_val_if_fail (CHEESE_IS_CAMERA (cam... | false | false | false | false | false | 0 |
rst_daemon_stop(void)
{
if (!rstd_running) {
printf("daemon isn't running\n");
return;
}
list_remove(&l_ifunc_tcp, &ifunc_tcp);
packet_flush(&l_rst_packet);
list_produce_done(&l_rst_packet);
pthread_join(rstd_thr, NULL);
rstd_running = 0;
printf("rst daemon stoped\n");
} | false | false | false | false | false | 0 |
writeXMLAttributes(XMLSerializer& xml_stream) const
{
PropertyDefinitionBase::writeXMLAttributes(xml_stream);
// HACK: Here we abuse some intimate knowledge in that we know it's
// safe to write our sub-elements out although the function is named
// for writing attributes. The alte... | false | false | false | false | false | 0 |
indicator_keyboard_service_handle_keyboard_name_appeared (IndicatorKeyboardService* self, GDBusConnection* connection, const gchar* name, const gchar* name_owner) {
GError * _inner_error_ = NULL;
g_return_if_fail (self != NULL);
g_return_if_fail (connection != NULL);
g_return_if_fail (name != NULL);
g_return_if_fa... | false | false | false | false | false | 0 |
elm_map_overlay_class_remove(Elm_Map_Overlay *klass,
Elm_Map_Overlay *overlay)
{
#ifdef HAVE_ELEMENTARY_ECORE_CON
Overlay_Class *ovl;
EINA_SAFETY_ON_NULL_RETURN(klass);
EINA_SAFETY_ON_NULL_RETURN(overlay);
EINA_SAFETY_ON_NULL_RETURN(klass->wsd);
ELM_MAP_CHECK(ELM_WIDGET_DATA... | false | false | false | false | false | 0 |
data_free(struct data d)
{
struct marker *m, *nm;
m = d.markers;
while (m) {
nm = m->next;
free(m->ref);
free(m);
m = nm;
}
if (d.val)
free(d.val);
} | false | false | false | false | false | 0 |
ath5k_prepare_multicast(struct ieee80211_hw *hw,
struct netdev_hw_addr_list *mc_list)
{
u32 mfilt[2], val;
u8 pos;
struct netdev_hw_addr *ha;
mfilt[0] = 0;
mfilt[1] = 0;
netdev_hw_addr_list_for_each(ha, mc_list) {
/* calculate XOR of eight 6-bit values */
val = get_unaligned_le32(ha->addr + 0);
pos = (... | false | false | false | false | false | 0 |
sendMessage( const QString & serviceName, const QString & message )
{
//get named service
if ( !m_serviceBrowser->categories().contains( serviceName ) )
{
return i18n( "No service named %1 is currently loaded", serviceName );
}
ServiceBase * service = dynamic_cast<ServiceBase *>( m_serviceB... | false | false | false | false | false | 0 |
getForeignDataWrappers(Archive *fout, int *numForeignDataWrappers)
{
PGresult *res;
int ntups;
int i;
PQExpBuffer query;
FdwInfo *fdwinfo;
int i_tableoid;
int i_oid;
int i_fdwname;
int i_rolname;
int i_fdwhandler;
int i_fdwvalidator;
int i_fdwacl;
int i_fdwoptions;
/* Before 8.4,... | false | false | false | false | false | 0 |
L124__PICMENU_CALCULATE_SIZE__dwtrans()
{register object *base=vs_base;
register object *sup=base+VM124; VC124
vs_check;
{register object V698;
V698=(base[0]);
vs_top=sup;
goto TTL;
TTL:;
{object V699;
object V700;
V699= Cnil;
V700= Cnil;
if(((*(LnkLI270))((V698)))==Cnil){
goto T2737;}
V702= (*(LnkLI270))(... | false | false | false | false | false | 0 |
cftp_receive_data(struct cftp_descriptor *desc, void *buff, size_t size)
{
if (desc->receive)
{
return desc->receive(desc->data, buff, size);
}
else if (desc->receive_timeout)
{
return desc->receive_timeout(desc->data, buff, size, desc->timeout_ms);
}
else if (desc->fd > 0)
{
return read(desc->fd, buff, s... | false | true | false | false | true | 1 |
gst_cairo_render_push_surface (GstCairoRender * c, cairo_surface_t * surface)
{
cairo_status_t s = 0;
cairo_t *cr;
if (!c->surface) {
s = cairo_surface_write_to_png_stream (surface, write_func, c);
cairo_surface_destroy (surface);
if (s != CAIRO_STATUS_SUCCESS) {
GST_DEBUG_OBJECT (c, "Could not... | false | false | false | false | false | 0 |
gst_video_parse_caps_color_matrix (GstCaps * caps)
{
GstStructure *structure;
const char *s;
if (!gst_caps_is_fixed (caps))
return NULL;
structure = gst_caps_get_structure (caps, 0);
s = gst_structure_get_string (structure, "color-matrix");
if (s)
return s;
if (gst_structure_has_name (structur... | false | false | false | false | false | 0 |
GdipSetPixelOffsetMode (GpGraphics *graphics, PixelOffsetMode pixelOffsetMode)
{
if (!graphics || (pixelOffsetMode == PixelOffsetModeInvalid))
return InvalidParameter;
graphics->pixel_mode = pixelOffsetMode;
switch (graphics->backend) {
case GraphicsBackEndCairo:
/* FIXME: changing pixel mode affects other p... | false | false | false | false | false | 0 |
sphrev_make_sphere(gdouble radius, gint maxres)
{
GwyDataLine *dline;
gdouble *data;
gint i, size;
size = GWY_ROUND(MIN(radius, maxres));
dline = gwy_data_line_new(2*size+1, 1.0, FALSE);
data = gwy_data_line_get_data(dline);
if (radius/8 > maxres) {
/* Pathological case: very flat ... | false | false | false | false | false | 0 |
rowCount(unsigned index_)
{
return index_<columnRowCounts().length()?columnRowCounts()(index_):fixedRowCount();
} | false | false | false | false | false | 0 |
xg_instruction_matches_option_term (TInsn *insn, const ReqOrOption *option)
{
if (strcmp (option->option_name, "realnop") == 0
|| strncmp (option->option_name, "IsaUse", 6) == 0)
{
/* These conditions were evaluated statically when building the
relaxation table. There's no need to reevaluate them n... | false | false | false | false | false | 0 |
transport_push(struct transport *transport,
int refspec_nr, const char **refspec, int flags,
int *nonfastforward)
{
*nonfastforward = 0;
verify_remote_names(refspec_nr, refspec);
if (transport->push) {
/* Maybe FIXME. But no important transport uses this case. */
if (flags & TRANSPORT_PUSH_SET_UPSTREA... | false | false | false | false | false | 0 |
panel_switch_engine (Panel* self, gint i, gboolean force) {
gboolean _tmp0_ = FALSE;
gint _tmp1_ = 0;
gboolean _tmp4_ = FALSE;
gboolean _tmp5_ = FALSE;
gint _tmp6_ = 0;
gboolean _tmp8_ = FALSE;
IBusEngineDesc* engine = NULL;
IBusEngineDesc** _tmp9_ = NULL;
gint _tmp9__length1 = 0;
gint _tmp10_ = 0;
IBusEngin... | false | false | false | false | false | 0 |
store_download(unsigned char c, unsigned char *ob)
{
unsigned char *ixp;
unsigned ix;
int oq;
/* Quadrant already defined. */
if (quadrant >= 0) {
ixp = (unsigned char *)memchr(conv[quadrant].xlate, c, NE);
if (ixp != (unsigned char *)NULL) {
ix = ixp - conv[quadrant].xlate;
*ob++ = asc2ebc0[(int)alphas... | true | true | false | false | false | 1 |
upnp_published_mappings(void)
{
unsigned count;
g_assert(upnp_mappings != NULL);
count = 0;
htable_foreach(upnp_mappings, upnp_count_mapping_kv, &count);
return count;
} | false | false | false | false | false | 0 |
ib_open ( struct ib_device *ibdev ) {
int rc;
/* Increment device open request counter */
if ( ibdev->open_count++ > 0 ) {
/* Device was already open; do nothing */
return 0;
}
/* Create subnet management interface */
ibdev->smi = ib_create_mi ( ibdev, IB_QPT_SMI );
if ( ! ibdev->smi ) {
DBGC ( ibdev, "I... | false | false | false | false | false | 0 |
expand_end_catch (void)
{
struct eh_region *try_region;
if (! doing_eh (0))
return;
expand_eh_region_end ();
try_region = cfun->eh->try_region;
emit_jump (try_region->u.try.continue_label);
} | false | false | false | false | false | 0 |
testMacroAssertSame_good(void)
{
try {
int a = 66;
SVUT_ASSERT_SAME(&a,&a);
} catch (svutExAssertFailEqual) {
CPPUNIT_FAIL("Thow unexpected svutExAssertFailEqual exception.");
} catch (...) {
CPPUNIT_FAIL("Thow unexpected exception.");
}
} | false | false | false | false | false | 0 |
wi_mutable_copy(wi_runtime_instance_t *instance) {
wi_runtime_class_t *class;
wi_runtime_instance_t *copy;
if(!instance)
return NULL;
_WI_RUNTIME_ASSERT_MAGIC(instance);
_WI_RUNTIME_ASSERT_ZOMBIE(instance);
WI_ASSERT(WI_RUNTIME_BASE(instance)->options & WI_RUNTIME_OPTION_IMMUTABLE ||
WI_RUNTIME_BASE(in... | false | false | false | false | false | 0 |
state_changed(struct connman_service *service)
{
const char *str;
__connman_notifier_service_state_changed(service, service->state);
str = state2string(service->state);
if (str == NULL)
return;
if (allow_property_changed(service) == FALSE)
return;
connman_dbus_property_changed_basic(service->path,
CON... | false | false | false | false | false | 0 |
GetResponse() {
while(true) { // TODO: Limit number of iterations ?
std::string r = ReceiveLine();
// TODO: This is not how input validation should be done.
if (r.size() < 5) {
// Should never be the case. At least 5 chars (NNN<SPACE><CR>) are expected
throw "UNSUPPOR... | false | false | false | false | false | 0 |
node_name_update(node_t * node)
{
GList *protocol_item;
protocol_t *protocol;
guint i = STACK_SIZE;
/* for each level and each protocol at that level, sort names by traffic,
* placing the busiest at front */
for (i = 0 ; i <= STACK_SIZE ; ++i)
{
for ( protocol_item = node->node_stats.stats_proto... | false | false | false | false | false | 0 |
nodeLimitTriggered(QAction* a)
{
_funcLimit = a->data().toDouble(0);
refresh();
} | false | false | false | false | false | 0 |
save_game_state()
{
/* THIS FUNCTION MAKES AN IN-MEMORY COPY OF THE GAME STATE AFTER EACH
* OF THE PLAYER'S COMMANDS SO THE 'undo' COMMAND CAN BE USED */
int index,
counter;
struct integer_type *current_integer = integer_table;
struct function_type *current_function = function_table;... | false | false | false | false | false | 0 |
main ( int argc, char **argv )
{
if ( argc > 1 )
{
MIDIFileReadStreamFile rs ( argv[1] );
MIDIMultiTrack tracks;
MIDIFileReadMultiTrack track_loader ( &tracks );
MIDIFileRead reader ( &rs, &track_loader );
reader.Parse();
DumpMIDIMultiTrack ( &tracks );
}
... | false | false | false | false | true | 1 |
gkm_data_der_read_private_key_dsa_parts (GBytes *keydata,
GBytes *params,
gcry_sexp_t *s_key)
{
gcry_mpi_t p, q, g, y, x;
GkmDataResult ret = GKM_DATA_UNRECOGNIZED;
int res;
GNode *asn_params = NULL;
GNode *asn_key = NULL;
p = q = ... | false | false | false | false | false | 0 |
cave_clear(struct cave *c, struct player *p) {
int x, y;
wipe_o_list(c);
wipe_mon_list(c, p);
/* Clear flags and flow information. */
for (y = 0; y < DUNGEON_HGT; y++) {
for (x = 0; x < DUNGEON_WID; x++) {
/* Erase features */
c->feat[y][x] = 0;
/* Erase flags */
c->info[y][x] = 0;
c->info2[y][... | false | false | false | false | false | 0 |
OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const& targets)
{
ObjectGuid guid = pItem->GET_GUID();
bool castSpell = true;
if (!OnItemUse(pPlayer, pItem, targets))
castSpell = false;
pItem = pPlayer->GetItemByGuid(guid);
if (pItem)
{
if (!OnItemGossip(pPlayer, pItem, ta... | false | false | false | false | false | 0 |
makeheap(heap *heapdata,int size){
int i;
if(size<=1){
//in order to look nice
}
else{
for(i=size>>1;i>=1;i--)
shiftdown(heapdata,size,i);
}
} | false | false | false | false | false | 0 |
_updatePreview(AP_Dialog_PageNumbers::tAlign align,
AP_Dialog_PageNumbers::tControl ctrl)
{
UT_return_if_fail (m_preview);
m_preview->setHdrFtr (ctrl);
m_preview->setAlign (align);
m_preview->queueDraw ();
} | false | false | false | false | false | 0 |
maker_agfa_tagname(unsigned short tag,int model)
{
char *tagname = CNULL;
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 |
circuit_change_purpose(circuit_t *circ, uint8_t new_purpose)
{
uint8_t old_purpose;
/* Don't allow an OR circ to become an origin circ or vice versa. */
tor_assert(!!(CIRCUIT_IS_ORIGIN(circ)) ==
!!(CIRCUIT_PURPOSE_IS_ORIGIN(new_purpose)));
if (circ->purpose == new_purpose) return;
if (CIRCUIT_I... | false | false | false | false | false | 0 |
assign(ir_assignment *ir, int elem, ir_rvalue *val)
{
ir_dereference *lhs = ir->lhs->clone(mem_ctx, NULL);
ir_assignment *assign;
/* This assign-of-expression should have been generated by the
* expression flattening visitor (since we never short circit to
* not flatten, even for plain assignments of ... | false | false | false | false | false | 0 |
pit_load_count(struct kvm *kvm, int channel, u32 val)
{
struct kvm_kpit_state *ps = &kvm->arch.vpit->pit_state;
WARN_ON(!mutex_is_locked(&ps->lock));
pr_debug("load_count val is %d, channel is %d\n", val, channel);
/*
* The largest possible initial count is 0; this is equivalent
* to 216 for binary counting ... | false | false | false | false | false | 0 |
mwifiex_del_ba_tbl(struct mwifiex_private *priv, int tid, u8 *peer_mac,
u8 type, int initiator)
{
struct mwifiex_rx_reorder_tbl *tbl;
struct mwifiex_tx_ba_stream_tbl *ptx_tbl;
struct mwifiex_ra_list_tbl *ra_list;
u8 cleanup_rx_reorder_tbl;
unsigned long flags;
int tid_down;
if (type == TYPE_DELBA_RECEIVE)
... | 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.