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 |
|---|---|---|---|---|---|---|
unpack_one(unsigned nr)
{
unsigned shift;
unsigned char *pack, c;
unsigned long size;
enum object_type type;
obj_list[nr].offset = consumed_bytes;
pack = fill(1);
c = *pack;
use(1);
type = (c >> 4) & 7;
size = (c & 15);
shift = 4;
while (c & 0x80) {
pack = fill(1);
c = *pack;
use(1);
size += (c & ... | false | false | false | false | false | 0 |
tga_convert_depth(tga_image *img, const uint8_t bits)
{
size_t src_size, dest_size;
uint8_t src_bpp, dest_bpp;
uint8_t *src, *dest;
if (!UNMAP_DEPTH(bits) ||
!SANE_DEPTH(img->pixel_depth)
) return TGAERR_PIXEL_DEPTH;
if (tga_is_colormapped(img))
{
tga_result result = ... | false | false | false | false | false | 0 |
check_dnskey_rdata(const knot_rrset_t *rrset, size_t rdata_pos)
{
/* check that Zone key bit it set - position 7 in net order */
const uint16_t mask = 1 << 8; //0b0000000100000000;
uint16_t flags =
knot_wire_read_u16(knot_rrset_get_rdata(rrset, rdata_pos));
if (flags & mask) {
return KNOT_EOK;
} else {
/* ... | false | false | false | false | false | 0 |
parse_conf_file(int type, int cold)
{
FBFILE *file = NULL;
const char *filename = get_conf_name(type);
if ((file = fbopen(filename, "r")) == NULL)
{
if (cold)
ilog(L_ERROR, "Unable to read configuration file '%s': %s",
filename, strerror(errno));
else
sendto_realops_flags(UMODE_A... | false | false | false | false | false | 0 |
ladish_dict_get(ladish_dict_handle dict_handle, const char * key)
{
struct ladish_dict_entry * entry_ptr;
entry_ptr = ladish_dict_find_key(dict_ptr, key);
if (entry_ptr == NULL)
{
return NULL;
}
ASSERT(entry_ptr->value != NULL);
return entry_ptr->value;
} | false | false | false | false | false | 0 |
LsWriteListingHexBytes (
UINT8 *Buffer,
UINT32 Length,
UINT32 FileId)
{
UINT32 i;
/* Transfer all requested bytes */
for (i = 0; i < Length; i++)
{
/* Print line header when buffer is empty */
if (Gbl_Cu... | false | false | false | false | false | 0 |
prob(p, LINK)
thisperson **p;
struct LOC_likelihood *LINK;
{
int i;
thisperson *WITH;
unsigned char *tempflag1; /*Next two declarations by R. M. Idury*/
double *tempwith1;
#if PARALLEL
short genindex; /*Index into genbank for parallel computation*/
#endif
WITH = *p;
if (WITH->newgenexists) return; /*F... | false | false | false | false | false | 0 |
check_inverse(const char option[], int *invert, int *optind, int argc)
{
if (option && strcmp(option, "!") == 0) {
if (*invert)
exit_error(PARAMETER_PROBLEM,
"Multiple `!' flags not allowed");
*invert = TRUE;
if (optind) {
*optind = *optind+1;
if (argc && *optind > argc)
exit_error(PARAMETER_... | false | false | false | false | false | 0 |
Activate(Widget text, XtPointer tag, XtPointer data)
#else
static void Activate(text, tag, data)
Widget text;
XtPointer tag;
XtPointer data;
#endif
{
XmtInputFieldWidget iw = (XmtInputFieldWidget) text;
XmtInputFieldCallbackStruct verify;
String input;
int input_length;
Boolean status;
/* if we... | false | false | false | false | false | 0 |
setHeader( K3DockWidgetAbstractHeader* h )
{
if ( !h ) return;
if ( header ){
delete header;
delete layout;
header = h;
layout = new QVBoxLayout( this );
layout->setSizeConstraint( QLayout::Minimum );
layout->addWidget( header );
setWidget( widget );
} else {
header = h;
layo... | false | false | false | false | false | 0 |
sweep(c)
Client *c;
{
XEvent ev;
int status;
XButtonEvent *e;
ScreenInfo *s;
s = c->screen;
status = grab(s->root, s->root, ButtonMask, s->sweep0, 0);
if (status != GrabSuccess) {
graberror("sweep", status); /* */
return 0;
}
XMaskEvent(dpy, ButtonMask, &ev);
e = &ev.xbutton;
if (e->button != Button3) ... | false | false | false | false | false | 0 |
find_description(CHAR16 *label)
{
boot_image_t *img;
/* Attempt to find the image name now */
for (img = image_list; img; img = img->next) {
if (StriCmp(img->label, label) == 0) {
return img->description;
}
}
return NULL;
} | false | false | false | false | false | 0 |
_get_new_origin(Object inp, int *origin, int count, int ncols,
int *binx, int *biny, Vector p)
{
int isizex, isizey;
int bsizex, bsizey;
int xoffset, yoffset;
int row, col;
int min_x, min_y;
row = count / ncols +1;
col = count % ncols;
bsizex = binx[col+1]-binx[col];
bsizey = biny[row-1]-biny[row];
DXG... | false | false | false | false | false | 0 |
SyncEditor(int selIndex)
{
wxFileName filename(control->GetItemText(selIndex));
wxString file;
if (!filename.IsAbsolute())
filename.MakeAbsolute(m_Base);
file = filename.GetFullPath();
wxListItem li;
li.m_itemId = selIndex;
li.m_col = 1;
li.m_mask = wxLIST_MASK_TEXT;
control... | false | false | false | false | false | 0 |
wcn36xx_smd_dump_cmd_req(struct wcn36xx *wcn, u32 arg1, u32 arg2,
u32 arg3, u32 arg4, u32 arg5)
{
struct wcn36xx_hal_dump_cmd_req_msg msg_body;
int ret = 0;
mutex_lock(&wcn->hal_mutex);
INIT_HAL_MSG(msg_body, WCN36XX_HAL_DUMP_COMMAND_REQ);
msg_body.arg1 = arg1;
msg_body.arg2 = arg2;
msg_body.arg3 = arg... | false | false | false | false | false | 0 |
kempld_detect_device(struct kempld_device_data *pld)
{
u8 index_reg;
int ret;
mutex_lock(&pld->lock);
/* Check for empty IO space */
index_reg = ioread8(pld->io_index);
if (index_reg == 0xff && ioread8(pld->io_data) == 0xff) {
mutex_unlock(&pld->lock);
return -ENODEV;
}
/* Release hardware mutex if acqui... | false | false | false | false | false | 0 |
FreeImage_FIFSupportsReading(FREE_IMAGE_FORMAT fif) {
if (s_plugins != NULL) {
PluginNode *node = s_plugins->FindNodeFromFIF(fif);
return (node != NULL) ? node->m_plugin->load_proc != NULL : FALSE;
}
return FALSE;
} | false | false | false | false | false | 0 |
slot_skills()
{
QRadioButton* skill = 0;
foreach(QRadioButton* rb, m_player_two.computer.skills) {
if(rb->isChecked()) {
skill = rb;
break;
}
}
if(skill)
m_player_two.name->setText("*"+skill->text()+"*");
} | false | false | false | false | false | 0 |
m_can_handle_lec_err(struct net_device *dev,
enum m_can_lec_type lec_type)
{
struct m_can_priv *priv = netdev_priv(dev);
struct net_device_stats *stats = &dev->stats;
struct can_frame *cf;
struct sk_buff *skb;
priv->can.can_stats.bus_error++;
stats->rx_errors++;
/* propagate the error condition to the CAN ... | false | false | false | false | false | 0 |
ms_container_sheet (MSContainer const *c)
{
g_return_val_if_fail (c != NULL, NULL);
g_return_val_if_fail (c->vtbl != NULL, NULL);
if (c->vtbl->sheet == NULL)
return NULL;
return (*c->vtbl->sheet) (c);
} | false | false | false | false | false | 0 |
renderParticles(GemState *state)
{
if (m_tickTime > 0.f)
{
pFollow(m_accel);
}
} | false | false | false | false | false | 0 |
show_error( const char * const msg, const int errcode, const bool help )
{
if( verbosity >= 0 )
{
if( msg && msg[0] )
{
fprintf( stderr, "%s: %s", program_name, msg );
if( errcode > 0 ) fprintf( stderr, ": %s", strerror( errcode ) );
fprintf( stderr, "\n" );
}
if( help )
... | false | false | false | false | false | 0 |
get_next_fr_off(ADIO_File fd,
ADIO_Offset off,
ADIO_Offset fr_st_off,
MPI_Datatype *fr_type_p,
ADIO_Offset *fr_next_off_p,
ADIO_Offset *fr_max_len_p)
{
MPI_Aint fr_extent = -1;
ADIO_Offset tmp_off, off_rem;
ADIOI_Flatlist_node *fr_node_p = ADIOI_Flatlist;
int i = -1, fr_dt... | false | false | false | false | false | 0 |
_k_draw_view_list(state_t *s, gfxw_list_t *list, int flags)
/* Draws list_nr members of list to s->pic. */
{
gfxw_dyn_view_t *widget = (gfxw_dyn_view_t *) list->contents;
if (GFXWC(s->port) != GFXWC(s->dyn_views->parent))
return; /* Return if the pictures are meant for a different port */
while (widget) {
... | false | false | false | false | false | 0 |
__ipoib_reap_ah(struct net_device *dev)
{
struct ipoib_dev_priv *priv = netdev_priv(dev);
struct ipoib_ah *ah, *tah;
LIST_HEAD(remove_list);
unsigned long flags;
netif_tx_lock_bh(dev);
spin_lock_irqsave(&priv->lock, flags);
list_for_each_entry_safe(ah, tah, &priv->dead_ahs, list)
if ((int) priv->tx_tail - (i... | false | false | false | false | false | 0 |
suite_start(int tests, const string& name)
{
if (tests > 0)
{
_suite_name = name;
_suite_tests = _suite_errors = 0;
_suite_total_tests = tests;
_suite_error_list.clear();
_stream << _suite_name << ": "
<< "0/" << _suite_total_tests
<< "\r" << flush;
}
} | false | false | false | false | false | 0 |
i40e_link_test(struct net_device *netdev, u64 *data)
{
struct i40e_netdev_priv *np = netdev_priv(netdev);
struct i40e_pf *pf = np->vsi->back;
i40e_status status;
bool link_up = false;
netif_info(pf, hw, netdev, "link test\n");
status = i40e_get_link_status(&pf->hw, &link_up);
if (status) {
netif_err(pf, drv, ... | false | false | false | false | false | 0 |
urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
{
static int maxwarn = 10;
int ret;
if (unlikely(nonblocking_pool.initialized == 0) &&
maxwarn > 0) {
maxwarn--;
printk(KERN_NOTICE "random: %s: uninitialized urandom read "
"(%zd bytes read, %d bits of entropy availabl... | false | false | false | false | false | 0 |
SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const
{
ai_assert(InRange(a) && InRange(b));
const size_t cnt = std::max(static_cast<size_t>(0),EstimateSampleCount(a,b));
out.verts.reserve( out.verts.size() + cnt );
IfcFloat p = a, delta = (b-a)/cnt;
for(size_t i = 0; i < cnt; ++i, p += delta) {
out.verts... | false | false | false | false | false | 0 |
timer32Reset(uint8_t timerNum)
{
uint32_t regVal;
if ( timerNum == 0 )
{
regVal = TMR_TMR32B0TCR;
regVal |= TMR_TMR32B0TCR_COUNTERRESET_ENABLED;
TMR_TMR32B0TCR = regVal;
}
else if (timerNum == 1)
{
regVal = TMR_TMR32B1TCR;
regVal |= TMR_TMR32B1TCR_COUNTERRESET_ENABLED;
TMR_TMR32B1T... | false | false | false | false | false | 0 |
is_capture_proxy (tree decl)
{
return (TREE_CODE (decl) == VAR_DECL
&& DECL_HAS_VALUE_EXPR_P (decl)
&& !DECL_ANON_UNION_VAR_P (decl)
&& LAMBDA_FUNCTION_P (DECL_CONTEXT (decl)));
} | false | false | false | false | false | 0 |
tsc40_init(int fd, unsigned long *id, unsigned long *extra)
{
unsigned char cmd[2], data;
unsigned int eeprom;
/* Datasheet can be found here:
* http://www.distec.de/PDF/Drivers/DMC/TSC40_Protocol_Description.pdf
*/
#define TSC40_CMD_DATA1 0x01
#define TSC40_CMD_RATE 0x05
#define TSC40_CMD_ID 0x15
#define TSC4... | false | false | false | false | false | 0 |
calBeta(double *beta, GraphView const *gv, unsigned int chain)
{
StochasticNode *snode = gv->nodes()[0];
const double xold = *snode->value(chain);
vector<StochasticNode const*> const &stoch_children =
gv->stochasticChildren();
double xnew = xold + 1;
gv->setValue(&xnew, 1, chain);
double *b... | false | false | false | false | false | 0 |
setmark_pos(c, pos, fnum)
int c;
pos_T *pos;
int fnum;
{
int i;
/* Check for a special key (may cause islower() to crash). */
if (c < 0)
return FAIL;
if (c == '\'' || c == '`')
{
if (pos == &curwin->w_cursor)
{
setpcmark();
/* keep it even when the cursor doesn't move *... | false | false | false | false | false | 0 |
ext2fs_allocate_subcluster_bitmap(ext2_filsys fs,
const char *descr,
ext2fs_block_bitmap *ret)
{
__u64 start, end, real_end;
ext2fs_generic_bitmap bmap;
errcode_t retval;
EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
fs->write_bitmaps = ext2fs_write_bitmaps;
if (!fs->cluster_ratio_bit... | false | false | false | false | false | 0 |
LLVMOrcGetSymbolAddress(LLVMOrcJITStackRef JITStack,
const char *SymbolName) {
OrcCBindingsStack &J = *unwrap(JITStack);
auto Sym = J.findSymbol(SymbolName, true);
return Sym.getAddress();
} | false | false | false | false | false | 0 |
reset_dt()
{
dtv = update->dt;
dtf = 0.5 * update->dt * force->ftm2v;
dthalf = 0.5 * update->dt;
dt4 = 0.25 * update->dt;
dt8 = 0.125 * update->dt;
dto = dthalf;
// If using respa, then remap is performed in innermost level
if (strstr(update->integrate_style,"respa"))
dto = 0.5*step_respa[0];
i... | false | false | false | false | false | 0 |
syn_ps2_read_ident (int fd,
int stick,
info_type *info)
{
byte bytes [3];
syn_ps2_status_rqst (fd, stick, PS2_SYN_CMD_IDENTIFY, bytes);
if (bytes [1] != PS2_SYN_STATUS_OK) {
gpm_report (GPM_PR_ERR,"PS/2 device doesn't appear to have synaptics %s identification\n",
(stick?"sticks":"touchpads"));
... | false | false | false | false | false | 0 |
DestroyControls()
{
if ( !Manager::Get()->IsAppShuttingDown() )
{
Manager::Get()->GetAppWindow()->RemoveEventHandler(this);
}
} | false | false | false | false | false | 0 |
cli_getunamb (const char *tok, void **choices, cli_selector_t sel)
{
void **wcon = NULL;
char *w = NULL;
unsigned mn = 0;
void *ret = NULL;
if (!choices || !tok || !*tok)
return NULL;
for (wcon = choices; *wcon; wcon++) {
w = st... | false | false | false | false | false | 0 |
exofs_invalidatepage(struct page *page, unsigned int offset,
unsigned int length)
{
EXOFS_DBGMSG("page 0x%lx offset 0x%x length 0x%x\n",
page->index, offset, length);
WARN_ON(1);
} | false | false | false | false | false | 0 |
is_same_proto(GF_Proto *extern_proto, GF_Proto *proto)
{
u32 i, count;
/*CRML allows external protos to have more fields defined that the externProto referencing them*/
if (gf_list_count(extern_proto->proto_fields) > gf_list_count(proto->proto_fields)) return 0;
count = gf_list_count(extern_proto->proto_fields);
f... | false | false | false | false | false | 0 |
dmesh_close(void)
{
GSList *banned = NULL;
GSList *sl;
dmesh_store();
dmesh_ban_store();
hikset_foreach(mesh, dmesh_free_kv, NULL);
hikset_free_null(&mesh);
/*
* Construct a list of banned mesh entries to remove, then manually
* expire all the entries, which will remove entries from `ban_mesh'
* and `ba... | false | false | false | false | false | 0 |
gnm_expr_sharer_share (GnmExprSharer *es, GnmExprTop const *texpr)
{
GnmExprTop const *shared;
g_return_val_if_fail (es != NULL, texpr);
g_return_val_if_fail (texpr != NULL, NULL);
es->nodes_in++;
/* Corners must not get shared. */
if (GNM_EXPR_GET_OPER (texpr->expr) == GNM_EXPR_OP_ARRAY_CORNER)... | false | false | false | false | false | 0 |
csnset_update_csn(CSNSet **csnset, CSNType t, const CSN *csn)
{
const CSNSet *f= csnset_get_csnset_node_from_type(*csnset, t);
if(f==NULL)
{
csnset_add_csn(csnset,t,csn);
}
else
{
if (csn_compare(csn, (CSN*)(&f->csn)) > 0)
{
csn_init_by_csn((CSN*)(&f->csn),csn);
}
}
} | false | false | false | false | false | 0 |
get_biblio(void)
{
int32 i;
char *md;
char *bib="No bibliographic data";
char *bibb; char *bibe;
char *t;
static char buffer[TREATY_MINIMUM_EXTENT];
i=babel_treaty(GET_STORY_FILE_METADATA_EXTENT_SEL,NULL,0);
if (i<=0) return bib;
md=(char *) my_malloc(i,"Metadata buffer");
if (babel_treaty(GET... | false | false | false | false | false | 0 |
file_location(gchar * filename, gchar *file_location){
struct stat buf;
gchar mappath[2048];
g_snprintf (mappath, sizeof (mappath), "%s%s", local_config.dir_maps, filename);
g_snprintf (mappath, sizeof (mappath), "data/maps/%s", filename);
g_snprintf (mappath, sizeof (mappath), "%s/gpsdrive/maps/%... | false | false | false | false | true | 1 |
vect_make_slp_decision (loop_vec_info loop_vinfo)
{
unsigned int i, unrolling_factor = 1;
VEC (slp_instance, heap) *slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
slp_instance instance;
int decided_to_slp = 0;
if (vect_print_dump_info (REPORT_SLP))
fprintf (vect_dump, "=== vect_make_slp_decision ... | false | false | false | false | false | 0 |
lzip_tail(struct archive_read_filter *self)
{
struct private_data *state;
const unsigned char *f;
ssize_t avail_in;
int tail;
state = (struct private_data *)self->data;
if (state->lzip_ver == 0)
tail = 12;
else
tail = 20;
f = __archive_read_filter_ahead(self->upstream, tail, &avail_in);
if (f == NULL && a... | false | false | false | false | false | 0 |
GetFullNameInternal(TargetType type, const char* config,
bool implib)
{
std::string prefix;
std::string base;
std::string suffix;
this->GetFullNameInternal(type, config, implib, prefix, base, suffix);
return prefix+base+suffix;
} | false | false | false | false | false | 0 |
get_type_operators(counter_type type) {
const type_operators *to = const_type_operators;
while (to) {
if (to->type == type) {
return to;
}
to++;
}
return NULL;
} | false | false | false | false | false | 0 |
set_indicator_value (float val)
{
float newval = val;
if (_scale_mode == ZeroGainMode) {
newval = gain_to_slider_position (val);
}
if (!_oob_flag) {
newval = f_min (newval, _upper_bound);
newval = f_max (newval, _lower_bound);
}
if (newval != _ind_value) {
_ind_value = newval;
Refresh(false);
}
} | false | false | false | false | false | 0 |
mps_trackdatapoint_w(gbfile* mps_file, int mps_ver, const waypoint* wpt)
{
int lat, lon;
time_t t = wpt->creation_time;
char zbuf[10];
double mps_altitude = wpt->altitude;
double mps_depth = unknown_alt;
lat = GPS_Math_Deg_To_Semi(wpt->latitude);
lon = GPS_Math_Deg_To_Semi(wpt->longitude);
if (WAYPT_H... | true | true | false | false | false | 1 |
nfs_do_root_mount(struct file_system_type *fs_type,
int flags, void *data, const char *hostname)
{
struct vfsmount *root_mnt;
char *root_devname;
size_t len;
len = strlen(hostname) + 5;
root_devname = kmalloc(len, GFP_KERNEL);
if (root_devname == NULL)
return ERR_PTR(-ENOMEM);
/* Does hostname needs to be e... | false | false | false | false | false | 0 |
computeMinimum(const MSFloatVector& model_,MSIndexVector& index_)
{
double val=DBL_MAX;
MSIndexVector index(computeIndex(model_,index_));
for (unsigned i=index(0);i<index(1);i++) val=val<model_(i)?val:model_(i);
return val;
} | false | false | false | false | false | 0 |
take(Entity* e)
{
Move moveOp;
moveOp->setFrom(m_entityId);
Anonymous what;
what->setLoc(m_entityId);
std::vector<double> p(3, 0.0);
what->setPos(p); // cyphesis is rejecting move ops with no pos set
what->setId(e->getId());
moveOp->setArgs1(what);
getConnection()->send(moveOp);
... | false | false | false | false | false | 0 |
bind_display_list() {
exp_bind* curr; /* Pointer to current expression binding */
curr = eb_head;
printf( "Expression binding list:\n" );
while( curr != NULL ) {
switch( curr->type ) {
case FUNIT_AFUNCTION :
case FUNIT_FUNCTION :
printf( " Expr: %d, %s, line %d; Functional Unit:... | false | false | false | false | false | 0 |
changeEvent( QEvent *event )
{
QWidget::changeEvent( event );
if( !event || event->type() == QEvent::EnabledChange )
updateCursor();
} | false | false | false | false | false | 0 |
DMFlagCallback( void *self )
{
menulist_s *f = ( menulist_s * ) self;
int flags;
int bit = 0;
flags = Cvar_VariableIntValue("dmflags");
if ( f == &s_friendlyfire_box )
{
if ( f->curvalue )
flags &= ~DF_NO_FRIENDLY_FIRE;
else
flags |= DF_NO_FRIENDLY_FIRE;
goto setvalue;
}
else if ( f == &s_falls_bo... | false | false | false | false | false | 0 |
mktable(unsigned char *lengths, int nlengths,
#ifdef ANALYSIS
const char *alphabet,
#endif
int *error)
{
int codes[MAXSYMS];
int maxlen;
#ifdef ANALYSIS
if (alphabet && analyse_level > 1) {
int i, col = 0;
printf("code lengths for %s alphabet:\n", alphabet);
for (i = 0; i < nlengths; i++... | false | false | false | true | false | 1 |
draw_caret(TextFieldWidget w)
{
long x, y, tmp;
if (!w->textfield.display_caret ||
(w->textfield.sel_set &&
(w->textfield.sel_start_x != w->textfield.sel_stop_x ||
w->textfield.sel_start_y != w->textfield.sel_stop_y)))
return;
x = w->shadow.shadow_width + w->textfield.internal_width;
y = w->sha... | false | false | false | false | false | 0 |
hv_synic_free(void)
{
int cpu;
kfree(hv_context.hv_numa_map);
for_each_present_cpu(cpu)
hv_synic_free_cpu(cpu);
} | false | false | false | false | false | 0 |
ds1685_rtc_sysfs_time_regs_lookup(const char *name, bool bcd_mode)
{
const struct ds1685_rtc_time_regs *p;
if (bcd_mode)
p = ds1685_time_regs_bcd_table;
else
p = ds1685_time_regs_bin_table;
for (; p->name != NULL; ++p)
if (strcmp(p->name, name) == 0)
return p;
return NULL;
} | false | false | false | false | false | 0 |
_tscmp(const unsigned char *a, const unsigned char *b,
Py_ssize_t len_a, Py_ssize_t len_b)
{
/* The volatile type declarations make sure that the compiler has no
* chance to optimize and fold the code in any way that may change
* the timing.
*/
volatile Py_ssize_t length;
volatile con... | false | false | false | false | false | 0 |
is_redundant_typedef (const_tree decl)
{
if (TYPE_DECL_IS_STUB (decl))
return 1;
if (DECL_ARTIFICIAL (decl)
&& DECL_CONTEXT (decl)
&& is_tagged_type (DECL_CONTEXT (decl))
&& TREE_CODE (TYPE_NAME (DECL_CONTEXT (decl))) == TYPE_DECL
&& DECL_NAME (decl) == DECL_NAME (TYPE_NAME (DECL_CONTEX... | false | false | false | false | false | 0 |
set_double (double value, double frame, bool to_list)
{
_user_value = value;
/* if we're in a write pass, the automation watcher will determine the
values and add them to the list, so we we don't need to bother.
*/
if (to_list && !_list->in_write_pass()) {
_list->add (frame, value, false);
}
} | false | false | false | false | false | 0 |
GMT_plm (GMT_LONG l, GMT_LONG m, double x)
{
/* Unnormalized associated Legendre polynomial of degree l and order m, including
* Condon-Shortley phase (-1)^m */
double fact, pll = 0, pmm, pmmp1, somx2;
GMT_LONG i, ll;
/* x is cosine of colatitude and must be -1 <= x <= +1 */
if (fabs(x) > 1.0) {
fprintf (stde... | false | false | false | false | false | 0 |
TranslationExists(wxArrayString &audacityPathList, wxString code)
{
wxArrayString results;
wxGetApp().FindFilesInPathList(wxString::Format(wxT("%s/audacity.mo"),
code.c_str()),
audacityPathList,
... | false | false | false | false | false | 0 |
Expand(Page* last_page) {
ASSERT(max_capacity_ % Page::kObjectAreaSize == 0);
ASSERT(Capacity() % Page::kObjectAreaSize == 0);
if (Capacity() == max_capacity_) return false;
ASSERT(Capacity() < max_capacity_);
// Last page must be valid and its next page is invalid.
ASSERT(last_page->is_valid() && !last_p... | false | false | false | false | false | 0 |
oc_pack_refill(oc_pack_buf *_b,int _bits){
const unsigned char *ptr;
const unsigned char *stop;
oc_pb_window window;
int available;
window=_b->window;
available=_b->bits;
ptr=_b->ptr;
stop=_b->stop;
/*This version of _refill() doesn't bother setting eof because we won't
c... | false | false | false | false | false | 0 |
matchSparcAsmModifiers(const MCExpr *&EVal,
SMLoc &EndLoc)
{
AsmToken Tok = Parser.getTok();
if (!Tok.is(AsmToken::Identifier))
return false;
StringRef name = Tok.getString();
SparcMCExpr::VariantKind VK = SparcMCExpr::parseVariantKind(name);
if (VK == SparcM... | false | false | false | false | false | 0 |
crypto_make_random_string_from_template(char *template)
{
char *t;
unsigned int count;
Ds ds;
ds_init(&ds);
for (t = template; *t != '\0'; t++) {
if (*t == '%') {
if (*(t + 1) != '\0')
t++;
if (isdigit((int) *t)) {
char *endp;
if (strnumx(t, STRNUM_UI, &count, &endp) == -1)
return(NULL);
... | false | false | false | false | false | 0 |
evas_object_textblock_free(Evas_Object *obj)
{
Evas_Object_Textblock *o;
_evas_object_textblock_clear_all(obj);
evas_object_textblock_style_set(obj, NULL);
while (evas_object_textblock_style_user_peek(obj))
{
evas_object_textblock_style_user_pop(obj);
}
o = (Evas_Object_Textblock *)(ob... | false | false | false | false | false | 0 |
doOK()
{
if (!mFileName.text().isEmpty())
{
QString str = mFileName.text();
emit okPressed(str);
}
doCancel();
} | false | false | false | false | false | 0 |
fuse_reply_ioctl(fuse_req_t req, int result, const void *buf, size_t size)
{
struct fuse_ioctl_out arg;
struct iovec iov[3];
size_t count = 1;
memset(&arg, 0, sizeof(arg));
arg.result = result;
iov[count].iov_base = &arg;
iov[count].iov_len = sizeof(arg);
count++;
if (size) {
iov[count].iov_base = (char *)... | false | false | false | false | false | 0 |
__set_optimtab_bits(void)
{
register int32 ni;
register struct net_t *np;
struct mod_t *mdp;
struct task_t *tskp;
for (mdp = __modhdr; mdp != NULL; mdp = mdp->mnxt)
{
for (ni = 0, np = &(mdp->mnets[0]); ni < mdp->mnnum; ni++, np++)
{
/* assume need chg store */
if (__dv_allform_insrc || mdp->... | false | false | false | false | false | 0 |
destroy_pixbufs(gpointer data)
{
GSList* pixs = (GSList*)data;
GSList* l;
for(l = pixs; l; l=l->next)
{
PixEntry* ent = (PixEntry*)l->data;
if(G_LIKELY(ent->pix))
g_object_unref(ent->pix);
g_slice_free(PixEntry, ent);
}
g_slist_free(pixs);
} | false | false | false | false | false | 0 |
gtk_term_clear_new(GtkWidget *widget)
{
GtkTerm *term;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_TERM (widget));
term = GTK_TERM (widget);
gtk_term_draw_caret(term,0);
e_clear(term->a);
e_append(term->a,">",E_PROMPT);
term->cur = term->top = 0;
term->pos = term->epos = term->promptlen;
... | false | false | false | false | false | 0 |
graph_crop(graph_t *g) {
int i;
for (i=g->n-1; i>=1; i--)
if (set_size(g->edges[i])>0)
break;
graph_resize(g,i+1);
return;
} | false | false | false | false | false | 0 |
jcChangeClause(buf, str)
jcConvBuf *buf;
wchar *str;
{
jcClause *clps, *clpe;
wchar *p;
int newlen;
int oklen, odlen;
int ksize, dsize;
TRACE("jcChangeClause", "Enter")
CHECKFIXED(buf);
clps = buf->clauseInfo + buf->curLCStart;
clpe = buf->clauseInfo + buf->curLCEnd;
newlen = 0;
p = str;
while (*p++)
... | false | false | false | false | false | 0 |
copy_playlist_to_target_itdb(Playlist *pl, iTunesDB *t_itdb) {
Playlist *pl_n;
GList *addtracks = NULL;
Exporter *exporter;
g_return_if_fail (pl);
g_return_if_fail (t_itdb);
exporter = gtkpod_get_exporter();
g_return_if_fail(exporter);
if (pl->itdb != t_itdb) {
addtracks = exp... | false | false | false | false | false | 0 |
gt_pch_p_16VEC_ipa_ref_t_gc (ATTRIBUTE_UNUSED void *this_obj,
void *x_p,
ATTRIBUTE_UNUSED gt_pointer_operator op,
ATTRIBUTE_UNUSED void *cookie)
{
struct VEC_ipa_ref_t_gc * const x ATTRIBUTE_UNUSED = (struct VEC_ipa_ref_t_gc *)x_p;
{
size_t i0;
size_t l0 = (size_t)(((*x).base).prefix.num);
for (i0 = ... | false | false | false | false | false | 0 |
add_grefs(struct ioctl_gntalloc_alloc_gref *op,
uint32_t *gref_ids, struct gntalloc_file_private_data *priv)
{
int i, rc, readonly;
LIST_HEAD(queue_gref);
LIST_HEAD(queue_file);
struct gntalloc_gref *gref, *next;
readonly = !(op->flags & GNTALLOC_FLAG_WRITABLE);
rc = -ENOMEM;
for (i = 0; i < op->count; i++) {
... | false | false | false | false | false | 0 |
MakeProtonComponent( StrFromINChI *pStruct, int iComponent, int num_prot )
{
inp_ATOM *at = NULL;
int i;
if ( num_prot <= 0 ) {
return 0;
}
/* allocate */
pStruct->at = (inp_ATOM *) inchi_calloc( num_prot, sizeof(pStruct->at[0]) );
pStruct->at2 = (inp_ATOM *) inchi_calloc( n... | false | false | false | false | false | 0 |
free_object(struct Object *o)
{
if (o == NULL || o == nil_object || o == base_object || o == number_object || o == list_object)
return;
// display_object(o, 0);
if (o->type == T_BUILTIN)
// don't free builtin methods
return;
/*
* FIXME: use our own lib for strings and don't use
... | false | false | false | false | false | 0 |
S_measure_struct(pTHX_ tempsym_t* symptr)
{
I32 total = 0;
PERL_ARGS_ASSERT_MEASURE_STRUCT;
while (next_symbol(symptr)) {
I32 len;
int size;
switch (symptr->howlen) {
case e_star:
Perl_croak(aTHX_ "Within []-length '*' not allowed in %s",
_action( symptr ) );
... | false | false | false | false | false | 0 |
is_combining_char(ch1, ch2)
LWCHAR ch1;
LWCHAR ch2;
{
/* The table is small; use linear search. */
int i;
for (i = 0; i < sizeof(comb_table)/sizeof(*comb_table); i++)
{
if (ch1 == comb_table[i].first &&
ch2 == comb_table[i].last)
return 1;
}
return 0;
} | false | false | false | false | false | 0 |
conn_comp(int n, SparseMatrix A, int *groups, SparseMatrix *poly_point_map){
/* form a graph where only vertices that are connected as well as in the same group are connected */
int *ia, *ja;
int one = 1, jj, i, j;
SparseMatrix B, BB;
int ncomps, *comps = NULL, *comps_ptr = NULL;
B = SparseMatrix_new(n, n,... | false | false | false | false | false | 0 |
compare_cstring(unsigned char *s1, unsigned char *s2)
{
int i;
if (!s1) return s2 ? -1 : 0; /* empty string cases */
else if (!s2) return 1;
for (; *s1 && *s2; s1++,s2++)
if ((i = (compare_ulong (islower (*s1) ? toupper (*s1) : *s1,
islower (*s2) ? toupper (*s2) : *s2))) != 0)
return i; /* fo... | false | false | false | false | false | 0 |
DRI2WaitSBC(Display *dpy, XID drawable, CARD64 target_sbc, CARD64 *ust,
CARD64 *msc, CARD64 *sbc)
{
XExtDisplayInfo *info = DRI2FindDisplay(dpy);
xDRI2WaitSBCReq *req;
xDRI2MSCReply rep;
XextCheckExtension (dpy, info, dri2ExtensionName, False);
LockDisplay(dpy);
GetReq(DRI2WaitSBC, req);
... | false | false | false | false | false | 0 |
beiscsi_create_def_data(struct beiscsi_hba *phba,
struct hwi_context_memory *phwi_context,
struct hwi_controller *phwi_ctrlr,
unsigned int def_pdu_ring_sz, uint8_t ulp_num)
{
unsigned int idx;
int ret;
struct be_queue_info *dataq, *cq;
struct be_dma_mem *mem;
struct be_mem_descriptor *mem_descr;
void *dq... | false | false | false | false | false | 0 |
cab_convert_path_separator_1(struct archive_string *fn, unsigned char attr)
{
size_t i;
int mb;
/* Easy check if we have '\' in multi-byte string. */
mb = 0;
for (i = 0; i < archive_strlen(fn); i++) {
if (fn->s[i] == '\\') {
if (mb) {
/* This may be second byte of multi-byte
* character. */
brea... | false | false | false | false | false | 0 |
octeon_pci_os_setup(struct octeon_device *oct)
{
/* setup PCI stuff first */
if (pci_enable_device(oct->pci_dev)) {
dev_err(&oct->pci_dev->dev, "pci_enable_device failed\n");
return 1;
}
if (dma_set_mask_and_coherent(&oct->pci_dev->dev, DMA_BIT_MASK(64))) {
dev_err(&oct->pci_dev->dev, "Unexpected DMA device ... | false | false | false | false | false | 0 |
Letter(size_t vl, size_t vr, int i) const{
uchar l;
if(i==1){
l = (uchar)csa->getT(vl);
return l;
}
/*else return Letter(psi_{i-1}(vl),1)*/
size_t p1 = vl;
for(size_t j=0; j<(size_t)(i-1); j++)
p1 = csa->getPsi(p1);
/*
uint v_sa, v_i;
v_sa = csa_lookup(csa, v->left+1)-1; //SA[v->left]
v_i = ... | false | false | false | false | false | 0 |
create_new_element(PyObject* tag, PyObject* attrib)
{
ElementObject* self;
self = PyObject_GC_New(ElementObject, &Element_Type);
if (self == NULL)
return NULL;
self->extra = NULL;
Py_INCREF(tag);
self->tag = tag;
Py_INCREF(Py_None);
self->text = Py_None;
Py_INCREF(Py_None... | false | false | false | false | false | 0 |
Stmt_boxAll(CTX ctx, kStmtExpr *stmt, size_t s, size_t e, ktype_t reqt)
{
size_t i;
for(i = s; i < e; i++) {
kclass_t bcid = C_bcid(Tn_cid(stmt, i));
if(bcid == CLASS_Int || bcid == CLASS_Float || bcid == CLASS_Boolean) {
if(TT_(tkNN(stmt, i)) == TT_CONST) {
tkNN(stmt, i)->type = reqt; // re-typing as box... | false | false | false | false | false | 0 |
stats_print_name(int level, const char *name)
{
int len;
if (flac__utils_verbosity_ >= level) {
stats_clear();
if(is_name_printed) return;
console_width = get_console_width();
len = strlen_console(name)+2;
console_chars_left = console_width - (len % console_width);
flac_fprintf(stderr, "%s: ", name);
... | false | false | false | false | false | 0 |
sproc_find_loaded_rsc_table(struct rproc *rproc, const struct firmware *fw)
{
struct sproc *sproc = rproc->priv;
const struct ste_toc_entry *entry;
if (!fw || !sproc->fw_addr)
return NULL;
entry = sproc_find_rsc_entry(sproc->fw_addr);
if (!entry) {
sproc_err(sproc, "resource table not found in fw\n");
retu... | false | false | false | false | false | 0 |
rowCount()
{
// qDebug() << "rc";
// check top row
QModelIndex topIndex = model->index ( 0, 0, QModelIndex() );
int rows = model->rowCount ( topIndex );
Q_ASSERT ( rows >= 0 );
Q_ASSERT ( model->hasChildren ( topIndex ) == ( rows > 0 ) );
QModelIndex secondLevelIndex = model->index ( 0, 0,... | false | false | false | false | false | 0 |
luaB_ipairs (lua_State *L) {
lua_Number i = lua_tonumber(L, 2);
luaL_checktype(L, 1, LUA_TTABLE);
if (i == 0 && lua_isnone(L, 2)) { /* `for' start? */
lua_pushliteral(L, "ipairs");
lua_rawget(L, LUA_GLOBALSINDEX); /* return generator, */
lua_pushvalue(L, 1); /* state, */
lua_pushnumber(L, 0); ... | 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.