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 |
|---|---|---|---|---|---|---|
WriteWorkbookRels(const char* pszName, int nLayers)
{
VSILFILE* fp;
fp = VSIFOpenL(CPLSPrintf("/vsizip/%s/xl/_rels/workbook.xml.rels", pszName), "wb");
VSIFPrintfL(fp, XML_HEADER);
VSIFPrintfL(fp, "<Relationships xmlns=\"%s\">\n", SCHEMA_PACKAGE_RS);
VSIFPrintfL(fp, "<Relationship Id=\"rId1\" Type=... | false | false | false | false | false | 0 |
vsl_open(struct VSM_data *vd)
{
struct vsl *vsl = vsl_Setup(vd);
int i;
assert(vsl->r_fd < 0);
if (vd->head == NULL) {
i = VSM_Open(vd);
if (i)
return (i);
}
if (!VSM_Get(vd, &vsl->vf, VSL_CLASS, NULL, NULL)) {
VSM_Close(vd);
return (vsm_diag(vd, "No VSL chunk found "
" (child not started ?)\n")... | false | false | false | false | false | 0 |
lower_subreg32(MCInst *MI, unsigned OpNo) {
// Convert registers in the addr mode according to subreg32.
unsigned Reg = MI->getOperand(OpNo).getReg();
if (Reg != 0)
MI->getOperand(OpNo).setReg(getX86SubSuperRegister(Reg, MVT::i32));
} | false | false | false | false | false | 0 |
killmeta(name)
CONST char *name;
{
CONST char *cp;
char *buf, *new;
int i;
buf = Xmalloc(strlen(name) * 2 + 2 + 1);
*buf = (*name == '~') ? '"' : '\0';
for (cp = name, i = 1; *cp; cp++, i++) {
if (iswchar(cp, 0)) buf[i++] = *(cp++);
else if (*cp == PESCAPE) {
*buf = '"';
if (Xstrchr(DQ_METACHAR, *(cp +... | false | false | false | false | false | 0 |
plist_get(plist_t list, int key) {
plist_t t = list;
while (t) {
if (t->key == key)
break;
t = t->next;
}
return (t == NULL ? NULL : t->aux);
} | false | false | false | false | false | 0 |
gtktreestore_gtk_tree_store_new(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
{
ScmObj types_scm;
ScmObj types;
ScmObj SCM_SUBRARGS[2];
int SCM_i;
SCM_ENTER_SUBR("gtk-tree-store-new");
for (SCM_i=0; SCM_i<2; SCM_i++) {
SCM_SUBRARGS[SCM_i] = SCM_ARGREF(SCM_i);
}
types_scm = SCM_SUBRARGS[SCM_ARGCNT-1];... | false | false | false | false | false | 0 |
new_qpol_genfscon_t(qpol_policy_t *p,char const *name,char const *path){
qpol_genfscon_t *g;
BEGIN_EXCEPTION
if (qpol_policy_get_genfscon_by_name(p, name, path, &g)) {
{tcl_throw_error("Genfscon statement does not exist"); goto fail;};
}
END_EXCEPTION
fail:
return g;
} | false | false | false | false | false | 0 |
get_value(const char* key_, const char* regex_)
{
int ret = -1;
char *tl;
char *global = NULL, *repo_config = NULL;
const char *system_wide = NULL, *local;
local = config_exclusive_filename;
if (!local) {
const char *home = getenv("HOME");
local = repo_config = xstrdup(git_path("config"));
if (git_config_g... | true | true | false | false | true | 1 |
emit_jump(struct filter *f, __u16 code, __u32 k, __u8 jt, __u8 jf)
{
if (f->numops < MAX_OPCODES) {
f->code[f->numops].code = code;
f->code[f->numops].jt = jt;
f->code[f->numops].jf = jf;
f->code[f->numops].k = k;
}
f->numops++;
} | false | false | false | false | false | 0 |
AddElement(Element* Elt)
{
if ((unsigned) Elt->GetZ () >= Elements.size ()) {
unsigned old_size = Elements.size ();
Elements.resize (old_size + 10);
for (unsigned i = old_size; i < old_size + 10; i++)
Elements[i] = NULL;
}
Elements[Elt->GetZ ()] = Elt;
EltsMap[Elt->GetSymbol ()] = Elt;
} | false | false | false | false | false | 0 |
scsifront_cdb_cmd_done(struct vscsifrnt_info *info,
struct vscsiif_response *ring_rsp)
{
struct scsi_cmnd *sc;
uint32_t id;
uint8_t sense_len;
id = ring_rsp->rqid;
sc = info->shadow[id]->sc;
BUG_ON(sc == NULL);
scsifront_gnttab_done(info, id);
scsifront_put_rqid(info, id);
sc->result = ring_rsp->rsl... | false | true | false | false | false | 1 |
tfff_free(void *p)
{
if (! p)
return;
if (p == tfff_p1)
++tfff_p1_freed;
if (p == tfff_p2)
++tfff_p2_freed;
free(p);
} | false | false | false | false | false | 0 |
unparse_type(int srcdst, int type)
{
StringAccum sa;
switch (srcdst) {
case SD_SRC: sa << "src "; break;
case SD_DST: sa << "dst "; break;
case SD_OR: sa << "src or dst "; break;
case SD_AND: sa << "src and dst "; break;
}
switch (type) {
case TYPE_NONE: sa << "<none>"; break;
case TYPE_... | false | false | false | false | false | 0 |
VersionStringToInt(const char *version) {
if (version == NULL) return -1;
const char *p = version;
int v = 0;
for (int i = 3; i >= 0; --i) {
v += (1 << (i * 8)) * atoi(p);
for (; (*p != '\0') && (*p != '.'); ++p);
if (*p != '\0') ++p;
}
return v;
} | false | false | false | false | false | 0 |
Parse_MIME_FromFileName(const char *fname)
{
FILE *fp = fopen(fname,"r");
if (fp) {
VObject* o = Parse_MIME_FromFile(fp);
fclose(fp);
return o;
}
else {
char msg[255];
snprintf(msg, sizeof(msg), "can't open file '%s' for reading\n", fname);
mime_error_(msg);
return 0;
}
} | true | true | false | false | true | 1 |
maildir_maybe_rename_old_folder (CamelMaildirStore *mstore,
CamelFolderInfo *fi,
gint maildir_version,
GCancellable *cancellable,
GError **error)
{
gchar *new_name = NULL;
if (maildir_v... | false | false | false | false | false | 0 |
client_delete(struct client *c)
{
CHECK_OBJ_NOTNULL(c, CLIENT_MAGIC);
vtc_logclose(c->vl);
free(c->spec);
free(c->name);
/* XXX: MEMLEAK (?)*/
FREE_OBJ(c);
} | false | false | false | true | false | 1 |
r_get_scalar (const char *s, double *x)
{
if (sscanf(s, "%lf", x)) {
return 1;
} else {
int n;
s += strspn(s, " ");
n = gretl_namechar_spn(s);
if (n > 0) {
char tmp[VNAMELEN];
*tmp = '\0';
strncat(tmp, s, n);
if (gretl_is_scalar(tmp)) {
*x = gretl_scalar_get_value(tmp, NULL);
if ... | false | false | false | false | false | 0 |
strtab_alloc()
{
int i;
StrTable st;
st = (StrTable)malloc(sizeof(struct __strtab));
if (st == NULL)
return NULL;
memset(st, 0, sizeof(struct __strtab));
st->num_str = 0;
for (i = 0; i < HASH_SIZE; i++) {
st->hashtab[i] = str_null;
}
st->s_st = mempool_alloc(NULL, STR_MEMPOOL_SIZ... | false | false | false | false | false | 0 |
do_refcounting_test (SoupURI *base_uri)
{
SoupSession *session;
SoupCache *cache;
char *cache_dir;
SoupRequestHTTP *req;
GInputStream *stream, *base_stream;
SoupURI *uri;
GError *error = NULL;
guint flags;
GMainLoop *loop;
debug_printf (1, "Cache refcounting tests\n");
cache_dir = g_dir_make_tmp ("cache-te... | false | false | false | false | false | 0 |
ssh2_msg_channel_open_confirmation(Ssh ssh, struct Packet *pktin)
{
struct ssh_channel *c;
struct Packet *pktout;
c = ssh2_channel_msg(ssh, pktin);
if (!c)
return;
if (c->type != CHAN_SOCKDATA_DORMANT)
return; /* dunno why they're confirming this */
c->remoteid = ssh_pkt_getuint32(pk... | false | false | false | false | false | 0 |
sqlite_db_authorizer_dispatcher (
void *authorizer,
int action_code,
const char *details_1,
const char *details_2,
const char *details_3,
const char *details_4
)
{
dTHX;
dSP;
int retval = 0;
int n_retval, i;
ENTER;
SAVETMPS;
PUSHMARK(SP);
XPUSHs( sv_2mortal ( n... | false | false | false | false | false | 0 |
_book_unquantize(const static_codebook *b,int n,int *sparsemap){
long j,k,count=0;
if(b->maptype==1 || b->maptype==2){
int quantvals;
float mindel=_float32_unpack(b->q_min);
float delta=_float32_unpack(b->q_delta);
float *r=_ogg_calloc(n*b->dim,sizeof(*r));
/* maptype 1 and 2 both use a quantiz... | false | false | false | false | true | 1 |
refine_surface_read (GtsObject ** o, GtsFile * fp)
{
(* GTS_OBJECT_CLASS (gfs_refine_surface_class ())->parent_class->read) (o, fp);
if (fp->type == GTS_ERROR)
return;
gfs_generic_surface_read (GFS_REFINE_SURFACE (*o)->surface, gfs_object_simulation (*o), fp);
} | false | true | false | false | true | 1 |
PrintDocumentation(Type ht, std::ostream& os)
{
if ((this->CurrentFormatter->GetForm() != HTMLForm)
&& (this->CurrentFormatter->GetForm() != DocbookForm)
&& (this->CurrentFormatter->GetForm() != ManForm))
{
this->PrintVersion(os);
}
switch (ht)
{
case cmDocumentation::Usage:
... | false | false | false | false | false | 0 |
SolveQuadratic(double A,double B,double C)
{
register double Descr, Temp, TwoA;
if( IsZero(A) )
return( SolveLinear(B,C) );
TwoA = A+A;
Temp = TwoA*C;
Descr = B*B - (Temp+Temp);
if( Descr<0.0 )
return( 0 );
if( Descr>0.0 )
{
Descr = sqrt(Descr);
/* W. P... | false | false | false | false | false | 0 |
__rtsx_pci_write_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 val)
{
int err, i, finished = 0;
u8 tmp;
rtsx_pci_init_cmd(pcr);
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PHYDATA0, 0xFF, (u8)val);
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PHYDATA1, 0xFF, (u8)(val >> 8));
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PHYADDR, 0xF... | false | false | false | false | false | 0 |
tx_sched_init(struct sge *sge)
{
struct sched *s;
int i;
s = kzalloc(sizeof (struct sched), GFP_KERNEL);
if (!s)
return -ENOMEM;
pr_debug("tx_sched_init\n");
tasklet_init(&s->sched_tsk, restart_sched, (unsigned long) sge);
sge->tx_sched = s;
for (i = 0; i < MAX_NPORTS; i++) {
skb_queue_head_init(&s->p[i]... | false | false | false | false | false | 0 |
keybinder_bind_full (const char *keystring,
KeybinderHandler handler,
void *user_data,
GDestroyNotify notify)
{
struct Binding *binding;
gboolean success;
binding = g_new0 (struct Binding, 1);
binding->keystring = g_strdup (keystring);
binding->handle... | false | false | false | false | false | 0 |
ges_edge_get_type (void)
{
static GType id;
static GOnce once = G_ONCE_INIT;
g_once (&once, (GThreadFunc) register_ges_edge, &id);
return id;
} | false | false | false | false | false | 0 |
moveCursor(unsigned newPosition_)
{
unsigned si=scrollIndex();
if (newPosition_!=cursorPosition())
{
unsigned len=computeVisibleLength();
if (newPosition_>=length())
{
newPosition_=length();
si=length()-len;
}
else if (scrollIndex()>0||cursorPosition()>=len)
{
if (newPosition_... | false | false | false | false | false | 0 |
replace_uses_by (tree name, tree val)
{
imm_use_iterator imm_iter;
use_operand_p use;
gimple stmt;
edge e;
FOR_EACH_IMM_USE_STMT (stmt, imm_iter, name)
{
/* Mark the block if we change the last stmt in it. */
if (cfgcleanup_altered_bbs
&& stmt_ends_bb_p (stmt))
bitmap_set_bit (cfgcleanup... | false | false | false | false | false | 0 |
knh_PtrMap_get(CTX ctx, kPtrMap *pm, void *keyptr)
{
knh_hmap_t *hmap = (knh_hmap_t*)pm->mapptr;
khashcode_t hcode = (khashcode_t)keyptr;
knh_hentry_t *e = hmap_getentry(hmap, hcode);
if(e != NULL) {
hmap_top(hmap, e);
return e->pvalue;
}
return NULL;
} | false | false | false | false | false | 0 |
read3byte(struct sysv_sb_info *sbi,
unsigned char * from, unsigned char * to)
{
if (sbi->s_bytesex == BYTESEX_PDP) {
to[0] = from[0];
to[1] = 0;
to[2] = from[1];
to[3] = from[2];
} else if (sbi->s_bytesex == BYTESEX_LE) {
to[0] = from[0];
to[1] = from[1];
to[2] = from[2];
to[3] = 0;
} else {
to[0]... | false | false | false | false | false | 0 |
render_bin_output_region_blocks(hid_t region_space, hid_t region_id,
FILE *stream, hid_t container)
{
HERR_INIT(hbool_t, TRUE)
hssize_t snblocks;
hsize_t nblocks;
hsize_t alloc_size;
hsize_t *ptdata;
int ndims;
hid_t dtype;
hid_t type_id;
... | false | false | false | false | true | 1 |
libmail_changegroup(gid_t gid)
{
if ( setgid(gid))
{
perror("setgid");
exit(1);
}
#if HAVE_SETGROUPS
if ( getuid() == 0 && setgroups(1, &gid) )
{
perror("setgroups");
exit(1);
}
#endif
} | false | false | false | false | false | 0 |
g_vfs_goa_volume_monitor_get_mount_for_uuid (GVolumeMonitor *_self, const gchar *uuid)
{
GMount *mount;
GVolume *volume;
mount = NULL;
volume = g_volume_monitor_get_volume_for_uuid (_self, uuid);
if (volume != NULL)
mount = g_volume_get_mount (G_VOLUME (volume));
return mount;
} | false | false | false | false | false | 0 |
xmmsc_result_visc_set (xmmsc_result_t *res, xmmsc_visualization_t *visc)
{
x_return_if_fail (res);
x_return_if_fail (!res->visc);
res->visc = visc;
} | false | false | false | false | false | 0 |
fm_path_entry_paste_and_go(GtkMenuItem *menuitem, GtkEntry *entry)
{
GtkClipboard* clipboard = gtk_clipboard_get_for_display(
gtk_widget_get_display(GTK_WIDGET(menuitem)), GDK_SELECTION_CLIPBOARD);
gchar* full_path = gtk_clipboard_wait_for_text(clipboard);
if (full_path)
{
FmPathEntryP... | false | false | false | false | false | 0 |
getarg (size_t n, int *flag)
{
char
convbuf [50];
static size_t
listindex;
register char
*ret;
VAR_ *base = top() - n;
*flag = 1; /* assume that done with args */
if (typeValue(base) & e_int) /* incase of an int.. */
{
... | false | false | false | false | false | 0 |
choose_base_dir (GtkWidget *button, gpointer user_data) {
GtkWidget *dialog;
dialog = gtk_file_chooser_dialog_new(_("Set base music directory"),
GTK_WINDOW(gjay->main_window), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
... | false | false | false | false | false | 0 |
readTOC()
{
u_long version = getLSB32();
if (version != PCF_FILE_VERSION) {
error("Cannot read TOC; bad version number %lu", version);
return (false);
}
tocSize = getLSB32();
toc = new PCFTableRec[tocSize];
if (!toc) {
error("Cannot read TOC; no space for %lu records", tocSize);
return (fals... | false | false | false | false | false | 0 |
url_escape_1 (const char *s, unsigned char mask, int allow_passthrough)
{
const char *p1;
char *p2, *newstr;
int newlen;
int addition = 0;
for (p1 = s; *p1; p1++)
if (urlchr_test (*p1, mask))
addition += 2; /* Two more characters (hex digits) */
if (!addition)
return allow_passthr... | false | false | false | false | false | 0 |
wm8955_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{
struct snd_soc_codec *codec = dai->codec;
struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
int ret;
int wl;
switch (params_width(params)) {
case 16:
wl = 0;
break;
c... | false | false | false | false | false | 0 |
Unset(void) {
unset_ = true;
#ifdef HAVE_UNSETENV
unsetenv(name_.c_str());
if(ptr_) *(ptr_-1) = 0; // Removing '='
#else
// Reusing buffer
if(ptr_) {
*(ptr_-1) = 0;
putenv(ptr_-(name_.length()+1));
} else {
return false; // Never happens
};
#endif
return true;
} | false | false | false | false | false | 0 |
VasyAllianceTreatVexEqual( VexExpr )
vexexpr *VexExpr;
{
rtldecl_list *RtlDeclNXor;
rtlasg_list *RtlAsgNXor;
vexexpr *Operand1;
vexexpr *Operand2;
vexexpr *VexNXor;
vexexpr *VexAnd;
vexexpr *VexAtomNXor;
vexexpr *VexAtom;
char Buffer[ 32 ];
int Ma... | false | false | false | false | false | 0 |
nautilus_canvas_container_init (NautilusCanvasContainer *container)
{
NautilusCanvasContainerDetails *details;
static gboolean setup_prefs = FALSE;
details = g_new0 (NautilusCanvasContainerDetails, 1);
details->icon_set = g_hash_table_new (g_direct_hash, g_direct_equal);
details->layout_timestamp = UNDEFINED_TIM... | false | false | false | false | false | 0 |
toImage() const
{
return Image::constructor(QImage::fromData(mData), engine());
} | false | false | false | false | false | 0 |
debugBTree(BTree* tree, int displayTree) {
unsigned char* map;
uint32_t *heightTable;
BTKey* retFirstKey;
BTKey* retLastKey;
uint32_t numMapNodes;
uint32_t traverseCount;
uint32_t linearCount;
uint32_t errorCount;
uint8_t i;
errorCount = 0;
printf("Mapping nodes...\n"); fflush(stdout);... | false | true | false | false | false | 1 |
gst_base_sink_wait_preroll (GstBaseSink * sink)
{
sink->have_preroll = TRUE;
GST_DEBUG_OBJECT (sink, "waiting in preroll for flush or PLAYING");
/* block until the state changes, or we get a flush, or something */
GST_BASE_SINK_PREROLL_WAIT (sink);
sink->have_preroll = FALSE;
if (G_UNLIKELY (sink->flushing)... | false | false | false | false | false | 0 |
rb_io_each_line(int argc, VALUE *argv, VALUE io)
{
VALUE str, rs;
long limit;
RETURN_ENUMERATOR(io, argc, argv);
prepare_getline_args(argc, argv, &rs, &limit, io);
if (limit == 0)
rb_raise(rb_eArgError, "invalid limit: 0 for each_line");
while (!NIL_P(str = rb_io_getline_1(rs, limit, io))) {
... | false | false | false | false | false | 0 |
addBoundVar(const string& name, const Type& type,
const Expr& def) {
Expr res;
// Without the type, just replace the bound variable with the definition
if(type.isNull())
res = def;
else {
// When type is given, construct (LETDECL var, def) for the typechecker
ostringstream ss;
ss << boundVar... | false | false | false | false | false | 0 |
kernel26_led_onTimeout (Kernel26Led* self) {
gboolean result = FALSE;
g_return_val_if_fail (self != NULL, FALSE);
free_smartphone_device_led_set_brightness ((FreeSmartphoneDeviceLED*) self, 0, NULL, NULL);
result = FALSE;
return result;
} | false | false | false | false | false | 0 |
ReadNodeGeometry( Node* pNode)
{
// referred mesh is given as an attribute of the <instance_geometry> element
int attrUrl = GetAttribute( "url");
const char* url = mReader->getAttributeValue( attrUrl);
if( url[0] != '#')
ThrowException( "Unknown reference format");
Collada::MeshInstance instance;
instance.mMe... | false | false | false | false | false | 0 |
dbpriv_count_properties(Objid oid)
{
Object *o;
int nprops = 0;
for (o = dbpriv_find_object(oid); o; o = dbpriv_find_object(o->parent))
nprops += o->propdefs.cur_length;
return nprops;
} | false | false | false | false | false | 0 |
InternalCopyAllocate(
vtkDataSetAttributes::FieldList& list,
int ctype,
vtkIdType sze, vtkIdType ext)
{
vtkAbstractArray* newAA=0;
vtkDataArray* newDA=0;
int i;
// Allocate attributes if any
for (i=0; i < list.NumberOfFields; i++)
{
if ( list.FieldIndices[i] >= 0 )
{
newAA = vtkAbst... | false | false | false | false | false | 0 |
emimsg_create_withlen(int len)
{
struct emimsg *ret;
ret = gw_malloc(sizeof(struct emimsg));
ret->fields = gw_malloc(len * sizeof(Octstr *));
ret->num_fields = len;
while (--len >= 0)
ret->fields[len] = NULL;
return ret;
} | false | false | false | false | false | 0 |
thToFrame(
Th_Interp *interp,
const char *zFrame,
int nFrame,
int *piFrame
){
int iFrame;
if( th_isdigit(zFrame[0]) ){
int rc = Th_ToInt(interp, zFrame, nFrame, &iFrame);
if( rc!=TH_OK ) return rc;
iFrame = iFrame * -1;
}else if( zFrame[0]=='#' ){
int rc = Th_ToInt(interp, &zFrame[1], n... | false | false | false | false | false | 0 |
read_zimage_from_jpeg(z_file *in)
{
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
int row_buf_size;
JSAMPARRAY row_buf;
JSAMPROW jsamplerow;
z_image *result;
uint8_t *img_data, *img_data_ptr;
unsigned int i;
int j;
int sample_index;
int number_of_channels;
size_t len;
int re... | false | false | false | false | false | 0 |
get_slice_params(HSQUIRRELVM v,SQInteger &sidx,SQInteger &eidx,SQObjectPtr &o)
{
SQInteger top = sq_gettop(v);
sidx=0;
eidx=0;
o=stack_get(v,1);
SQObjectPtr &start=stack_get(v,2);
if(type(start)!=OT_NULL && sq_isnumeric(start)){
sidx=tointeger(start);
}
if(top>2){
SQObjectPtr &end=stack_get(v,3);
if(sq_is... | false | false | false | false | false | 0 |
Scm_StringRef(ScmString *str, int pos, int range_error)
{
const ScmStringBody *b = SCM_STRING_BODY(str);
int len = SCM_STRING_BODY_LENGTH(b);
/* we can't allow string-ref on incomplete strings, since it may yield
invalid character object. */
if (SCM_STRING_BODY_INCOMPLETE_P(b)) {
Scm_Err... | false | false | false | false | false | 0 |
double2clock(double n)
{
auto int x, h, m, s;
if (++retnum == MAXRET)
retnum = 0;
if (n <= 0.0)
sprintf(retstr[retnum], " ");
else {
#if 0
x = floor(n);
#else
x = (int)n;
#endif
h = (int)(x / 60 / 60);
x %= 60 * 60;
m = (int)(x / 60);
s = (int)(x % 60);
#if 0
spr... | false | false | false | false | false | 0 |
generate_fits_header_info( FL_IMAGE * im )
{
SPEC *h = im->io_spec;
char **q;
if ( ! ( im->info = fl_malloc( 1024 ) ) )
return;
for ( im->info[ 0 ] = '\0', q = FITS_header_info( h ); *q; q++ )
strcat( strcat( im->info, *q ),"\n" );
} | false | true | false | false | false | 1 |
test_gtk_plugin_manager_store_verify_info (TestFixture *fixture)
{
GtkTreeIter iter;
PeasPluginInfo *info;
gchar *model_info;
/* Has description */
info = peas_engine_get_plugin_info (fixture->engine, "configurable");
g_assert (peas_gtk_plugin_manager_store_get_iter_from_plugin (fixture->store,
... | false | false | false | false | false | 0 |
go_style_is_different_size (GOStyle const *a, GOStyle const *b)
{
if (a == NULL || b == NULL)
return TRUE;
return a->line.dash_type != b->line.dash_type ||
a->line.width != b->line.width ||
a->fill.type != b->fill.type ||
a->text_layout.angle != b->text_layout.angle ||
!go_font_eq (a->font.font, b->font.fon... | false | false | false | false | false | 0 |
gpio_vbus_set_suspend(struct usb_phy *phy, int suspend)
{
struct gpio_vbus_data *gpio_vbus;
gpio_vbus = container_of(phy, struct gpio_vbus_data, phy);
/* draw max 0 mA from vbus in suspend mode; or the previously
* recorded amount of current if not suspended
*
* NOTE: high powered configs (mA > 100) may draw... | false | false | false | false | false | 0 |
c8sectpfe_remove(struct platform_device *pdev)
{
struct c8sectpfei *fei = platform_get_drvdata(pdev);
struct channel_info *channel;
int i;
wait_for_completion(&fei->fw_ack);
c8sectpfe_tuner_unregister_frontend(fei->c8sectpfe[0], fei);
/*
* Now loop through and un-configure each of the InputBlock resources
... | false | false | false | false | false | 0 |
buf_apply(int mode, struct from_utf8_mac_status *sp, unsigned char *o)
{
int n = 0;
VALUE next_info = mode == 3 ? from_utf8_mac_nfc3 : from_utf8_mac_nfc2;
next_info = get_info(next_info, sp);
switch (next_info & 0x1F) {
case THREEbt:
case TWObt:
o[n++] = getBT1(next_info);
o[... | false | false | false | false | false | 0 |
pki_key_generate_ecdsa(ssh_key key, int parameter) {
int nid;
int ok;
switch (parameter) {
case 384:
nid = NID_secp384r1;
break;
case 512:
nid = NID_secp521r1;
break;
case 256:
default:
nid = NID_X9_62_prime256v1;
... | false | false | false | false | false | 0 |
markObject(Object* Obj){
// recursively mark all objects escaped
// added by mazder
Obj->escaped = true;
numEscapedObejct++;
for(int i=0; i<Obj->getPointersMax(); i++){
Object* child = Obj->getReferenceTo(i);
if( (child != NULL) && (!child->escaped) ){
markObject(child);
}
}
} | false | false | false | false | false | 0 |
max98090_configure_bclk(struct snd_soc_codec *codec)
{
struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec);
unsigned long long ni;
int i;
if (!max98090->sysclk) {
dev_err(codec->dev, "No SYSCLK configured\n");
return;
}
if (!max98090->bclk || !max98090->lrclk) {
dev_err(codec->dev, "No audio... | false | false | false | false | false | 0 |
label_cmp(struct aa_label *a, struct aa_label *b)
{
AA_BUG(!b);
if (a == b)
return 0;
return vec_cmp(a->vec, a->size, b->vec, b->size);
} | false | false | false | false | false | 0 |
transportEnc_Close(HANDLE_TRANSPORTENC *phTp)
{
if (phTp != NULL)
{
if (*phTp != NULL) {
FreeRam_TransportEncoder(phTp);
}
}
} | false | false | false | false | false | 0 |
ensPredictionexonNewIni(EnsPPredictionexonadaptor pea,
ajuint identifier,
EnsPFeature feature,
ajint sphase,
double score,
... | false | false | false | false | false | 0 |
dump_dist_dir_vectors (FILE *file, vec<ddr_p> ddrs)
{
unsigned int i, j;
struct data_dependence_relation *ddr;
lambda_vector v;
FOR_EACH_VEC_ELT (ddrs, i, ddr)
if (DDR_ARE_DEPENDENT (ddr) == NULL_TREE && DDR_AFFINE_P (ddr))
{
FOR_EACH_VEC_ELT (DDR_DIST_VECTS (ddr), j, v)
{
fprintf (file, "DI... | false | false | false | false | false | 0 |
read_toc(vcd_priv * priv, char ** iso_label)
{
int i, j;
cdio_iso_analysis_t iso;
cdio_fs_anal_t fs;
int first_track;
priv->num_tracks = cdio_get_last_track_num(priv->cdio);
if(priv->num_tracks == CDIO_INVALID_TRACK)
{
return 0;
}
/* VCD needs at least 2 tracks */
if(priv->num_tracks < ... | false | false | false | false | false | 0 |
ar9003_tx_gain_table_apply(struct ath_hw *ah)
{
switch (ar9003_hw_get_tx_gain_idx(ah)) {
case 0:
default:
if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
5);
else if (AR_SRE... | false | false | false | false | false | 0 |
set_ident_text(const gchar * ident)
{
gint pos;
const gchar *loading = currently_loading();
pos = ident_basename_pos(ident);
if (loading) {
gchar *concat = g_strconcat(ident, " ", _("loading"), ":",
loading, NULL);
gtk_entry_set_text(entry_ident, con... | false | false | false | false | false | 0 |
Scheduler_Row_Lookahead_free_func(gpointer data,
gpointer user_data){
register Scheduler_Cell *cell = data;
register Scheduler_Row *row = user_data;
g_assert(cell);
/* Do not destroy cells - just add to the used_list */
SList_queue(row->used_list, cell);
r... | false | false | false | false | false | 0 |
w_worldpos(struct wcs *wcs, double xpix, double ypix, double *xpos, double *ypos)
{
double X, E, ra, dec;
double xref=wcs->xref;
double yref=wcs->yref;
double epoch = 2000.0 + (wcs->jd - JD2000) / 365.25;
// d3_printf("pix x:%.4f y:%.4f\n", xpix, ypix);
xy_to_XE(wcs, xpix, ypix, &X, &E);
// d3_printf("pix X:%.4f ... | false | false | false | false | false | 0 |
is_mmc (byte *sysex_buf, size_t len)
{
if (len < 4 || len > 48) {
return false;
}
if (sysex_buf[1] != 0x7f) {
return false;
}
if (sysex_buf[3] != 0x6 && /* MMC Command */
sysex_buf[3] != 0x7) { /* MMC Response */
return false;
}
return true;
} | false | false | false | false | false | 0 |
videobuf_alloc_vb(struct videobuf_queue *q)
{
struct videobuf_buffer *vb;
BUG_ON(q->msize < sizeof(*vb));
if (!q->int_ops || !q->int_ops->alloc_vb) {
printk(KERN_ERR "No specific ops defined!\n");
BUG();
}
vb = q->int_ops->alloc_vb(q->msize);
if (NULL != vb) {
init_waitqueue_head(&vb->done);
vb->magic ... | false | false | false | false | false | 0 |
simd_intrinsic_emit_store (const SimdIntrinsc *intrinsic, MonoCompile *cfg, MonoMethod *cmethod, MonoInst **args)
{
MonoInst *ins;
int vreg;
vreg = get_simd_vreg (cfg, cmethod, args [1]);
MONO_INST_NEW (cfg, ins, intrinsic->opcode);
ins->klass = cmethod->klass;
ins->dreg = args [0]->dreg;
ins->sreg1 = vreg;
i... | false | false | false | false | false | 0 |
ecell_mouse_ewindow(char *event, int length)
{
int res = NONE;
if (!strncasecmp(event, all_codes[MOUSE_MOVE], length))
res = MOUSE_MOVE;
else if (!strncasecmp(event, all_codes[MOUSE_BUTTON_PRESS],
length))
res = MOUSE_BUTTON_PRESS;
else if (!strncasecmp(event, all_codes[MOUSE_BUTTON_RELEASE],
... | false | false | false | false | false | 0 |
dummy_bus_resume(struct usb_hcd *hcd)
{
struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd);
int rc = 0;
dev_dbg(&hcd->self.root_hub->dev, "%s\n", __func__);
spin_lock_irq(&dum_hcd->dum->lock);
if (!HCD_HW_ACCESSIBLE(hcd)) {
rc = -ESHUTDOWN;
} else {
dum_hcd->rh_state = DUMMY_RH_RUNNING;
set_link_state(dum_... | false | false | false | false | false | 0 |
max_op (GelCtx *ctx, GelETree * * a, gboolean *exception)
{
GelETree *max = NULL;
int i;
if (a[1] == NULL) {
if (a[0]->type == GEL_MATRIX_NODE) {
int j, w, h;
if G_UNLIKELY ( ! gel_is_matrix_value_only (a[0]->mat.matrix)) {
gel_errorout (_("%s: matrix argument must be value only"),
"max");
... | false | false | false | false | false | 0 |
_gda_marshal_VOID__SLIST (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__SLIST) (gpointer data1,
... | false | false | false | false | false | 0 |
quirk_ide_samemode(struct pci_dev *pdev)
{
u8 prog;
pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);
if (((prog & 1) && !(prog & 4)) || ((prog & 4) && !(prog & 1))) {
dev_info(&pdev->dev, "IDE mode mismatch; forcing legacy mode\n");
prog &= ~5;
pdev->class &= ~5;
pci_write_config_byte(pdev, PCI_CLASS_PRO... | false | false | false | false | false | 0 |
addSubjob(KJob *jobBase)
{
//kDebug(7007) << "addSubjob(" << jobBase << ") this=" << this;
bool ok = KCompositeJob::addSubjob( jobBase );
KIO::Job *job = dynamic_cast<KIO::Job*>( jobBase );
if (ok && job) {
// Copy metadata into subjob (e.g. window-id, user-timestamp etc.)
Q_D(Job);
... | false | false | false | false | false | 0 |
Initialize()
{
// stop current move
m_owner->StopMoving();
// clear ALL movement generators (including default)
Clear(false, true);
// set new default movement generator
if (m_owner->GetTypeId() == TYPEID_UNIT && !m_owner->hasUnitState(UNIT_STAT_CONTROLLED))
{
MovementGenerator* mo... | false | false | false | false | false | 0 |
EffectTaunt(SpellEffectIndex /*eff_idx*/)
{
if (!unitTarget)
return;
// this effect use before aura Taunt apply for prevent taunt already attacking target
// for spell as marked "non effective at already attacking target"
if (unitTarget->GetTypeId() != TYPEID_PLAYER)
{
if (unitTarge... | false | false | false | false | false | 0 |
parse()
{
if (IS(WAITDATA)) { // recursive invocation
state &= ~S_WAITDATA;
return (0);
}
// stop control channel idle timeout
Dispatcher::instance().stopTimer(this);
pushToken(T_NIL); // reset state
for (;;) {
/*
* Fetch the next complete line of input received on the
* control chan... | false | false | false | false | false | 0 |
__midgard_query_constraint_set_property (GObject *object, guint property_id,
const GValue *value, GParamSpec *pspec)
{
MidgardQueryConstraint *self = (MidgardQueryConstraint *) (object);
GdaSqlOperatorType op_type;
gchar *op;
switch (property_id) {
case MIDGARD_QUERY_CONSTRAINT_PROPERTY:
midgard_query_con... | false | false | false | false | false | 0 |
lowerVRSAVESpilling(MachineBasicBlock::iterator II,
unsigned FrameIndex) const {
// Get the instruction.
MachineInstr &MI = *II; // ; SPILL_VRSAVE <SrcReg>, <offset>
// Get the instruction's basic block.
MachineBasicBlock &MBB = *MI.getParent();
MachineFunction ... | false | false | false | false | false | 0 |
master_strdup(char *str)
{
char *tmp;
tmp = strdup(str);
if (!tmp)
master_error("memory allocation error");
return tmp;
} | false | false | false | false | false | 0 |
SetName(v8::Handle<v8::String> name) {
ENTER_V8;
i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
func->shared()->set_name(*Utils::OpenHandle(*name));
} | false | false | false | false | false | 0 |
bt_struct_declaration_add_field(struct declaration_struct *struct_declaration,
const char *field_name,
struct bt_declaration *field_declaration)
{
struct declaration_field *field;
unsigned long index;
g_array_set_size(struct_declaration->fields, struct_declaration->fields->len + 1);
index = struct_decl... | false | false | false | false | false | 0 |
find_route(int fromRoom, int toRoom, int known)
{
Set visited;
Queue q;
int firstTime;
int result = DIR_NONE;
setInit(&visited);
qInit(&q);
qAppend(&q, fromRoom, DIR_NONE);
setAdd(&visited, fromRoom);
firstTime = 1;
while (!qIsEmpty(&q))
{
int n, dir, firstDir;
qPop(&q, &n, &firstDir)... | false | false | false | false | false | 0 |
bnxt_set_features(struct net_device *dev, netdev_features_t features)
{
struct bnxt *bp = netdev_priv(dev);
u32 flags = bp->flags;
u32 changes;
int rc = 0;
bool re_init = false;
bool update_tpa = false;
flags &= ~BNXT_FLAG_ALL_CONFIG_FEATS;
if ((features & NETIF_F_GRO) && (bp->pdev->revision > 0))
flags |= B... | false | false | false | false | false | 0 |
trace(const Ray &ray)
{
// Find hit object and distance
Hit min_hit(std::numeric_limits<double>::infinity(),Vector());
Object *obj = NULL;
for (unsigned int i = 0; i < objects.size(); ++i) {
Hit hit(objects[i]->intersect(ray));
if (hit.t<min_hit.t) {
min_hit = hit;
... | 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.