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 |
|---|---|---|---|---|---|---|
handler (int signum_)
{
trace_with_mask("SigHandler::handler", SIGHAND);
if ( in_range (signum_) == -1 )
return 0;
return m_signal_handlers[signum_];
} | false | false | false | false | false | 0 |
exif_content_free (ExifContent *content)
{
ExifMem *mem = (content && content->priv) ? content->priv->mem : NULL;
unsigned int i;
if (!content) return;
for (i = 0; i < content->count; i++)
exif_entry_unref (content->entries[i]);
exif_mem_free (mem, content->entries);
if (content->priv) {
exif_log_unref (co... | false | false | false | false | false | 0 |
AddRotamers(unsigned char *arr,int nrotamers)
{
unsigned int size;
int i;
size = (unsigned int)_vrotor.size()+1;
for (i = 0;i < nrotamers;++i)
{
unsigned char *rot = new unsigned char [size];
memcpy(rot,&arr[i*size],sizeof(char)*size);
_vrotamer.push_back(rot);
}
... | false | false | false | false | false | 0 |
ast_calendar_event_alloc(struct ast_calendar *cal)
{
struct ast_calendar_event *event;
if (!(event = ao2_alloc(sizeof(*event), calendar_event_destructor))) {
return NULL;
}
if (ast_string_field_init(event, 32)) {
event = ast_calendar_unref_event(event);
return NULL;
}
event->owner = cal;
event->notify_sc... | false | false | false | false | false | 0 |
gwy_delaunay_point_on_simplex(GwyDelaunayVertex *p, simplex *s)
{
if (!s) return 0;
if (p == s->p[0] || p == s->p[1] || p == s->p[2] || p == s->p[3])
return 1;
return 0;
} | false | false | false | false | false | 0 |
hash(ulong *nr, ulong *nr2)
{
if (is_null())
{
*nr^= (*nr << 1) | 1;
}
else
{
uint len= length_bytes == 1 ? (uint) *ptr : uint2korr(ptr);
CHARSET_INFO *cs= charset();
cs->coll->hash_sort(cs, ptr + length_bytes, len, nr, nr2);
}
} | false | false | false | false | false | 0 |
AcpiNsOpensScope (
ACPI_OBJECT_TYPE Type)
{
ACPI_FUNCTION_ENTRY ();
if (Type > ACPI_TYPE_LOCAL_MAX)
{
/* type code out of range */
ACPI_WARNING ((AE_INFO, "Invalid Object Type 0x%X", Type));
return (ACPI_NS_NORMAL);
}
return (((UINT32) AcpiGbl_NsProperties[Typ... | false | false | false | false | false | 0 |
js_InflateString(JSContext *cx, const char *bytes, size_t *lengthp)
{
size_t nbytes, nchars, i;
jschar *chars;
#ifdef DEBUG
JSBool ok;
#endif
nbytes = *lengthp;
if (js_CStringsAreUTF8) {
if (!js_InflateStringToBuffer(cx, bytes, nbytes, NULL, &nchars))
goto bad;
chars = (... | false | true | false | false | false | 1 |
operator==(const Format& other) const {
// This protected comparison operator should only be called by subclasses
// which have confirmed that the other object being compared against is
// an instance of a sublcass of PluralFormat. THIS IS IMPORTANT.
// Format::operator== guarantees that this cast is s... | false | false | false | false | false | 0 |
dumpenv(flaglist, fp)
CONST char *flaglist;
XFILE *fp;
{
char *cp;
int i, n;
for (i = n = 0; i < ENVLISTSIZ; i++) {
if ((!flaglist || !(flaglist[i] & 2))
&& (cp = getshellvar(env_str(i), -1))
&& (env_type(i) != T_CHARP || strenvcmp(cp, def_str(i))))
n++;
if ((!flaglist || !(flaglist[i] & 1))
&& getshel... | false | false | false | false | false | 0 |
gnc_lot_is_closed (GNCLot *lot)
{
LotPrivate* priv;
if (!lot) return TRUE;
priv = GET_PRIVATE(lot);
if (0 > priv->is_closed) gnc_lot_get_balance (lot);
return priv->is_closed;
} | false | false | false | false | false | 0 |
ncx_pad_getn_schar_float(const void **xpp, size_t nelems, float *tp)
{
size_t rndup = nelems % X_ALIGN;
schar *xp = (schar *) *xpp;
if(rndup)
rndup = X_ALIGN - rndup;
while(nelems-- != 0)
{
*tp++ = *xp++;
}
*xpp = (void *)(xp + rndup);
return ENOERR;
} | false | false | false | false | false | 0 |
ocfs2_dlm_shutdown_debug(struct ocfs2_super *osb)
{
struct ocfs2_dlm_debug *dlm_debug = osb->osb_dlm_debug;
if (dlm_debug) {
debugfs_remove(dlm_debug->d_locking_state);
ocfs2_put_dlm_debug(dlm_debug);
}
} | false | false | false | false | false | 0 |
CTEXTAREA_set_foreground(void *_object)
{
THIS->no_change = TRUE;
QTextCursor oldCursor = WIDGET->textCursor();
WIDGET->selectAll();
WIDGET->setTextColor(Qt::black);
set_text_color(THIS);
WIDGET->setTextCursor(oldCursor);
set_text_color(THIS);
THIS->no_change = FALSE;
} | false | false | false | false | false | 0 |
intelx_check_link ( struct net_device *netdev ) {
struct intel_nic *intel = netdev->priv;
uint32_t links;
/* Read link status */
links = readl ( intel->regs + INTELX_LINKS );
DBGC ( intel, "INTEL %p link status is %08x\n", intel, links );
/* Update network device */
if ( links & INTELX_LINKS_UP ) {
netdev_li... | false | false | false | false | false | 0 |
received_test( struct sip_msg *msg )
{
int rcvd;
if(msg->via1->received !=NULL)
return 1;
if(msg->via1->maddr){
rcvd = check_ip_address(&msg->rcv.src_ip, &msg->via1->maddr->value,
msg->via1->port, msg->via1->proto, received_dns);
} else {
rcvd = check_ip_address(&msg->rcv.src_ip,
&msg->via1->host, m... | false | false | false | false | false | 0 |
exif_tag_get_name_in_ifd (ExifTag tag, ExifIfd ifd)
{
unsigned int i;
int first;
if (ifd >= EXIF_IFD_COUNT)
return NULL;
first = exif_tag_table_first(tag);
if (first < 0)
return NULL;
for (i = first; ExifTagTable[i].name; i++) {
if (ExifTagTable[i].tag == tag) {
if (RECORDED)
break;
} else
... | false | false | false | false | false | 0 |
Write(const wxString& name, const ConfigManagerContainer::SerializableObjectMap* map)
{
wxString key(name);
TiXmlElement* e = AssertPath(key);
TiXmlElement *leaf = GetUniqElement(e, key);
TiXmlElement *mNode;
mNode = GetUniqElement(leaf, _T("objmap"));
leaf->RemoveChild(mNode);
mNode = Get... | false | false | false | false | false | 0 |
pg_db_free_savepoints_to (pTHX_ imp_dbh_t * imp_dbh, const char *savepoint)
{
I32 i;
if (TSTART_slow) TRC(DBILOGFP, "%sBegin pg_db_free_savepoints_to\n", THEADER_slow);
for (i = av_len(imp_dbh->savepoints); i >= 0; i--) {
SV * const elem = av_pop(imp_dbh->savepoints);
if (strEQ(SvPV_nolen(elem), savepoint)) {
... | false | false | false | false | false | 0 |
e1000_phy_has_link_generic(struct e1000_hw *hw, u32 iterations,
u32 usec_interval, bool *success)
{
s32 ret_val = E1000_SUCCESS;
u16 i, phy_status;
DEBUGFUNC("e1000_phy_has_link_generic");
if (!(hw->phy.ops.read_reg))
return E1000_SUCCESS;
for (i = 0; i < iterations; i++) {
/*... | false | false | false | false | false | 0 |
privateUserCallback(void *callbackData, unsigned long bytes)
{
DIMSE_PrivateUserContext *ctx;
ctx = (DIMSE_PrivateUserContext*)callbackData;
ctx->progress->state = DIMSE_StoreProgressing;
ctx->progress->progressBytes = bytes;
ctx->progress->callbackCount++;
if (ctx->callback) {
ctx->call... | false | false | false | false | false | 0 |
setCellRowAlignment( Symbol alignment ) {
switch( alignment ) {
case symbolEnd: nextFormat.PgfCellAlignment = MifDoc::sBottom; break;
case symbolCenter: nextFormat.PgfCellAlignment = MifDoc::sMiddle; break;
default: nextFormat.PgfCellAlignment = MifDoc::sTop; break;
}
} | false | false | false | false | false | 0 |
update_system_secrets_cache (NMSettingsConnection *self)
{
NMSettingsConnectionPrivate *priv = NM_SETTINGS_CONNECTION_GET_PRIVATE (self);
if (priv->system_secrets)
g_object_unref (priv->system_secrets);
priv->system_secrets = nm_connection_duplicate (NM_CONNECTION (self));
/* Clear out non-system-owned and not-... | false | false | false | false | false | 0 |
instance (ACE_Service_Repository *s)
{
ACE_TRACE ("ACE_Service_Repository::instance");
ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
*ACE_Static_Object_Lock::instance (), 0));
ACE_Service_Repository *t = ACE_Service_Repository::svc_rep_;
// We can't safely delete it... | false | false | false | false | false | 0 |
record_start(char *outfile, int *nr)
{
int wav;
do {
sprintf(outfile,"%s%03d.wav",filename,(*nr)++);
wav = open(outfile, O_WRONLY | O_EXCL | O_CREAT, 0666);
} while ((-1 == wav) && (EEXIST == errno));
if (-1 == wav) {
perror("open");
exit(1);
}
wav_start_write(wav,rate);
return wav;
} | false | false | false | false | false | 0 |
setElementPrefix(Plasma::Location location)
{
switch (location) {
case TopEdge:
setElementPrefix("north");
break;
case BottomEdge:
setElementPrefix("south");
break;
case LeftEdge:
setElementPrefix("west");
break;
... | false | false | false | false | false | 0 |
rtw_alloc_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr, gfp_t gfp)
{
struct list_head *phash_list;
struct sta_info *psta;
struct recv_reorder_ctrl *preorder_ctrl;
s32 index;
int i = 0;
u16 wRxSeqInitialValue = 0xffff;
psta = kmalloc(sizeof(struct sta_info), gfp);
if (!psta)
return NULL;
spin_loc... | false | false | false | false | false | 0 |
get_color_code(int idx)
{
if (showbranch_use_color)
return column_colors_ansi[idx % column_colors_ansi_max];
return "";
} | false | false | false | false | false | 0 |
convertTagCaseType( const QString &tag, int type )
{
if( tag.isEmpty() )
return tag;
switch( type )
{
case 0:
return tag;
case 1:
return tag.toLower().replace( 0, 1, tag.left( 1 ).toUpper() );
case 2:
{
QString complete;
... | false | false | false | false | false | 0 |
load_dup(UnpicklerObject *self)
{
PyObject *last;
Py_ssize_t len;
if ((len = Py_SIZE(self->stack)) <= 0)
return stack_underflow();
last = self->stack->data[len - 1];
PDATA_APPEND(self->stack, last, -1);
return 0;
} | false | false | false | false | false | 0 |
av_get_config(const char *param)
{
const char *val;
val = NULL;
if(strcmp(param, "moduledir") == 0)
val = MODULE_DIR;
else if(strcmp(param, "compiledate") == 0)
val = COMPILE_DATE;
else if(strcmp(param, "compilesystem") == 0)
val = COMPILE_SYSTEM;
if(val == NULL)
... | false | false | false | false | false | 0 |
nv_crtc_prepare(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
struct nouveau_drm *drm = nouveau_drm(dev);
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
const struct drm_crtc_helper_funcs *funcs = crtc->helper_private;
if (nv_two_heads(dev))
NVSetOwner(dev, nv_crtc->index);
drm_vblank_pre_m... | false | false | false | false | false | 0 |
lunar_date_init (LunarDate *date)
{
gchar *cfgfile;
LunarDatePrivate *priv;
priv = LUNAR_DATE_GET_PRIVATE (date);
lunar_date_init_i18n();
priv->keyfile = g_key_file_new();
priv->solar = g_new0 (CLDate, 1);
priv->lunar = g_new0 (CLDate, 1);
priv->lunar2 = g_new0 (CLDate, 1);
priv->gan = g_new0 (CLDate, 1);
... | false | false | false | false | false | 0 |
_insert_config_node(struct dm_config_node **cn1,
struct dm_config_node *cn2)
{
if (!*cn1) {
*cn1 = cn2;
cn2->sib = NULL;
} else {
cn2->sib = (*cn1)->sib;
(*cn1)->sib = cn2;
}
} | false | false | false | false | false | 0 |
db_open_local(const char *zDbName){
int i, n;
char zPwd[2000];
static const char aDbName[][10] = { "_FOSSIL_", ".fslckout", ".fos" };
if( g.localOpen) return 1;
file_getcwd(zPwd, sizeof(zPwd)-20);
n = strlen(zPwd);
if( n==1 && zPwd[0]=='/' ) zPwd[0] = '.';
while( n>0 ){
for(i=0; i<count(aDbName); i... | false | false | false | false | false | 0 |
set_dads(struct pval *dad, struct pval *child_list)
{
struct pval *t;
for(t=child_list;t;t=t->next) /* simple stuff */
t->dad = dad;
} | false | false | false | false | false | 0 |
mdb_sql_dump_node(MdbSargNode *node, int level)
{
int i;
int mylevel = level+1;
if (!level)
printf("root ");
for (i=0;i<mylevel;i++) printf("--->");
switch (node->op) {
case MDB_OR:
printf(" or\n");
break;
case MDB_AND:
printf(" and\n");
break;
case MDB_NOT:
printf(" not\n");
bre... | false | false | false | false | false | 0 |
logfs_mtd_can_write_buf(struct super_block *sb, u64 ofs)
{
struct logfs_super *super = logfs_super(sb);
void *buf;
int err;
buf = kmalloc(super->s_writesize, GFP_KERNEL);
if (!buf)
return -ENOMEM;
err = logfs_mtd_read(sb, ofs, super->s_writesize, buf);
if (err)
goto out;
if (memchr_inv(buf, 0xff, super->s_... | false | false | false | false | false | 0 |
php_plain_files_unlink(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC)
{
char *p;
int ret;
if ((p = strstr(url, "://")) != NULL) {
url = p + 3;
}
if (php_check_open_basedir(url TSRMLS_CC)) {
return 0;
}
ret = VCWD_UNLINK(url);
if (ret == -1) {
if (options & R... | false | false | false | false | false | 0 |
ext2_has_free_blocks(struct ext2_sb_info *sbi)
{
ext2_fsblk_t free_blocks, root_blocks;
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
if (free_blocks < root_blocks + 1 && !capable(CAP_SYS_RESOURCE) &&
!uid_eq(sbi->s_resuid, current... | false | false | false | false | false | 0 |
FoldBinaryNumeric(JSContext *cx, JSOp op, JSParseNode *pn1, JSParseNode *pn2,
JSParseNode *pn, JSTreeContext *tc)
{
jsdouble d, d2;
int32 i, j;
JS_ASSERT(pn1->pn_type == TOK_NUMBER && pn2->pn_type == TOK_NUMBER);
d = pn1->pn_dval;
d2 = pn2->pn_dval;
switch (op) {
case JS... | false | false | false | false | false | 0 |
php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all)
{
char *str, *hint_charset = NULL;
int str_len, hint_charset_len = 0;
int len;
long quote_style = ENT_COMPAT;
char *replaced;
zend_bool double_encode = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ls!b", &str, &str_len, "e_style, &hint_c... | false | false | false | false | false | 0 |
bcm5600_reg_free(struct nm_16esw_data *d)
{
struct bcm5600_reg *reg,*next;
int i;
for(i=0;i<BCM5600_REG_HASH_SIZE;i++)
for(reg=d->reg_hash_table[i];reg;reg=next) {
next = reg->next;
free(reg);
}
} | false | false | false | false | false | 0 |
agxbinit(agxbuf * xb, unsigned int hint, unsigned char *init)
{
if (init) {
xb->buf = init;
xb->dyna = 0;
} else {
if (hint == 0)
hint = BUFSIZ;
xb->dyna = 1;
xb->buf = N_GNEW(hint, unsigned char);
}
xb->eptr = xb->buf + hint;
xb->ptr = xb->buf;
*xb->ptr = '\0';
} | false | true | false | false | false | 1 |
SetStringValue( char *String,
char **SavedString,
unsigned int linenum )
{
char *fn = "SetStringValue()";
unsigned int Size;
Size = strlen( String ) + 1;
/*
* Do some reasonable bounds checking before we malloc()
*/
if ( ( Size < 1 ) || ( Size > 4096 ) )
{
sy... | false | false | false | false | false | 0 |
UTF16toUTF8(FILE *fp)
{
FILE *fp8;
unsigned short t16[512];
unsigned char t8[2048];
const UTF16 *p16,*p16a;
UTF8 *p8;
if((fp8=tmpfile()) == NULL) return NULL;
#ifdef _WIN32
_setmode(_fileno(fp),_O_BINARY);
#endif
fseek(fp,2,SEEK_SET);
while(fread(t16,2,1,fp))
{
p16 = t16; p8 = t8; p16a = p16+1;
if(IC... | false | false | false | false | true | 1 |
genTempFilename(const char *dir,
const char *segment,
const char *extension)
{
char buf[256];
char *name, *outname;
l_int32 pid, nseg, next;
PROCNAME("genTempFilename");
if (!dir)
return (char *)ERROR_PTR("dir not defined", procName, NULL);
#if COMPILER_M... | false | false | false | false | false | 0 |
cb_entry(GtkWidget *widget, gpointer data)
{
gchar *empty_line[] = { "","" };
GtkWidget *clist;
const char *entry_text;
int count = 0;
jp_logf(JP_LOG_DEBUG, "enter cb_entry\n");
entry_text = gtk_entry_get_text(GTK_ENTRY(widget));
if (!entry_text || !strlen(entry_text)) {
return;
}
jp... | false | false | false | false | false | 0 |
profiler_exit( unsigned int index ) {
/* Stop the current timer */
timer_stop( &profiles[index].time_in );
/* Pop the stack */
stack_size--;
/* Start the timer, if needed */
if( (stack_size > 0) && profiles[stack[stack_size-1]].timed ) {
timer_start( &profiles[stack[stack_size-1]].time_in );
}
} | false | false | false | false | false | 0 |
sign_prepare (GMimeObject *mime_part)
{
GMimeContentEncoding encoding;
GMimeMultipart *multipart;
GMimeObject *subpart;
int i, n;
if (GMIME_IS_MULTIPART (mime_part)) {
multipart = (GMimeMultipart *) mime_part;
if (GMIME_IS_MULTIPART_SIGNED (multipart) ||
GMIME_IS_MULTIPART_ENCRYPTED (multipart)) {
... | false | false | false | false | false | 0 |
SetClippingPlanes(vtkPlanes *planes)
{
vtkPlane *plane;
if (!planes)
{
return;
}
int numPlanes = planes->GetNumberOfPlanes();
this->RemoveAllClippingPlanes();
for (int i=0; i<numPlanes && i<6; i++)
{
plane = vtkPlane::New();
planes->GetPlane(i, plane);
this->AddClippingPlane(plan... | false | false | false | false | false | 0 |
word_read_macro_info(int fd, macro_info_t *macro_info)
{
if(!read_uint16(fd, ¯o_info->count, FALSE)) {
cli_dbgmsg("read macro_info failed\n");
macro_info->count = 0;
return NULL;
}
cli_dbgmsg("macro count: %d\n", macro_info->count);
if(macro_info->count == 0)
return NULL;
macro_info->entries = (macro_e... | false | false | false | false | false | 0 |
fieldMatrixToIntegerMatrix(FieldMatrix const &m)
{
IntegerMatrix ret(m.getHeight(),m.getWidth());
for(int i=0;i<m.getHeight();i++)
ret[i]=fieldVectorToIntegerVector(m[i]);
return ret;
} | false | false | false | false | false | 0 |
evaluate_from_tenzor(const gs_function_Sd_t *pfn, int *I, double *T, int offset, int ii, double *y)
{
int s = pfn->params.array_step[ii], k, l, code;
if (ii < 0) {
for (k = 0; k < pfn->params.n; k++)
y[k] = *(pfn->params.pole + offset + k);
} else if (T[ii] == 0) {
return evalua... | false | false | false | false | false | 0 |
print_rate(const struct ap_session *ses, char *buf)
{
struct shaper_pd_t *pd = find_pd((struct ap_session *)ses, 0);
if (pd && (pd->down_speed || pd->up_speed))
sprintf(buf, "%i/%i", pd->down_speed, pd->up_speed);
else
*buf = 0;
} | false | false | false | false | false | 0 |
source_dispose (GObject *object)
{
ESourcePrivate *priv;
priv = E_SOURCE_GET_PRIVATE (object);
if (priv->dbus_object != NULL) {
EDBusObject *dbus_object;
EDBusSource *dbus_source;
dbus_object = E_DBUS_OBJECT (priv->dbus_object);
dbus_source = e_dbus_object_get_source (dbus_object);
if (dbus_source != N... | false | false | false | false | false | 0 |
evbuffer_remove(struct evbuffer *buf, void *data, size_t datlen)
{
size_t nread = datlen;
if (nread >= buf->off)
nread = buf->off;
memcpy(data, buf->buffer, nread);
evbuffer_drain(buf, nread);
return (nread);
} | false | false | false | false | false | 0 |
unlock()
{
bool fRet(false);
if (isOpen())
{
if (isLocked())
{
struct flock fl;
fl.l_whence = SEEK_SET;
fl.l_start = 0;
fl.l_len = 0;
fl.l_type = F_UNLCK;
if (::fcntl(handle(), F_SETLKW, &fl) != -1)
{
m_LockMode = NoLock;
... | false | false | false | false | false | 0 |
getFunctionName(const DISubprogram *SP) {
if (!SP->getLinkageName().empty())
return SP->getLinkageName();
return SP->getName();
} | false | false | false | false | false | 0 |
fuse_dev_fasync(int fd, struct file *file, int on)
{
struct fuse_dev *fud = fuse_get_dev(file);
if (!fud)
return -EPERM;
/* No locking - fasync_helper does its own locking */
return fasync_helper(fd, file, on, &fud->fc->iq.fasync);
} | false | false | false | false | false | 0 |
cache_remove(struct cache *cache, void *ptr)
{
int ret = 0;
struct backcommon *e;
if (NULL == ptr)
{
LOG("=> lru_remove\n<= lru_remove (null entry)\n", 0, 0, 0);
return ret;
}
e = (struct backcommon *)ptr;
PR_Lock(cache->c_mutex);
if (CACHE_TYPE_ENTRY == e->ep_type) {
... | false | false | false | false | false | 0 |
load_firmware(struct hfi1_devdata *dd)
{
int ret;
if (fw_fabric_serdes_load) {
ret = acquire_hw_mutex(dd);
if (ret)
return ret;
set_sbus_fast_mode(dd);
set_serdes_broadcast(dd, all_fabric_serdes_broadcast,
fabric_serdes_broadcast[dd->hfi1_id],
fabric_serdes_addrs[dd->hfi1_id],
NUM_FABRIC_SER... | false | false | false | false | false | 0 |
first_available(list_number)
int list_number;
{
int index;
if (list_size[list_number] == 0) return (0);
//printf("--- looking for next object in list\n");
for (index = 0; index < max_size[list_number]; index++) {
if (object_list[list_number][index] != 0) {
//printf("--- returning object %s\n", object[obje... | false | false | false | false | false | 0 |
elm_diskselector_smart_class_get(void)
{
static Elm_Diskselector_Smart_Class _sc =
ELM_DISKSELECTOR_SMART_CLASS_INIT_NAME_VERSION
(ELM_DISKSELECTOR_SMART_NAME);
static const Elm_Diskselector_Smart_Class *class = NULL;
Evas_Smart_Class *esc = (Evas_Smart_Class *)&_sc;
if (class) return class;
... | false | false | false | false | false | 0 |
profile_path_perm(const char *op, struct aa_profile *profile,
const struct path *path, char *buffer, u32 request,
struct path_cond *cond, int flags,
struct aa_perms *perms)
{
const char *name;
int error;
if (profile_unconfined(profile))
return 0;
error = path_name(op, &profile->label, pa... | false | false | false | false | false | 0 |
rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)
{
int mb_bits;
int w = r->s.width, h = r->s.height;
int mb_size;
memset(si, 0, sizeof(SliceInfo));
if(get_bits1(gb))
return -1;
si->type = get_bits(gb, 2);
if(si->type == 1) si->type = 0;
si->quant = ge... | false | false | false | false | false | 0 |
getext(ext, flagsp)
CONST char *ext;
u_char *flagsp;
{
char *tmp;
*flagsp = 0;
# ifndef OLDPARSE
if (*ext == '/') {
ext++;
*flagsp |= LF_IGNORECASE;
}
# endif
if (*ext == '*') tmp = Xstrdup(ext);
else {
tmp = Xmalloc(strlen(ext) + 2);
*tmp = '*';
Xstrcpy(&(tmp[1]), ext);
}
return(tmp);
} | false | false | false | false | false | 0 |
openUrl( const KUrl &url )
{
setUrl(url);
m_lineParser->reset();
startHeader();
//m_mimeType = arguments().mimeType();
// Hmm, args.reload is set to true when reloading, but this doesn't seem to be enough...
// I get "HOLD: Reusing held slave for <url>", and the old data
m_job = KIO::get(... | false | false | false | false | false | 0 |
metric_init(void)
{
g_val_t rval;
char * dummy;
struct stat struct_stat;
num_cpustates = num_cpustates_func();
/* scaling_max_freq will contain the max CPU speed if available */
cpufreq = 0;
if ( stat(SCALING_MAX_FREQ, &struct_stat) == 0 ) {
cpufreq = 1;
dummy = sys_devices_system_cpu... | false | false | false | false | false | 0 |
frame_init()
{
/* setup position of extra info */
info_x = stk_display->w - BRICK_WIDTH;
if ( game->game_type == GT_NETWORK ) {
/* general */
info_y = 178;
info_offsets[EX_METAL] = 26;
info_offsets[EX_WEAK_BALL] = 26;
info_offsets[EX_EXPL_BALL] = 26;
info_offs... | false | false | false | false | false | 0 |
qib_eeprom_read(struct qib_devdata *dd, u8 eeprom_offset,
void *buff, int len)
{
int ret;
ret = mutex_lock_interruptible(&dd->eep_lock);
if (!ret) {
ret = qib_twsi_reset(dd);
if (ret)
qib_dev_err(dd, "EEPROM Reset for read failed\n");
else
ret = qib_twsi_blk_rd(dd, dd->twsi_eeprom_dev,
... | false | false | false | false | false | 0 |
strextcmp(const char *s1, const char *s2)
{
// sanity check
Assert( (s1 != NULL) && (s2 != NULL) );
// find last '.' in both strings
char *s1_end = (char *)strrchr(s1, '.');
char *s2_end = (char *)strrchr(s2, '.');
// get length
size_t s1_len, s2_len;
if (s1_end != NULL)
s1_len = (s1_end - s1);
else
s1_... | false | false | false | false | false | 0 |
hfs_ext_lastblock(struct hfs_extent *ext)
{
int i;
ext += 2;
for (i = 0; i < 2; ext--, i++)
if (ext->count)
break;
return be16_to_cpu(ext->block) + be16_to_cpu(ext->count);
} | false | false | false | false | false | 0 |
HandShake(RTMP * r, bool FP9HandShake)
{
int i;
char clientbuf[RTMP_SIG_SIZE + 1], *clientsig = clientbuf+1;
char serversig[RTMP_SIG_SIZE];
clientbuf[0] = 0x03; // not encrypted
uint32_t uptime = htonl(RTMP_GetTime());
memcpy(clientsig, &uptime, 4);
memset(&clientsig[4], 0, 4);
#ifdef _DEBUG
for (i... | false | false | false | false | false | 0 |
emit_conv_gpr_to_fpu(struct insn *insn, struct buffer *buf, struct basic_block *bb)
{
enum machine_reg src, dest;
unsigned char opc[3];
int rex_w;
src = mach_reg(&insn->src.reg);
dest = mach_reg(&insn->dest.reg);
if (!is_64bit_reg(&insn->dest))
opc[0] = 0xF3;
else
opc[0] = 0xF2;
opc[1] = 0x0F;
opc[2] = 0... | true | true | false | false | false | 1 |
hybrid_pref_tab_add_section(GtkWidget *tab, const gchar *name)
{
GtkWidget *child;
GtkWidget *frame;
frame = gtk_frame_new(name ? name : "");
gtk_container_set_border_width(GTK_CONTAINER(frame), 10);
child = gtk_table_new(1, 2, FALSE);
gtk_table_set_row_spacings(GTK_TABLE(child), 6);
gtk_ta... | false | false | false | false | false | 0 |
worker_flush_part(worker_t *worker, int from, int to,
apr_pool_t *ptmp) {
int i;
int len;
int nocrlf = 0;
apr_status_t status = APR_SUCCESS;
apr_table_entry_t *e =
(apr_table_entry_t *) apr_table_elts(worker->cache)->elts;
/* iterate through all cached lines and send t... | false | false | false | false | false | 0 |
find_pid_index(gint pid)
{
gint i;
for (i = psarray->len - 1; i >= 0 && g_array_index(psarray, struct task_pak, i).pid != pid; i--);
return(i);
} | false | false | false | false | false | 0 |
_ov_open1(void *f,OggVorbis_File *vf,char *initial,
long ibytes, ov_callbacks callbacks){
int offsettest=((f && callbacks.seek_func)?callbacks.seek_func(f,0,SEEK_CUR):-1);
int ret;
memset(vf,0,sizeof(*vf));
vf->datasource=f;
vf->callbacks = callbacks;
/* init the framing state */
ogg_sync_init(... | false | false | false | false | false | 0 |
WeekDay(jsdouble t)
{
jsint result;
result = (jsint) Day(t) + 4;
result = result % 7;
if (result < 0)
result += 7;
return (intN) result;
} | false | false | false | false | false | 0 |
mdread(SMgrRelation reln, BlockNumber blocknum, char *buffer)
{
bool status;
long seekpos;
int nbytes;
MdfdVec *v;
v = _mdfd_getseg(reln, blocknum, false);
#ifndef LET_OS_MANAGE_FILESIZE
seekpos = (long) (BLCKSZ * (blocknum % ((BlockNumber) RELSEG_SIZE)));
Assert(seekpos < BLCKSZ * RELSEG_SIZE);
#else
... | false | false | false | false | false | 0 |
_dxfComputeCheckSameTypeSpecReturn (PTreeNode *pt, ObjStruct *os, OperBinding *binding)
{
PTreeNode *subTree;
int listElement;
int items = pt->metaType.items;
int count;
/* Count number of arguments (ensure match) */
if (binding->numArgs != -1) {
for (count = 0, subTree = pt->args;
subT... | false | false | false | true | false | 1 |
git_reference__set_name(
git_reference *ref, const char *name)
{
size_t namelen = strlen(name);
size_t reflen;
git_reference *rewrite = NULL;
if (!GIT_ADD_SIZET_OVERFLOW(&reflen, sizeof(git_reference), namelen) &&
!GIT_ADD_SIZET_OVERFLOW(&reflen, reflen, 1) &&
(rewrite = git__realloc(ref, reflen)) != NULL)
... | false | false | false | false | false | 0 |
get_prealloc(Window win, Atom prop, Atom type, gint size,
guchar *data, gulong num)
{
gboolean ret = FALSE;
gint res;
guchar *xdata = NULL;
Atom ret_type;
gint ret_size;
gulong ret_items, bytes_left;
glong num32 = 32 / size * num; /* num in 32-bit elements */
... | false | false | false | false | false | 0 |
talloc_reparent(const void *old_parent, const void *new_parent, const void *ptr)
{
struct talloc_chunk *tc;
struct talloc_reference_handle *h;
if (unlikely(ptr == NULL)) {
return NULL;
}
if (old_parent == talloc_parent(ptr)) {
return _talloc_steal_internal(new_parent, ptr);
}
tc = talloc_chunk_from_ptr(pt... | false | false | false | false | false | 0 |
writeToFile(HttpQueue *q, char *data, ssize len)
{
HttpConn *conn;
HttpUploadFile *file;
HttpLimits *limits;
Upload *up;
ssize rc;
conn = q->conn;
limits = conn->limits;
up = q->queueData;
file = up->currentFile;
if ((file->size + len) > limits->... | false | false | false | false | false | 0 |
pt_Send(
PRFileDesc *fd, const void *buf, PRInt32 amount,
PRIntn flags, PRIntervalTime timeout)
{
PRInt32 syserrno, bytes = -1;
PRBool fNeedContinue = PR_FALSE;
#if defined(SOLARIS)
PRInt32 tmp_amount = amount;
#endif
/*
* Under HP-UX DCE threads, pthread.h includes dce/cma_ux.h,
* which... | false | false | false | false | false | 0 |
replaceSubWithSub(unsigned OldR, unsigned OldSR,
unsigned NewR, unsigned NewSR, MachineRegisterInfo &MRI) {
if (!TargetRegisterInfo::isVirtualRegister(OldR) ||
!TargetRegisterInfo::isVirtualRegister(NewR))
return false;
auto Begin = MRI.use_begin(OldR), End = MRI.use_end();
decltype(End) NextI;
... | false | false | false | false | false | 0 |
httpServerUnpipeline(HTTPRequestPtr request)
{
HTTPConnectionPtr connection = request->connection;
HTTPServerPtr server = connection->server;
request->flags &= ~REQUEST_PERSISTENT;
if(request->next) {
HTTPRequestPtr req;
do_log(L_WARN,
"Restarting pipeline to %s:%d.\n",
... | false | false | false | false | false | 0 |
elm_win_screen_size_get(const Evas_Object *obj,
int *x,
int *y,
int *w,
int *h)
{
ELM_WIN_CHECK(obj);
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
ecore_evas_screen_geometry_get(sd->ee, x, y, w, h);
} | false | false | false | false | false | 0 |
kvm_arch_async_page_ready(struct kvm_vcpu *vcpu, struct kvm_async_pf *work)
{
int r;
if ((vcpu->arch.mmu.direct_map != work->arch.direct_map) ||
work->wakeup_all)
return;
r = kvm_mmu_reload(vcpu);
if (unlikely(r))
return;
if (!vcpu->arch.mmu.direct_map &&
work->arch.cr3 != vcpu->arch.mmu.get_c... | false | false | false | false | false | 0 |
brcms_ops_ampdu_action(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_ampdu_params *params)
{
struct brcms_info *wl = hw->priv;
struct scb *scb = &wl->wlc->pri_scb;
int status;
struct ieee80211_sta *sta = params->sta;
enum ieee80211_ampdu_mlme_action action = params->action;
u16 ... | false | false | false | false | false | 0 |
FindNonWhitespace(const char *str)
{
assert(str != NULL);
while(*str != NUL)
{
if(!isspace(*str))
{
break;
}
str++;
}
return str;
} | false | false | false | false | false | 0 |
newPf(const string& name)
{ return Proof(Expr(d_pfOp, d_em->newVarExpr(name))); } | false | false | false | false | false | 0 |
onenand_otp_walk(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf,
otp_op_t action, int mode)
{
struct onenand_chip *this = mtd->priv;
int otp_pages;
int density;
int ret = 0;
*retlen = 0;
density = onenand_get_density(this->device_id);
if (density < ONENAND_DEVICE_DENSITY_512Mb... | false | false | false | false | false | 0 |
UnRegisterAllFactories()
{
// do not do anything if this is null
if( ! vtkObjectFactory::RegisteredFactories )
{
return;
}
int num = vtkObjectFactory::RegisteredFactories->GetNumberOfItems();
// collect up all the library handles so they can be closed
// AFTER the factory has been deleted.
void*... | false | false | false | false | false | 0 |
vnc_connection_pointer_type_change(VncConnection *conn, gboolean absPointer)
{
VncConnectionPrivate *priv = conn->priv;
struct signal_data sigdata;
VNC_DEBUG("Pointer mode %s", absPointer ? "absolute" : "relative");
if (priv->absPointer == absPointer)
return;
priv->absPointer = absPointer;... | false | false | false | false | false | 0 |
readImageSize() {
m_BitsPerComponent = fgetc(m_In);
m_Height = read16BE();
m_Width = read16BE();
m_Components = fgetc(m_In);
if (m_Components == 1) {
setMode(GLE_BITMAP_GRAYSCALE);
} else {
setMode(GLE_BITMAP_RGB);
}
return GLE_IMAGE_ERROR_NONE;
} | false | false | false | false | false | 0 |
dispose(omniIdentity* id)
{
ASSERT_OMNI_TRACEDMUTEX_HELD(boa_lock, 1);
ASSERT_OMNI_TRACEDMUTEX_HELD(*omni::internalLock, 1);
if( pd_state == DESTROYED ) {
omni::internalLock->unlock();
boa_lock.unlock();
OMNIORB_THROW(OBJECT_NOT_EXIST,OBJECT_NOT_EXIST_NoMatch,
CORBA::COMPLETED_NO);
}
omniObj... | false | false | false | false | false | 0 |
on_testConnectivity_clicked()
{
QNetworkProxy proxy;
switch(proxyMode())
{
case ActionTools::Settings::PROXY_NONE:
proxy.setType(QNetworkProxy::NoProxy);
break;
case ActionTools::Settings::PROXY_SYSTEM:
{
QUrl url(Global::CONNECTIVITY_URL);
QNetworkProxyQuery networkProxyQuery(url);
QList<QNetworkP... | 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.