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 |
|---|---|---|---|---|---|---|
encode_DigestREQ(unsigned char *p HEIMDAL_UNUSED_ATTRIBUTE, size_t len HEIMDAL_UNUSED_ATTRIBUTE, const DigestREQ *data, size_t *size)
{
size_t ret HEIMDAL_UNUSED_ATTRIBUTE = 0;
size_t l HEIMDAL_UNUSED_ATTRIBUTE;
int i HEIMDAL_UNUSED_ATTRIBUTE, e HEIMDAL_UNUSED_ATTRIBUTE;
/* innerReq */
{
size_t Top_tag_tag_oldret HEIM... | false | false | false | false | false | 0 |
doc_attr(VALUE vself, VALUE vname){
VALUE vdoc;
ESTDOC *doc;
const char *value;
vdoc = rb_iv_get(vself, VNDATA);
Data_Get_Struct(vdoc, ESTDOC, doc);
Check_Type(vname, T_STRING);
value = est_doc_attr(doc, StringValuePtr(vname));
return value ? rb_str_new2(value) : Qnil;
} | false | false | false | false | false | 0 |
o_complex_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *object)
{
g_assert( (object->type == OBJ_COMPLEX ||
object->type == OBJ_PLACEHOLDER) );
o_glist_draw_place (w_current, dx, dy, object->complex->prim_objs);
} | false | false | false | false | false | 0 |
vma_resv_map(struct vm_area_struct *vma)
{
VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma);
if (vma->vm_flags & VM_MAYSHARE) {
struct address_space *mapping = vma->vm_file->f_mapping;
struct inode *inode = mapping->host;
return inode_resv_map(inode);
} else {
return (struct resv_map *)(get_vma_private_data(vm... | false | false | false | false | false | 0 |
evalAttrs(Env & env, Expr * e, Value & v)
{
eval(env, e, v);
if (v.type != tAttrs)
throwTypeError("value is %1% while an attribute set was expected", showType(v));
} | false | false | false | false | false | 0 |
gl841_set_buffer_address_gamma (Genesys_Device * dev, uint32_t addr)
{
SANE_Status status;
DBG (DBG_io, "gl841_set_buffer_address_gamma: setting address to 0x%05x\n",
addr & 0xfffffff0);
addr = addr >> 4;
status = sanei_genesys_write_register (dev, 0x5c, (addr & 0xff));
if (status != SANE_STATUS_GOO... | false | false | false | false | false | 0 |
handle_two_side_options ()
{
if (rotate_even_pages)
/* Rotate page 180 degrees. */
OUTPUT ((cofp, "180 rotate\n%d %d translate\n",
-media->w, -media->h));
if (swap_even_page_margins)
OUTPUT ((cofp, "%d 0 translate\n",
-(media->llx - (media->w - media->urx))));
} | false | false | false | false | false | 0 |
getbit(FILE * f, h_val bitnum)
{
long int bytenum = 0L;
short int bit_in_byte = 0;
unsigned char read_byte = 0x00;
unsigned char test_byte = 0x01;
int i = 0;
bit_in_byte = bitnum % 8;
bytenum = APGBFHDRSIZE + (bitnum/8);
if (fseek (f, bytenum, SEEK_SET) == -1)
return(-1);
if (fread ((void*)&read_byte,1,... | false | false | false | false | false | 0 |
do_setxattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
{
struct fuse_setxattr_in *arg = (struct fuse_setxattr_in *) inarg;
char *name = PARAM(arg);
char *value = name + strlen(name) + 1;
if (req->f->op.setxattr)
req->f->op.setxattr(req, nodeid, name, value, arg->size,
arg->flags);
else
fuse... | false | false | false | false | false | 0 |
atusb_start(struct ieee802154_hw *hw)
{
struct atusb *atusb = hw->priv;
struct usb_device *usb_dev = atusb->usb_dev;
int ret;
dev_dbg(&usb_dev->dev, "atusb_start\n");
schedule_delayed_work(&atusb->work, 0);
atusb_command(atusb, ATUSB_RX_MODE, 1);
ret = atusb_get_and_clear_error(atusb);
if (ret < 0)
usb_kill_... | false | false | false | false | false | 0 |
QPSolver_verbosity(lua_State *L)
{
SVQP2 *qp = (SVQP2*)luaT_checkudata(L, 1, QPSolver_id);
int verbosity = (int)luaL_checknumber(L, 2);
luaL_argcheck(L, verbosity >= 0 && verbosity <= 3, 2, "integer between 0 and 3 expected");
qp->verbosity = verbosity;
return 0;
} | false | false | false | false | false | 0 |
StrHasPrefix( const char* string, const char* prefix )
{
if ( prefix == NULL )
{
return 1;
}
if ( string == NULL )
{
return 0;
}
return strncasecmp( string, prefix, strlen(prefix) ) == 0;
} | false | false | false | false | false | 0 |
HPDF_MarkupAnnot_SetRectDiff (HPDF_Annotation annot, HPDF_Rect rect) /* RD entry : this is the difference between Rect and the text annotation rectangle */
{
HPDF_Array array;
HPDF_STATUS ret = HPDF_OK;
HPDF_REAL tmp;
HPDF_PTRACE((" HPDF_MarkupAnnot_SetRectDiff\n"));
array = HPDF_Array_New (... | false | false | false | false | false | 0 |
free_query_list(const void *key, void *value, void *unused_udata)
{
GSList *sl, *list = value;
int count = g_slist_length(list);
(void) unused_udata;
g_warning("remained %d un-freed dynamic quer%s for node #%u",
count, count == 1 ? "y" : "ies", GPOINTER_TO_UINT(key));
GM_SLIST_FOREACH(list, sl) {
dquery_t *d... | false | false | false | false | false | 0 |
CollectDispersion( AllData& alldata ) {
bool error= false;
/* start runtime measurement for collecting dispersion information */
StartMeasurement( alldata, 1, true, "collect dispersion information" );
/* open OTF file manager and reader */
OTF_FileManager* manager=
OTF_FileManager_open( al... | false | false | false | false | false | 0 |
find_a_file (struct path_prefix *pprefix, const char *name, int mode)
{
char *temp;
struct prefix_list *pl;
int len = pprefix->max_len + strlen (name) + 1;
if (debug)
fprintf (stderr, "Looking for '%s'\n", name);
#ifdef HOST_EXECUTABLE_SUFFIX
len += strlen (HOST_EXECUTABLE_SUFFIX);
#endif
temp = XNEW... | false | false | false | false | false | 0 |
photo(screen& scr, const Camera& mycam,
const pen_data& line, const pen_data& under) const
{
arrow_data tmp_data(*this);
if (mycam.needs_clip())
tmp_data.clip_to(mycam.clip_plane());
std::list<edge2d> edges;
for (std::list<edge3d>::const_iterator p=tmp_data.m_shaft.begin();
p != tmp_data.... | false | false | false | false | false | 0 |
drawString(const char *str)
{
glPushMatrix();
glPushMatrix();
while(*str != '\0')
{
if(*str == '\n')
{
glPopMatrix();
glTranslatef(0.0, 1.0, 0.0);
glPushMatrix();
} else
{
drawChar(*str);
glTranslatef(1.0, 0.0, 0.0);
}
str++;
}
glPopMatrix();
glPopMatrix();
} | false | false | false | false | false | 0 |
ExCopyright (int p)
{
if (p) {
write (fileno (stdout), DXD_COPYRIGHT_STRING,
strlen (DXD_COPYRIGHT_STRING));
write (fileno (stdout), "\n", 1);
}
} | false | false | false | false | false | 0 |
create_client (void)
{
int32_t id;
for (id = 0; id < vis->clientc; ++id) {
if (!vis->clientv[id]) {
break;
}
}
if (id == vis->clientc) {
vis->clientc++;
}
vis->clientv = g_renew (xmms_vis_client_t*, vis->clientv, vis->clientc);
if (!vis->clientv || (!(vis->clientv[id] = g_new (xmms_vis_client_t, 1)))... | false | false | false | false | false | 0 |
ixgb_get_bus_info(struct ixgb_hw *hw)
{
u32 status_reg;
status_reg = IXGB_READ_REG(hw, STATUS);
hw->bus.type = (status_reg & IXGB_STATUS_PCIX_MODE) ?
ixgb_bus_type_pcix : ixgb_bus_type_pci;
if (hw->bus.type == ixgb_bus_type_pci) {
hw->bus.speed = (status_reg & IXGB_STATUS_PCI_SPD) ?
ixgb_bus_speed_66 : ix... | false | false | false | false | false | 0 |
gda_sql_operation_copy (GdaSqlOperation *operation)
{
GdaSqlOperation *copy;
GSList *list;
if (!operation) return NULL;
copy = gda_sql_operation_new (NULL);
copy->operator_type = operation->operator_type;
for (list = operation->operands; list; list = list->next) {
copy->operands = g_slist_prepend (copy->oper... | false | false | false | false | false | 0 |
setStyle(RenderStyle *_style)
{
RenderBox::setStyle(_style);
const QFontMetrics &fm = style()->fontMetrics();
QRect xSize= fm.boundingRect('x');
m_height = xSize.height();
m_width = xSize.width();
switch(m_type) {
// Glyphs:
case LDISC:
case LCIRCLE:
case LSQUARE:
... | false | false | false | false | false | 0 |
lad_sm_change_array_inner_operand(Operand *ope, int dim, SemTree *new_sem)
{
Operand *new_op, *prev_op, *next_op;
new_op = get_new_op_var(semtree_to_scalar(new_sem));
if (dim != 0) {
prev_op = lad_sm_get_dim_array_operand(ope, dim-1);
next_op = lad_sm_get_dim_array_operand(ope, dim+1);
prev_op->next = n... | false | false | false | false | false | 0 |
get_dominated_to_depth (enum cdi_direction dir, basic_block bb, int depth)
{
vec<basic_block> bbs = vNULL;
unsigned i;
unsigned next_level_start;
i = 0;
bbs.safe_push (bb);
next_level_start = 1; /* = bbs.length (); */
do
{
basic_block son;
bb = bbs[i++];
for (son = first_dom_son (... | false | false | false | false | false | 0 |
scanIdent(Accessor &styler, int pos, WordList &keywords) {
char buf[100]; /* copy to lowercase and ignore underscores */
int i = 0;
for (;;) {
char ch = styler.SafeGetCharAt(pos, '\0');
if (!IsAWordChar(ch)) break;
if (ch != '_' && i < ((int)sizeof(buf))-1) {
buf[i] = static_cast<char>(tolower(... | false | false | false | false | false | 0 |
mptspi_initTarget(MPT_SCSI_HOST *hd, VirtTarget *vtarget,
struct scsi_device *sdev)
{
/* Is LUN supported? If so, upper 2 bits will be 0
* in first byte of inquiry data.
*/
if (sdev->inq_periph_qual != 0)
return;
if (vtarget == NULL)
return;
vtarget->type = sdev->type;
if ((sdev->type == TYPE_PROCE... | false | false | false | false | false | 0 |
flush ()
{
if (good () && rdbuf ()) {
if (rdbuf ()->pubsync () == EOF) {
setstate (badbit);
}
}
return (*this);
} | false | false | false | false | false | 0 |
splash_create (gchar* filename, int duration)
{
GtkWidget *vbox;
GdkPixbuf *pixbuf = NULL;
// GdkAtom atom;
win_initstatus = gtk_window_new (GTK_WINDOW_TOPLEVEL);
#if 0
/* Not needed in these WMs: enlightenment, sawfish, metacity, fvwm2, wmaker */
gtk_window_set_type_hint (GTK_WINDOW (win_initstatus),
... | false | false | false | false | false | 0 |
cmp (double_int b, bool uns) const
{
if (uns)
return this->ucmp (b);
else
return this->scmp (b);
} | false | false | false | false | false | 0 |
input_dev_uevent(struct device *device, struct kobj_uevent_env *env)
{
struct input_dev *dev = to_input_dev(device);
INPUT_ADD_HOTPLUG_VAR("PRODUCT=%x/%x/%x/%x",
dev->id.bustype, dev->id.vendor,
dev->id.product, dev->id.version);
if (dev->name)
INPUT_ADD_HOTPLUG_VAR("NAME=\"%s\"", dev->name);
if (dev->ph... | false | false | false | false | false | 0 |
RefreshPortMappings()
{
for ( PortMappingMap::iterator it = m_ActivePortMappingsMap.begin();
it != m_ActivePortMappingsMap.end();
++it) {
PrivateAddPortMapping(it->second);
}
// For testing
m_WanService->GetStateVariable("PortMappingNumberOfEntries");
} | false | false | false | false | false | 0 |
strbuf_free(strbuf_t *s)
{
debug_stats(s);
if (s->buf) {
free(s->buf);
s->buf = NULL;
}
if (s->dynamic)
free(s);
} | false | false | false | false | false | 0 |
st_seek (SCM port, off_t offset, int whence)
{
scm_t_port *pt = SCM_PTAB_ENTRY (port);
off_t target;
if (pt->rw_active == SCM_PORT_READ && offset == 0 && whence == SEEK_CUR)
/* special case to avoid disturbing the unread-char buffer. */
{
if (pt->read_buf == pt->putback_buf)
{
target = pt->sav... | false | false | false | false | false | 0 |
start ( int x, int y )
{
if ( scope == 3 ) {
got = need;
if ( got > actmap->bi_resource[player].resource( resourcetype ) )
got = actmap->bi_resource[player].resource( resourcetype );
if ( !queryonly )
actmap->bi_resource[player].resource( resourcetype ) -= got;
if ( resour... | false | false | false | false | false | 0 |
orte_info_do_params(bool want_all_in, bool want_internal)
{
int count;
char *type, *component, *str;
bool found;
int i;
bool want_all = false;
orte_info_components_open();
if (want_all_in) {
want_all = true;
} else {
/* See if the special param "all" was givin t... | false | false | false | false | false | 0 |
ganv_box_point(GanvItem* item,
double x, double y,
int cx, int cy,
GanvItem** actual_item)
{
GanvBox* box = GANV_BOX(item);
GanvBoxImpl* impl = box->impl;
*actual_item = NULL;
double x1, y1, x2, y2;
ganv_box_bounds_item(&impl->coords, &x1, &y1, &x2, &y2);
// Po... | false | false | false | false | false | 0 |
k5_asn1_encode_bytestring(asn1buf *buf, unsigned char *const *val, size_t len,
size_t *len_out)
{
if (len > 0 && val == NULL)
return ASN1_MISSING_FIELD;
*len_out = len;
return asn1buf_insert_octetstring(buf, len, *val);
} | false | false | false | false | false | 0 |
cma_save_req_info(const struct ib_cm_event *ib_event,
struct cma_req_info *req)
{
const struct ib_cm_req_event_param *req_param =
&ib_event->param.req_rcvd;
const struct ib_cm_sidr_req_event_param *sidr_param =
&ib_event->param.sidr_req_rcvd;
switch (ib_event->event) {
case IB_CM_REQ_RECEIVED:
req->d... | false | false | false | false | false | 0 |
startBlockingModDir(request_rec *r) {
RequestNote *note = getRequestNote(r);
if (note != 0 && hasModDir()) {
note->oldFileType = r->finfo.filetype;
r->finfo.filetype = APR_NOFILE;
}
return DECLINED;
} | false | false | false | false | false | 0 |
_get_max_gsync_slave_num (dict_t *this, char *key, data_t *value, void *data)
{
int tmp_slvnum = 0;
int *slvnum = (int *)data;
sscanf (key, "slave%d", &tmp_slvnum);
if (tmp_slvnum > *slvnum)
*slvnum = tmp_slvnum;
} | false | false | false | false | false | 0 |
execute() {
Threadlist::desc("Web interface");
// Create the server socket, or retry infinitely.
// This is maybe a too big precaution - previous xr's are responsible
// for killing off their web interfaces. But we don't want a new xr
// start to croak and cause downtime just because the web interf... | false | false | false | false | false | 0 |
__ecereMethod___ecereNameSpace__ecere__gui__controls__EditBox_SelectAll(struct __ecereNameSpace__ecere__com__Instance * this)
{
struct __ecereNameSpace__ecere__gui__controls__EditBox * __ecerePointer___ecereNameSpace__ecere__gui__controls__EditBox = (struct __ecereNameSpace__ecere__gui__controls__EditBox *)(this ? (((c... | false | false | false | true | false | 1 |
ast_duplicate_ha(struct ast_ha *original)
{
struct ast_ha *new_ha;
if ((new_ha = ast_calloc(1, sizeof(*new_ha)))) {
/* Copy from original to new object */
ast_copy_ha(original, new_ha);
}
return new_ha;
} | false | false | false | false | false | 0 |
irecv_send_command_raw(irecv_client_t client, char* command) {
unsigned int length = (unsigned int) strlen(command);
if (length >= 0x100) {
length = 0xFF;
}
if (length > 0) {
int ret = irecv_control_transfer(client, 0x40, 0, 0, 0, (unsigned char*) command, length + 1, 1000);
ret = IRECV_E_SUCCESS; // ignored... | false | false | false | false | false | 0 |
ctm_mult_by_limited(uint64_t *result, int64_t *input)
{
int i;
for (i = 0; i < 9; i++)
result[i] = 0;
for (i = 0; i < 3; i++) {
int64_t user_coeff = input[i * 3 + i];
uint64_t limited_coeff = CTM_COEFF_LIMITED_RANGE >> 2;
uint64_t abs_coeff = clamp_val(CTM_COEFF_ABS(user_coeff),
0,
... | false | false | false | false | false | 0 |
open_sock()
{
int s = socket(AF_INET, SOCK_DGRAM, 0);
if (s == -1)
g_error("Unable to create socket");
struct sockaddr_in addr;
addr.sin_family = AF_INET;
addr.sin_port = htons(DEFAULT_PORT);
addr.sin_addr.s_addr = INADDR_ANY;
if (bind(s, (struct sockaddr*)&addr, sizeof(addr)) == -1)
g_error("bind failed")... | false | false | false | false | false | 0 |
netsnmp_find_table_array_handler(netsnmp_handler_registration *reginfo)
{
netsnmp_mib_handler *mh;
if (!reginfo)
return NULL;
mh = reginfo->handler;
while (mh) {
if (mh->access_method == netsnmp_table_array_helper_handler)
break;
mh = mh->next;
}
return mh;
} | false | false | false | false | false | 0 |
gtkon_token_xmlfilteredchar (GtkonToken* self, guchar ch) {
gchar* result = NULL;
guchar _tmp0_;
guchar _tmp4_;
gchar* _tmp5_ = NULL;
g_return_val_if_fail (self != NULL, NULL);
_tmp0_ = ch;
switch (_tmp0_) {
case '<':
{
gchar* _tmp1_;
_tmp1_ = g_strdup ("<");
result = _tmp1_;
return result;
... | false | false | false | false | false | 0 |
aspect_to_info(MpegEncContext * s, AVRational aspect){
int i;
if(aspect.num==0) aspect= (AVRational){1,1};
for(i=1; i<6; i++){
if(av_cmp_q(pixel_aspect[i], aspect) == 0){
s->aspect_ratio_info=i;
return;
}
}
s->aspect_ratio_info= FF_ASPECT_EXTENDED;
} | false | false | false | false | false | 0 |
name_and_src_coords_attributes (decl)
tree decl;
{
tree decl_name = DECL_NAME (decl);
if (decl_name && IDENTIFIER_POINTER (decl_name))
{
name_attribute (IDENTIFIER_POINTER (decl_name));
#ifdef DWARF_DECL_COORDINATES
{
register unsigned file_index;
/* This is annoying, but we have to pop out ... | false | false | false | false | false | 0 |
zx_hexdec(char* dst, char* src, int src_len, const unsigned char* trans)
{
const unsigned char* hi;
const unsigned char* lo;
for (; src_len>1; src_len-=2, ++dst, src+=2) {
hi = (const unsigned char*)strchr((char*)trans, src[0]);
if (!hi) {
ERR("Bad hi character(%x) in hex string using trans(%s) len ... | false | false | false | false | false | 0 |
fstate_src_architecture_times_clone(fstate_src_architecture_times_ty *this_thing)
{
if (!this_thing)
return 0;
trace(("fstate_src_architecture_times_clone()\n{\n"));
fstate_src_architecture_times_ty *result = (fstate_src_architecture_times_ty *)fstate_src_architecture_times_alloc();
result->variant = s... | false | false | false | false | false | 0 |
notify(const QByteArray& statusLine)
{
bool ret = true;
if (statusLine.startsWith("MIPS="))
{
double d = atof(statusLine.data()+5);
if (d > mMipsHWM)
{
mMipsHWM = d;
std::stringstream ss;
ss << "High Water Mark:" << d;
mMips->setToolT... | false | false | false | false | false | 0 |
FL_think (edict_t * self)
{
vec3_t start, end, endp, offset;
vec3_t forward, right, up;
vec3_t angles;
trace_t tr;
int height = 0;
/*vec3_t start,end,endp,offset;
vec3_t forward,right,up;
trace_t tr; */
//AngleVectors (self->owner->client->v_angle, forward, right, up);
VectorAdd (self->owner->cl... | false | false | false | false | false | 0 |
cache_evict_entries(git_cache *cache)
{
uint32_t seed = rand();
size_t evict_count = 8;
ssize_t evicted_memory = 0;
/* do not infinite loop if there's not enough entries to evict */
if (evict_count > kh_size(cache->map)) {
clear_cache(cache);
return;
}
while (evict_count > 0) {
khiter_t pos = seed++ % k... | false | false | false | false | false | 0 |
source_registry_call_authenticate_for_source (ESourceRegistry *registry,
ESourceAuthenticator *auth,
ESource *source,
gchar **out_object_path,
... | false | false | false | false | false | 0 |
readSWFMatrix(SWFStream& in)
{
in.align();
in.ensureBits(1);
const bool has_scale = in.read_bit();
boost::int32_t sx = 65536;
boost::int32_t sy = 65536;
if (has_scale) {
in.ensureBits(5);
const boost::uint8_t scale_nbits = in.read_uint(5);
in.ensureBits(scale_nbits * 2... | false | false | false | false | false | 0 |
eps_dbg_show(struct seq_file *s, void *p)
{
struct pxa_udc *udc = s->private;
struct pxa_ep *ep;
int i;
u32 tmp;
if (!udc->driver)
return -ENODEV;
ep = &udc->pxa_ep[0];
tmp = udc_ep_readl(ep, UDCCSR);
seq_printf(s, "udccsr0=0x%03x(%s%s%s%s%s%s%s)\n",
tmp,
(tmp & UDCCSR0_SA) ? " sa" : "",
(tmp... | false | false | false | false | false | 0 |
AssumeRepresentation(Representation r) {
if (CheckFlag(kFlexibleRepresentation)) {
ChangeRepresentation(r);
// The representation of the value is dictated by type feedback and
// will not be changed later.
ClearFlag(kFlexibleRepresentation);
}
} | false | false | false | false | false | 0 |
render()
{
const StateImagery* imagery;
// get WidgetLookFeel for the assigned look.
const WidgetLookFeel& wlf = getLookNFeel();
// try and get imagery for our current state
imagery = &wlf.getStateImagery(d_window->isDisabled() ? "Disabled" : "Enabled");
// peform th... | false | false | false | false | false | 0 |
aarch64_get_condition_code (rtx x)
{
enum machine_mode mode = GET_MODE (XEXP (x, 0));
enum rtx_code comp_code = GET_CODE (x);
if (GET_MODE_CLASS (mode) != MODE_CC)
mode = SELECT_CC_MODE (comp_code, XEXP (x, 0), XEXP (x, 1));
switch (mode)
{
case CCFPmode:
case CCFPEmode:
switch (comp_cod... | false | false | false | false | false | 0 |
hibit(unsigned int x)
{
unsigned int res = 0;
while (x > 0xff) {
x >>= 8;
res += 8;
}
while (x) {
x >>= 1;
res += 1;
}
return res;
} | false | false | false | false | false | 0 |
test_equal ()
{
MetaRectangle a = {10, 12, 4, 18};
MetaRectangle b = a;
MetaRectangle c = {10, 12, 4, 19};
MetaRectangle d = {10, 12, 7, 18};
MetaRectangle e = {10, 62, 4, 18};
MetaRectangle f = {27, 12, 4, 18};
g_assert ( meta_rectangle_equal (&a, &b));
g_assert (!meta_rectangle_equal (&a, &c));
g_a... | false | false | false | false | false | 0 |
AddIncludeFlags(std::string& flags,
const char* lang)
{
std::string responseVar = "CMAKE_";
responseVar += lang;
responseVar += "_USE_RESPONSE_FILE_FOR_INCLUDES";
bool useResponseFile = this->Makefile->IsOn(responseVar.c_str());
std::vector<std::string> includ... | false | false | false | false | false | 0 |
connect ( const struct sockaddr *addr,
socklen_t addrlen, int port )
{
struct sockaddr_storage addrbuf;
memset ( &addrbuf,0,sizeof ( addrbuf ) );
JASSERT ( addrlen <= sizeof ( addrbuf ) ) ( addrlen ) ( sizeof ( addrbuf ) );
memcpy ( &addrbuf,addr,addrlen );
JWARNING ( addrlen... | false | false | false | false | true | 1 |
operator<(const ELFSymbolData &RHS) const {
unsigned LHSType = Symbol->getType();
unsigned RHSType = RHS.Symbol->getType();
if (LHSType == ELF::STT_SECTION && RHSType != ELF::STT_SECTION)
return false;
if (LHSType != ELF::STT_SECTION && RHSType == ELF::STT_SECTION)
re... | false | false | false | false | false | 0 |
num_sel_recompute (struct Bond *list)
{
int n = 0;
struct Bond * current = list;
if (list == NULL)
return 0;
do
if (current->selected & SEL_YES)
n++;
while ((current = current->next) != NULL);
return n;
} | false | false | false | false | false | 0 |
radeon_atombios_set_dac_info(struct radeon_encoder *radeon_encoder)
{
struct drm_device *dev = radeon_encoder->base.dev;
struct radeon_device *rdev = dev->dev_private;
struct radeon_encoder_atom_dac *dac = kzalloc(sizeof(struct radeon_encoder_atom_dac), GFP_KERNEL);
if (!dac)
return NULL;
dac->tv_std = radeon_... | false | false | false | false | false | 0 |
issame(const char *str)
{
char first = *str;
while (*(++str))
{
if (*str && *str != first)
return FALSE;
}
return TRUE;
} | false | false | false | false | false | 0 |
display(void)
{
time_t curtime;
char buf[255];
static time_t fpstime = 0;
static int fpscount = 0;
static int fps = 0;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(60.0, (GLdouble)winwidth/winheight, 0.01, 100);
agvViewTransform(... | false | false | false | false | false | 0 |
CKYAPDUFactory_ReadObject(CKYAPDU *apdu, unsigned long objectID,
CKYOffset offset, CKYByte size)
{
CKYBuffer buf;
CKYStatus ret;
CKYAPDU_SetCLA(apdu, CKY_CLASS_COOLKEY);
CKYAPDU_SetINS(apdu, CKY_INS_READ_OBJ);
CKYAPDU_SetP1(apdu, 0x00);
CKYAPDU_SetP2(apdu, 0x00);
CKYBuffer_InitEmpty(... | false | false | false | false | false | 0 |
CFontz633_set_char (Driver *drvthis, int n, unsigned char *dat)
{
PrivateData *p = drvthis->private_data;
unsigned char out[9];
unsigned char mask = (1 << p->cellwidth) - 1;
int row;
if ((n < 0) || (n >= NUM_CCs))
return;
if (!dat)
return;
out[0] = n; /* Custom char to define. xxx */
for (row = 0; row < ... | true | true | false | false | false | 1 |
lp8788_setup_adc_channel(struct device *dev,
struct lp8788_charger *pchg)
{
struct lp8788_charger_platform_data *pdata = pchg->pdata;
struct iio_channel *chan;
if (!pdata)
return;
/* ADC channel for battery voltage */
chan = iio_channel_get(dev, pdata->adc_vbatt);
pchg->chan[LP8788_VBATT] = IS_ERR(chan) ?... | false | false | false | false | false | 0 |
getParameterizedColor(double colorinterp, SplashColorMode mode, SplashColorPtr dest) {
GfxColor src;
GfxColorSpace* srcColorSpace = shading->getColorSpace();
int colorComps = 3;
#if SPLASH_CMYK
if (mode == splashModeCMYK8)
colorComps=4;
#endif
shading->getParameterizedColor(colorinterp, &src);
if (bDi... | false | false | false | false | false | 0 |
parsestruct(xmlrpc_env * const env,
xmlrpc_value * const strct,
const char ** const format,
char const delimiter,
va_list * args) {
xmlrpc_value *key, *value;
char *keystr;
size_t keylen;
/* Set up error handling preconditions. */... | false | false | false | false | false | 0 |
AVCBinReadNextTableRec(AVCBinFile *psFile)
{
if (psFile->eCoverType != AVCCoverPC &&
psFile->eCoverType != AVCCoverPC2 &&
psFile->eFileType == AVCFileTABLE &&
psFile->hdr.psTableDef->numRecords > 0 &&
! AVCRawBinEOF(psFile->psRawBinFile) &&
_AVCBinReadNextTableRec(psFile->psR... | false | false | false | false | false | 0 |
Initialize()
{
this->Superclass::Initialize();
delete this->Internal;
this->Internal = new vtkSelectionInternals;
} | false | false | false | false | false | 0 |
SendPostmasterSignal(PMSignalReason reason)
{
/* If called in a standalone backend, do nothing */
if (!IsUnderPostmaster)
return;
/* Atomically set the proper flag */
PMSignalState->PMSignalFlags[reason] = true;
/* Send signal to postmaster */
kill(PostmasterPid, SIGUSR1);
} | false | false | false | false | false | 0 |
hdb_sqlite_prepare_stmt(krb5_context context,
sqlite3 *db,
sqlite3_stmt **statement,
const char *str)
{
int ret, tries = 0;
ret = sqlite3_prepare_v2(db, str, -1, statement, NULL);
while((tries++ < MAX_RETRIES) &&
((ret == SQLITE_BUS... | false | false | false | false | false | 0 |
smi_dma_xfer(unsigned long data)
{
struct smi_port *port = (struct smi_port *) data;
struct smi_dev *dev = port->dev;
u32 intr_status, finishedData, dmaManagement;
u8 dmaChan0State, dmaChan1State;
intr_status = port->_int_status;
dmaManagement = smi_read(port->DMA_MANAGEMENT);
dmaChan0State = (u8)((dmaManagemen... | false | false | false | false | false | 0 |
create(KConfigBase *master,
const QByteArray &name,
bool isImmutable,
bool isConst)
{
QExplicitlySharedD... | false | false | false | false | false | 0 |
irc_del_person(session_t *s, irc_private_t *j, char *nick,
char *wholenick, char *reason, int doprint)
{
people_t *person;
channel_t *chan;
people_chan_t *pech;
window_t *w;
list_t tmp;
int ret;
char *longnick;
if (!(person = irc_find_person(j->people, nick)))
return -1;
/* if person doesn't have any ch... | false | false | false | false | false | 0 |
gst_inter_video_src_get_times (GstBaseSrc * src, GstBuffer * buffer,
GstClockTime * start, GstClockTime * end)
{
GstInterVideoSrc *intervideosrc = GST_INTER_VIDEO_SRC (src);
GST_DEBUG_OBJECT (intervideosrc, "get_times");
/* for live sources, sync on the timestamp of the buffer */
if (gst_base_src_is_live ... | false | false | false | false | false | 0 |
copyToEnd(std::ostream &out) {
int startLevel = blockLevel++ ;
std::istream &in = currentContext->getStream() ;
readLine(false) ;
while (!in.eof()) {
char *s = line ;
while (*s != 0) {
if (*s == '{') {
blockLevel++ ;
} else if (*s == '}') {
... | false | false | false | false | false | 0 |
nrrdBoundarySpecCheck(const NrrdBoundarySpec *bspec) {
static const char me[]="nrrdBoundarySpecCheck";
if (!bspec) {
biffAddf(NRRD, "%s: got NULL pointer", me);
return 1;
}
if (airEnumValCheck(nrrdBoundary, bspec->boundary)) {
biffAddf(NRRD, "%s: %d is not a valid %s value", me,
bspec-... | false | false | false | false | false | 0 |
cdbus_method_return_verify(DBusMessage * msg, const char ** str)
{
if (!msg || dbus_message_get_type(msg) != DBUS_MESSAGE_TYPE_ERROR)
return true;
const char *ptr;
if (!dbus_message_get_args(msg, &cdbus_g_dbus_error,
DBUS_TYPE_STRING, &ptr,
DBUS_TYPE... | false | false | false | false | false | 0 |
fhexdump8x32 (FILE * file, char *prefix, void *data, int len)
{
unsigned char *ptr = (unsigned char *) data;
int i, j;
fprintf (file, "%s:%s", prefix,
len >= 16 ? "\n" : strlen (prefix) >= 8 ? "\t" : "\t\t");
for (i = 0; i < len; i++) {
if (i % 32 == 0)
printf ("\t");
fprintf (file, "%02x", ptr[i]);
if... | false | false | false | false | false | 0 |
set_visible (GtkSourceGutterRenderer *renderer,
gboolean visible)
{
visible = visible != FALSE;
if (renderer->priv->visible != visible)
{
renderer->priv->visible = visible;
g_object_notify (G_OBJECT (renderer), "visible");
gtk_source_gutter_renderer_queue_draw (renderer);
}
} | false | false | false | false | false | 0 |
noise_word(word w)
{
if (w==ext_code[wthe] || w==ext_code[wa] || w==ext_code[wan]) return 1;
if (w==ext_code[wmy]) return 1;
if (aver>=AGT18 && aver<=AGT18MAX && w==ext_code[wis]) return 1;
return 0;
} | false | false | false | false | false | 0 |
Account (boost::shared_ptr<Ekiga::PersonalDetails> details_,
boost::shared_ptr<Dialect> dialect_,
boost::shared_ptr<Cluster> cluster_,
const std::string name, const std::string user,
const std::string server, int port,
const std::string resource, const std::string password,
... | false | false | false | false | false | 0 |
remove_redundant_lower_bounds(
__isl_take isl_pw_aff_list *list, __isl_keep isl_ast_build *build)
{
int i, j, n;
isl_set *domain;
list = isl_pw_aff_list_sort(list, &reduce_list_cmp, NULL);
if (!list)
return NULL;
n = isl_pw_aff_list_n_pw_aff(list);
if (n <= 1)
return list;
domain = isl_ast_build_get_doma... | false | false | false | false | false | 0 |
set_iact_dmpvmod_nd_nchgstore(struct mod_t *mdp)
{
register int32 ni;
register struct net_t *np;
register struct task_t *tskp;
for (ni = 0, np = &(mdp->mnets[0]); ni < mdp->mnnum; ni++, np++)
{
/* can never dumpvar arrays */
if (!np->n_isarr)
{
np->dmpv_in_src = TRUE;
np->nchg_nd_chgstore = ... | false | false | false | false | false | 0 |
tcsd_threads_final()
{
int rc;
UINT32 i;
MUTEX_LOCK(tm->lock);
tm->shutdown = 1;
MUTEX_UNLOCK(tm->lock);
/* wait for all currently running threads to exit */
for (i = 0; i < tm->max_threads; i++) {
if (tm->thread_data[i].thread_id != THREAD_NULL) {
if ((rc = THREAD_JOIN(*(tm->thread_data[i].thread_id), ... | false | false | false | false | false | 0 |
afr_fsetxattr (call_frame_t *frame, xlator_t *this,
fd_t *fd, dict_t *dict, int32_t flags)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
call_frame_t *transaction_frame = NULL;
int ret = -1;
... | false | false | false | false | false | 0 |
save( const Meta::TrackList &tracks, const QString& name )
{
DEBUG_BLOCK
debug() << "saving " << tracks.count() << " tracks to device with name" << name;
// NOTE: the playlist constructor tells the handler to make the playlist, save to db etc.
Playlists::MediaDevicePlaylistPtr pl = Playlists::MediaDevic... | false | false | false | false | false | 0 |
ssh_srv_pki_do_sign_sessionid(ssh_session session,
const ssh_key privkey)
{
struct ssh_crypto_struct *crypto;
unsigned char hash[SHA_DIGEST_LEN] = {0};
ssh_signature sig;
ssh_string sig_blob;
SHACTX ctx;
int rc;
if (session == NULL || privkey == NULL... | true | true | false | false | false | 1 |
Sacc_toK_Aop_rgb24( GenefxState *gfxs )
{
int w = gfxs->length;
GenefxAccumulator *S = gfxs->Sacc;
u8 *D = gfxs->Aop[0];
u8 r = (gfxs->Dkey >> 16);
u8 g = (gfxs->Dkey >> 8) & 0xff;
u8 b = (gfxs->Dkey ) & 0x... | false | false | false | false | false | 0 |
invalidate_cache (int fd, off_t len)
{
int adv_ret = -1;
/* Minimize syscalls. */
off_t clen = cache_round (fd, len);
if (len && !clen)
return true; /* Don't advise this time. */
if (!len && !clen && max_records)
return true; /* Nothing pending. */
off_t pending = len ? cache_round (fd, 0) : 0;
... | false | false | false | false | false | 0 |
DvechEigVecVec(void* AA, double v[], int n, double *vv){
dvechmat* A=(dvechmat*)AA;
int i,rank,neigs;
double *an,dd,ddd=0,*eigval;
if (A->Eig.neigs>=0){
an=A->Eig.an;
neigs=A->Eig.neigs;
eigval=A->Eig.eigval;
for (rank=0;rank<neigs;rank++){
for (dd=0,i=0;i<n;i++){
dd+=v[i]*an[i];
}... | 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.