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 |
|---|---|---|---|---|---|---|
lj_ffrecord_select_mode(jit_State *J, TRef tr, TValue *tv)
{
if (tref_isstr(tr) && *strVdata(tv) == '#') { /* select('#', ...) */
if (strV(tv)->len == 1) {
emitir(IRTG(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, strV(tv)));
} else {
TRef trptr = emitir(IRT(IR_STRREF, IRT_P32), tr, lj_ir_kint(J, 0));
... | false | false | false | false | false | 0 |
storage_set_flags(krb5_context context, krb5_storage *sp, int vno)
{
int flags = 0;
switch(vno) {
case KRB5_KT_VNO_1:
flags |= KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS;
flags |= KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE;
flags |= KRB5_STORAGE_HOST_BYTEORDER;
break;
case KRB5_KT_VNO_2:
break;
defau... | false | false | false | false | false | 0 |
EISA_signature(char *name, struct device *device)
{
int i, status = 0, siglen = ARRAY_SIZE(de4x5_signatures);
struct eisa_device *edev;
*name = '\0';
edev = to_eisa_device (device);
i = edev->id.driver_data;
if (i >= 0 && i < siglen) {
strcpy (name, de4x5_signatures[i]);
status = 1;
... | false | false | false | false | false | 0 |
client_remove_unit(struct unit *punit)
{
struct city *pcity;
struct tile *ptile = unit_tile(punit);
int hc = punit->homecity;
struct unit old_unit = *punit;
int old = get_num_units_in_focus();
bool update;
log_debug("removing unit %d, %s %s (%d %d) hcity %d",
punit->id, nation_rule_name(natio... | false | false | false | false | false | 0 |
remove_item(int index)
{
if(index < 0 || index > (int)items.size())
return;
int pos = 0;
std::vector<CL_ListItem *>::iterator it;
for (it = items.begin(); it != items.end(); ++it, ++pos)
{
if(pos == index)
{
if((*it)->delete_item)
delete (*it);
items.erase(it);
break;
}
}
int max_visible_i... | false | false | false | false | false | 0 |
getPristineRegs(const MachineFunction &MF) const {
const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
BitVector BV(TRI->getNumRegs());
// Before CSI is calculated, no registers are considered pristine. They can be
// freely used and PEI will make sure they are saved.
if (!isCalleeSavedInfoV... | false | false | false | false | false | 0 |
getCommandName(const char *cameraName,
const char *command)
{
const char *cameraCommandName = NULL;
lock();
CommandInfo *info = findCommandInfo(cameraName, command);
if (info != NULL) {
cameraCommandName = info->myCameraCommandName.c_str();
} // end if info foun... | false | false | false | false | false | 0 |
axis_transform_back_from_row_one (const Axis axis,
const uint32_t bitrow)
{
g_assert(axis >= HO && axis <= DU);
uint32_t tmp;
SquareSet bit_board;
switch (axis) {
case HO:
return (SquareSet) bitrow;
case VE:
tmp = bitrow;
tmp |= tmp << 7;
tmp |= tmp << 14;... | false | false | false | false | false | 0 |
load_config(void)
{
const char *opt;
uint64_t id;
opt = conf_get_opt("ipv6-dhcp", "verbose");
if (opt)
conf_verbose = atoi(opt);
opt = conf_get_opt("ipv6-dhcp", "pref-lifetime");
if (opt)
conf_pref_lifetime = atoi(opt);
opt = conf_get_opt("ipv6-dhcp", "valid-lifetime");
if (opt)
conf_valid_lifetime =... | false | false | false | false | true | 1 |
CheckForChangeOutsidePaint(Range r) {
if (paintState == painting && !paintingAllText) {
//Platform::DebugPrintf("Checking range in paint %d-%d\n", r.start, r.end);
if (!r.Valid())
return;
PRectangle rcRange = RectangleFromRange(r.start, r.end);
PRectangle rcText = GetTextRectangle();
if (rcRange.top < rc... | false | false | false | false | false | 0 |
operator() (const Ball &b)
{
b.draw(pixmap, gc);
if(b.picture)
{
gdk_gc_set_clip_mask(gc, b.clip_bmp);
gdk_gc_set_clip_origin(gc, int(b.x - b.diam / 2), int(b.y - b.diam / 2));
gdk_draw_pixmap(pixmap, gc, b.picture, 0, 0, int(b.x - b.diam / 2),
int (b.y - b.diam / 2), BALL_SIZE, BALL_SIZE);
... | false | false | false | false | false | 0 |
rock_continue(struct rock_state *rs)
{
int ret = 1;
int blocksize = 1 << rs->inode->i_blkbits;
const int min_de_size = offsetof(struct rock_ridge, u);
xfree(rs->buffer);
rs->buffer = NULL;
if ((unsigned)rs->cont_offset > blocksize - min_de_size || (unsigned)rs->cont_size > blocksize || (unsigned)(rs->cont_offse... | false | false | false | false | false | 0 |
ecm_redc_n (mp_ptr rp, mp_srcptr x0p, mp_size_t xn,
mp_srcptr orig, mp_srcptr invm, mp_size_t n)
{
mp_ptr tp, up, xp;
mp_size_t nn = n + n;
mp_limb_t cy, cin;
TMP_DECL(marker);
ASSERT((xn == 2 * n) || (xn == 2 * n - 1));
TMP_MARK(marker);
up = TMP_ALLOC_LIMBS(nn + nn);
if (xn < nn)
{
... | false | false | false | false | false | 0 |
operator<< (std::string& out, const TiXmlNode& base )
{
TiXmlPrinter printer;
printer.SetStreamPrinting();
base.Accept( &printer );
out.append( printer.Str() );
return out;
} | false | false | false | false | false | 0 |
do_key(int& ct) {
ct = 2;
while (ct<=ntk) {
kw("OFFSET") {
g_keyInfo->setOffsetX(next_exp);
g_keyInfo->setOffsetY(next_exp);
}
else kw("MARGINS") {
double mx = next_exp;
double my = next_exp;
g_keyInfo->setMarginXY(mx, my);
}
else kw("ABSOLUTE") {
if (g_xsize*g_ysize==0) {
g_xsize = 1... | false | false | false | false | false | 0 |
songit_tee_death_notification(tee_song_iterator_t *self,
song_iterator_t *corpse)
{
if (corpse == self->children[TEE_LEFT].it) {
self->status &= ~TEE_LEFT_ACTIVE;
self->children[TEE_LEFT].it = NULL;
} else if (corpse == self->children[TEE_RIGHT].it) {
self->status &= ~TEE_RIGHT_ACTIVE;
self->children... | false | false | false | false | false | 0 |
read_key(uint8_t key[34], const char* filename)
{
int fd = safe_open(filename, O_RDONLY);
int numread = 0;
while ( numread < 34 )
{
ssize_t n = read(fd, key + numread, 34 - numread);
if ( n < 0 )
{
char buf[128];
strerror_r(errno, buf, sizeof(buf));
fprintf(stderr, "Failed reading %s: %s\n", fil... | false | false | false | false | false | 0 |
filter_entry_text(GtkEntry * entry, const gchar * text, gint length, gint * position, gpointer data)
{
GtkEditable *editable = GTK_EDITABLE(entry);
int i, count = 0;
gchar *result = g_new(gchar, length);
/* analyze char by char */
for (i = 0; i < length; i++) {
/* check if char is allowed in CW transmiss... | false | false | false | false | false | 0 |
ql4_84xx_poll_wait_ipmdio_bus_idle(struct scsi_qla_host *ha,
uint32_t addr1,
uint32_t addr2,
uint32_t addr3,
uint32_t mask)
{
unsigned long timeout;
uint32_t temp;
uint32_t rval = QLA_SUCCESS;
timeout = jiffies + msecs_to_jiffies(TIMEOUT_100_MS);
do {
ql4_84xx_ipmdio_rd_r... | false | false | false | false | false | 0 |
vmsg_ignore(const gnutella_node_t *n, const struct vmsg *vmsg)
{
if (GNET_PROPERTY(vmsg_debug)) {
g_warning("VMSG got %s/%uv%u \"%s\" via %s, ignoring",
vendor_code_to_string(vmsg->vendor),
vmsg->id, vmsg->version, vmsg->name, node_infostr(n));
}
} | false | false | false | false | false | 0 |
VisitPointers(Object** start, Object** end) {
StaticMarkingVisitor::VisitPointers(heap_, start, end);
} | false | false | false | false | false | 0 |
popNodeAndRegisterEdge(){
mMutexHierarchy.lock();
if(mNodeStack.size()){
TID lExTop=mNodeStack.back();
mNodeStack.pop_back();
addEdge(mNodeStack,lExTop);
}
mMutexHierarchy.unlock();
} | false | false | false | false | false | 0 |
fimc_is_setup_clocks(struct fimc_is *is)
{
int ret;
ret = clk_set_parent(is->clocks[ISS_CLK_ACLK200],
is->clocks[ISS_CLK_ACLK200_DIV]);
if (ret < 0)
return ret;
ret = clk_set_parent(is->clocks[ISS_CLK_ACLK400MCUISP],
is->clocks[ISS_CLK_ACLK400MCUISP_DIV]);
if (ret < 0)
return ret;
ret = clk_set_r... | false | false | false | false | false | 0 |
segment_name (segment * s, int code)
{
if (named_count == MAX_NAMED)
compile_error (MSG_TOO_MANY_TYPES) ;
named_segs[named_count] = s ;
named_codes[named_count] = code ;
named_count++ ;
} | false | false | false | false | false | 0 |
FuncStuff(SprintfState *ss, const char *sp, PRUint32 len)
{
int rv;
rv = (*ss->func)(ss->arg, sp, len);
if (rv < 0) {
return rv;
}
ss->maxlen += len;
return 0;
} | false | false | false | false | false | 0 |
il4965_find_station(struct il_priv *il, const u8 *addr)
{
int i;
int start = 0;
int ret = IL_INVALID_STATION;
unsigned long flags;
if (il->iw_mode == NL80211_IFTYPE_ADHOC)
start = IL_STA_ID;
if (is_broadcast_ether_addr(addr))
return il->hw_params.bcast_id;
spin_lock_irqsave(&il->sta_lock, flags);
for (i ... | false | false | false | false | false | 0 |
LinkTexture(FCDTexture* texture, FCDEffectParameterList& parameters)
{
FCDTextureDataMap::iterator it = FArchiveXML::documentLinkDataMap[texture->GetDocument()].textureDataMap.find(texture);
FUAssert(it != FArchiveXML::documentLinkDataMap[texture->GetDocument()].textureDataMap.end(),);
FCDTextureData& data = it-... | false | false | false | false | false | 0 |
ms_unxline(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
if (parc != 3)
return;
if (!IsClient(source_p) || EmptyString(parv[2]))
return;
sendto_match_servs(source_p, parv[1], CAP_CLUSTER,
"UNXLINE %s %s", parv[1], parv[2]);
if (!match(parv... | false | false | false | false | false | 0 |
cxgbi_ep_connect(struct Scsi_Host *shost,
struct sockaddr *dst_addr,
int non_blocking)
{
struct iscsi_endpoint *ep;
struct cxgbi_endpoint *cep;
struct cxgbi_hba *hba = NULL;
struct cxgbi_sock *csk;
int err = -EINVAL;
log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_SOCK,
"shost 0x%p, non_blocking %d, ... | false | false | false | false | false | 0 |
accuracy_changed(
DBusGProxy *proxy,
int fields,
double pdop,
double hdop,
double vdop,
gpointer user_data
)
{
accuracy_fields = fields;
accuracy_pdop = pdop;
accuracy_hdop = hdop;
accuracy_vdop = vdop;
INFO(GYPSY_ACCURACY": AccuracyChanged(pdop=%f, hdop=%f, vdop=%f)",
ACCURACY_PDOP_IS_VALID ? accur... | false | false | false | false | false | 0 |
unpack_exchange(int nlocal, double *buf)
{
int m = 0;
int flag = shake_flag[nlocal] = static_cast<int> (buf[m++]);
if (flag == 1) {
shake_atom[nlocal][0] = static_cast<int> (buf[m++]);
shake_atom[nlocal][1] = static_cast<int> (buf[m++]);
shake_atom[nlocal][2] = static_cast<int> (buf[m++]);
shake_t... | false | false | false | false | false | 0 |
dlz_dlopen_init(isc_mem_t *mctx) {
#ifndef ISC_DLZ_DLOPEN
UNUSED(mctx);
return (ISC_R_NOTIMPLEMENTED);
#else
isc_result_t result;
dlopen_log(2, "Registering DLZ_dlopen driver");
result = dns_sdlzregister("dlopen", &dlz_dlopen_methods, NULL,
DNS_SDLZFLAG_RELATIVEOWNER |
DNS_SDLZFLAG_THREADSAFE,
... | false | false | false | false | false | 0 |
animateVisibility(const bool visible)
{
m_fade->setProperty("startOpacity", opacity());
if (visible) {
m_fade->setProperty("targetOpacity", 1.0);
} else {
m_fade->setProperty("targetOpacity", 0);
}
m_fade->start();
} | false | false | false | false | false | 0 |
tsplotIsVarPlotted(displayd *display, gint *cols, gint ncols, GGobiData *d)
{
GList *l;
splotd *sp;
int j;
for (l = display->splots; l; l = l->next) {
sp = (splotd *) l->data;
for (j=0; j<ncols; j++) {
if (sp->xyvars.x == cols[j]) {
return(sp->xyvars.x);
}
if (sp->xyvars.y ==... | false | false | false | false | false | 0 |
signal_pipe_empty(void) {
int sig;
s_log(LOG_DEBUG, "Dispatching signals from the signal pipe");
while(readsocket(signal_pipe[0], &sig, sizeof sig)==sizeof sig) {
switch(sig) {
case SIGCHLD:
#ifdef USE_FORK
client_status(); /* report status of client process */
#else /* USE_UCON... | false | false | false | false | false | 0 |
ctoi(char *s) {
int i;
if ((strncmp(s,"0x",2) == 0) &&
(strspn(s+2,"0123456789abcdefABCDEF") == strlen(s+2)))
(void)sscanf(s+2,"%x",&i);
else if ((*s == '0') &&
(strspn(s,"01234567") == strlen(s)))
(void)sscanf(s,"%o",&i);
else if (strspn(s,"0123456789") == strlen(s))
(void)sscanf(s,"%d",&i);
e... | false | false | false | false | false | 0 |
parseSimilarArtists( const KUrl &url, QByteArray data,
NetworkAccessManagerProxy::Error e )
{
if( e.code != QNetworkReply::NoError )
{
removeAllData( "similarArtists" );
warning() << "Failed to parse similar artists xml:" << url << e.description;
... | false | false | false | false | false | 0 |
get_event_dest_client(struct snd_seq_event *event,
int filter)
{
struct snd_seq_client *dest;
dest = snd_seq_client_use_ptr(event->dest.client);
if (dest == NULL)
return NULL;
if (! dest->accept_input)
goto __not_avail;
if ((dest->filter & SNDRV_SEQ_FILTER_USE_EVENT) &&
! test_bit(event->type, ... | false | false | false | false | false | 0 |
initialize_blackouts_and_xinerama(void) {
blackouts = 0;
blackout_ptr = 0;
if (blackout_str != NULL) {
initialize_blackouts(blackout_str);
}
if (xinerama) {
initialize_xinerama();
}
if (blackouts) {
blackout_tiles();
/* schedule a copy_screen(), now is too early. */
do_copy_screen = 1;
}
} | false | false | false | false | false | 0 |
evas_file_modified_time(const char *file)
{
struct stat st;
if (stat(file, &st) < 0) return 0;
if (st.st_ctime > st.st_mtime) return (DATA64)st.st_ctime;
else return (DATA64)st.st_mtime;
return 0;
} | false | false | false | false | false | 0 |
sshin_read(char *zBuf, int szBuf){
int got;
zBuf[0] = 0;
got = read(sshIn, zBuf, szBuf-1);
while( got>=0 ){
zBuf[got] = 0;
if( got==0 || !fossil_isspace(zBuf[got-1]) ) break;
got--;
}
} | false | true | false | false | true | 1 |
update_noncloned_frequencies (struct cgraph_node *node,
int freq_scale)
{
struct cgraph_edge *e;
/* We do not want to ignore high loop nest after freq drops to 0. */
if (!freq_scale)
freq_scale = 1;
for (e = node->callees; e; e = e->next_callee)
{
e->frequency = e->frequency * (gcov_typ... | false | false | false | false | false | 0 |
nogvl_copy_stream_write(struct copy_stream_struct *stp, char *buf, size_t len)
{
ssize_t ss;
int off = 0;
while (len) {
ss = write(stp->dst_fd, buf+off, len);
if (ss == -1) {
if (maygvl_copy_stream_continue_p(0, stp))
continue;
if (errno == EAGAIN || errno == EWOULDBLOCK) ... | false | false | false | false | false | 0 |
caCertificates() const
{
QMutexLocker certLocker(&d->certListMutex);
if (!d->isCertListLoaded) {
d->loadDefaultCaCertificates();
}
return d->defaultCaCertificates;
} | false | false | false | false | false | 0 |
add_to_arts(PCE *c, int num, int no)
{
int i;
if (num >= c->n_alloc) {
i = c->n_alloc;
if (c->tot > 0)
c->n_alloc = c->tot + 1;
else
c->n_alloc = num + 1;
c->arts = (long *)XtRealloc((char *)c->arts,
c->n_alloc * sizeof c->arts[0]);
while (i < c->n_alloc)
c->arts[i++] = 0;
}
... | false | false | false | false | false | 0 |
ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents)
{
int c;
bfd_byte *p;
bfd_byte *buf = NULL;
size_t bufsize;
bfd_boolean error;
if (bfd_seek (abfd, section->filepos, SEEK_SET) != 0)
goto error_return;
p = contents;
bufsize = 0;
error = FALSE;
while ((c = ihex_get_byte (abfd... | true | true | false | true | false | 1 |
HPDF_BasicEncoder_New (HPDF_MMgr mmgr,
const char *encoding_name)
{
HPDF_Encoder encoder;
HPDF_BasicEncoderAttr encoder_attr;
const HPDF_BuiltinEncodingData *data;
char *eptr;
HPDF_PTRACE((" HPDF_BasicEncoder_New\n"));
if (mmgr == NULL)
return NULL;
... | false | false | false | false | false | 0 |
handleOneElaboratedTypeLoc(
const ElaboratedTypeLoc &TLoc)
{
if (TLoc.getBeginLoc().isInvalid())
return;
const ElaboratedType *ET = TLoc.getTypePtr();
if ((ET->getKeyword() != ETK_Typename) && (ET->getKeyword() != ETK_None))
return;
if (TLoc.getQualifierLoc().getBeginLoc().isInvalid())
retur... | false | false | false | false | false | 0 |
with_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode,
jsval *vp, uintN *attrsp)
{
JSObject *proto = OBJ_GET_PROTO(cx, obj);
if (!proto)
return js_CheckAccess(cx, obj, id, mode, vp, attrsp);
return proto->checkAccess(cx, id, mode, vp, attrsp);
} | false | false | false | false | false | 0 |
BZ2_hbCreateDecodeTables ( Int32 *limit,
Int32 *base,
Int32 *perm,
UChar *length,
Int32 minLen,
Int32 maxLen,
Int32 alphaSize )
... | false | false | false | false | false | 0 |
make_sub_tlg_cam(Block *std,
sub_tlg_type type,
IntSet tlg_set,
Lad_opt *lad_opt)
{
int mt_num;
Block *mt;
IntSet *edcond;
Block *parent_block = std->outer;
Sub_tlg *sub_tlg;
mt_num = get_number_of_inner_blocks(std->outer);
... | false | false | false | false | false | 0 |
display_html()
{
FILE *fp;
if (!(fp = fopen(html_output, "r"))) {
printf("blocks_search: Error opening %s\n", html_output);
}
while (!feof(fp) &&
fgets(buf, LARGE_BUFF_LENGTH, fp) != NULL) {
printf(buf);
}
fclose(fp);
} | false | false | false | false | true | 1 |
GetElementWithReceiver(Object* receiver, uint32_t index) {
Heap* heap = IsSmi()
? Isolate::Current()->heap()
: HeapObject::cast(this)->GetHeap();
Object* holder = this;
// Iterate up the prototype chain until an element is found or the null
// prototype is encountered.
for (holder = this;
... | false | false | false | false | false | 0 |
mem_iraf_open(char *filename, int rwmode, int *hdl)
/*
This routine creates an empty memory buffer, then calls iraf2mem to
open the IRAF disk file and convert it to a FITS file in memeory.
*/
{
int status;
size_t filesize = 0;
/* create a memory file with size = 0 for the FITS converted IRAF file */
... | false | false | false | false | false | 0 |
deleteSelectedFiles()
{
// Get the currently selected items.
QList<QListWidgetItem*> selectedItems = fileList_->selectedItems();
// Delete the selected items.
QList<QListWidgetItem*>::Iterator itr;
for (itr = selectedItems.begin(); itr != selectedItems.end(); ++itr)
delete *itr;
} | false | false | false | false | false | 0 |
gdl_dock_master_drag_end (GdlDockItem *item,
gboolean cancelled,
gpointer data)
{
GdlDockMaster *master;
GdlDockRequest *request;
g_return_if_fail (data != NULL);
g_return_if_fail (item != NULL);
master = GDL_DOCK_MASTER (data);
requ... | false | false | false | false | false | 0 |
zWriteSfeature (FILE *stream, const zSfeature *f) {
char start[16], end[16], strand[8], score[8],
left[8], right[8], frame[8];
zCoor2Text(f->start +1, start); /* note: must add 1 to start and end because */
zCoor2Text(f->end +1, end); /* most people use 1-based coordinates */
zScore2Text(f->score, score);
... | false | false | false | false | false | 0 |
release_module ( )
{
munmap( m_ptrscr,m_width*m_height*(m_bpp>>3) );
m_ptrscr = NULL;
if( m_hscreen != -1 )
close( m_hscreen );
} | false | false | false | false | false | 0 |
check_data (void)
{
static const struct {
unsigned long x;
mp_size_t want_size;
mp_limb_t want_data[2];
} data[] = {
{ 0L, 0 },
{ 1L, 1, { 1 } },
#if GMP_NUMB_BITS >= BITS_PER_ULONG
{ ULONG_MAX, 1, { ULONG_MAX, 0 } },
{ ULONG_HIGHBIT, 1, { ULONG_HIGHBIT, 0 } },
#else... | false | false | false | false | false | 0 |
_spank_plugin_find (const char *path, const char *file)
{
char dir [4096];
char *p, *entry;
int pathlen = strlen (path);
if (strlcpy(dir, path, sizeof (dir)) > sizeof (dir))
return (NULL);
/*
* Ensure PATH ends with a :
*/
if (dir[pathlen - 1] != ':') {
dir[pathlen] = ':';
dir[pathlen+1] = '\0';
}
... | false | false | false | false | false | 0 |
st_widget_set_hover (StWidget *widget,
gboolean hover)
{
StWidgetPrivate *priv;
g_return_if_fail (ST_IS_WIDGET (widget));
priv = widget->priv;
if (priv->hover != hover)
{
priv->hover = hover;
if (priv->hover)
st_widget_add_style_pseudo_class (widget, "hover");
... | false | false | false | false | false | 0 |
aic31xx_device_init(struct aic31xx_priv *aic31xx)
{
int ret, i;
dev_set_drvdata(aic31xx->dev, aic31xx);
if (dev_get_platdata(aic31xx->dev))
memcpy(&aic31xx->pdata, dev_get_platdata(aic31xx->dev),
sizeof(aic31xx->pdata));
else if (aic31xx->dev->of_node)
aic31xx_pdata_from_of(aic31xx);
if (aic31xx->p... | false | true | false | false | false | 1 |
goo_canvas_rect_get_common_property (GObject *object,
GooCanvasRectData *rect_data,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
switch (prop_id)
{
case PROP_X:
g_value_set_double (value, rect_data->x);
... | false | false | false | false | false | 0 |
setAReg16(const Instruction *i, int s)
{
if (i->srcExists(s)) {
s = i->src(s).indirect[0];
if (s >= 0)
setARegBits(SDATA(i->src(s)).id + 1);
}
} | false | false | false | false | false | 0 |
gcov_fs_init(void)
{
int rc = -EIO;
init_node(&root_node, NULL, NULL, NULL);
/*
* /sys/kernel/debug/gcov will be parent for the reset control file
* and all profiling files.
*/
root_node.dentry = debugfs_create_dir("gcov", NULL);
if (!root_node.dentry)
goto err_remove;
/*
* Create reset file which rese... | false | false | false | false | false | 0 |
autohelperowl_attackpat178(int trans, int move, int color, int action)
{
int a, c;
UNUSED(color);
UNUSED(action);
a = AFFINE_TRANSFORM(683, trans, move);
c = AFFINE_TRANSFORM(682, trans, move);
return (owl_eyespace(a) || owl_eyespace(c))&& play_attack_defend_n(color, 1, 1, a, a) && play_attack_defend_n(OT... | false | false | false | false | false | 0 |
reusable_anon_vma(struct vm_area_struct *old, struct vm_area_struct *a, struct vm_area_struct *b)
{
if (anon_vma_compatible(a, b)) {
struct anon_vma *anon_vma = READ_ONCE(old->anon_vma);
if (anon_vma && list_is_singular(&old->anon_vma_chain))
return anon_vma;
}
return NULL;
} | false | false | false | false | false | 0 |
sh_cmt_enable(struct sh_cmt_channel *ch, unsigned long *rate)
{
int k, ret;
pm_runtime_get_sync(&ch->cmt->pdev->dev);
dev_pm_syscore_device(&ch->cmt->pdev->dev, true);
/* enable clock */
ret = clk_enable(ch->cmt->clk);
if (ret) {
dev_err(&ch->cmt->pdev->dev, "ch%u: cannot enable clock\n",
ch->index);
got... | false | false | false | false | false | 0 |
globus_l_uuid_get_mac(
unsigned char mac[6])
{
#if defined SIOCGIFHWADDR
/* linux systems */
struct ifreq interface;
int sock;
if((sock = socket(PF_INET, SOCK_DGRAM, 0)) < 0)
{
return GLOBUS_FAILURE;
... | false | true | false | false | false | 1 |
wiredTo(ConnectorItem * target, ViewGeometry::WireFlags skipFlags) {
QList<ConnectorItem *> connectorItems;
connectorItems.append(this);
collectEqualPotential(connectorItems, true, skipFlags);
return connectorItems.contains(target);
} | false | false | false | false | false | 0 |
dvb_usb_read_remote_control(struct work_struct *work)
{
struct dvb_usb_device *d =
container_of(work, struct dvb_usb_device, rc_query_work.work);
int err;
/* TODO: need a lock here. We can simply skip checking for the remote control
if we're busy. */
/* when the parameter has been set to 1 via sysfs while ... | false | false | false | false | false | 0 |
equalizer_set_all_band_values (GstElement * eq, guint num, gdouble val)
{
gint i;
GstObject *child;
for (i = 0; i < num; i++) {
child = gst_child_proxy_get_child_by_index (GST_CHILD_PROXY (eq), i);
g_object_set (child, "gain", val, NULL);
gst_object_unref (child);
}
g_print ("All bands: %.2f\n", ... | false | false | false | false | false | 0 |
append(const void* data, int nbytes)
{
const md5_byte_t* p = (const md5_byte_t*)data;
int left = nbytes;
int offset = (count[0]>>3) & 63;
md5_word_t nbits = (md5_word_t)(nbytes<<3);
if (nbytes <= 0)
return;
/* Update the message length. */
count[1] += nbytes >> 29;
count[0] += ... | false | false | false | false | false | 0 |
mbhitm(mtmp, otmp)
register struct monst *mtmp;
register struct obj *otmp;
{
int tmp;
boolean reveal_invis = FALSE;
if (mtmp != &youmonst) {
mtmp->msleeping = 0;
if (mtmp->m_ap_type) seemimic(mtmp);
}
switch(otmp->otyp) {
case WAN_STRIKING:
reveal_invis = TRUE;
if (mtmp == &youmonst) {
if (zap_oseen) ... | false | false | false | false | false | 0 |
get_object_types (void)
{
gpointer g_object_class;
gint i = 0;
object_types[i++] = g_udev_device_type_get_type ();
object_types[i++] = g_udev_device_get_type ();
object_types[i++] = g_udev_client_get_type ();
object_types[i++] = g_udev_enumerator_get_type ();
object_types[i] = 0;
/* ref... | false | false | false | false | false | 0 |
sdp_get_string_attr(const sdp_record_t *rec, uint16_t attrid, char *value,
int valuelen)
{
sdp_data_t *sdpdata = sdp_data_get(rec, attrid);
if (sdpdata)
/* Verify that it is what the caller expects */
if (sdpdata->dtd == SDP_TEXT_STR8 ||
sdpdata->dtd == SDP_TEXT_STR16 ||
sdpdata->dtd == SDP_TEXT_S... | false | false | false | false | false | 0 |
fpm_gpw_set_options( gint pw_len,
gboolean use_lcase,
gboolean use_ucase,
gboolean use_num,
gboolean use_sym,
gboolean no_amb)
/* This routine sets what types of characters can be used in
* generated passwords */
{
const gchar chars_lcase1[] = "abcdefghijkmnpqrstuvwxyz";
const gchar chars_lcase2... | false | false | false | false | true | 1 |
catalog_file_info_ready_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
{
ListData *list_data = user_data;
GthCatalog *catalog = list_data->catalog;
GFile *file;
GFileInfo *info;
file = (GFile*) source_object;
info = g_file_query_info_finish (file, result, NU... | false | false | false | false | false | 0 |
write_cod_range_block(unsigned int address, Block *rb)
{
DirBlockInfo *dbi = &main_dir;
unsigned int _64k_base;
_64k_base = (address >> 15) & 0xffff;
do {
if(gp_getl16(&dbi->dir.block[COD_DIR_HIGHADDR]) == (short)_64k_base) {
write_cod_block(dbi, COD_DIR_MEMMAP, COD_DIR_MEMMAP+2, rb);
return... | false | false | false | false | false | 0 |
logPartitionFunction() const{
double x = 0.0;
for( std::size_t k = 2; k < numAntidiagonals; ++k ){
x += std::log( scale[k] );
}
return T * x;
} | false | false | false | false | false | 0 |
be_clear_vf_tvt(struct be_adapter *adapter, int vf)
{
struct be_vf_cfg *vf_cfg = &adapter->vf_cfg[vf];
struct device *dev = &adapter->pdev->dev;
int status;
/* Reset Transparent VLAN Tagging. */
status = be_cmd_set_hsw_config(adapter, BE_RESET_VLAN_TAG_ID, vf + 1,
vf_cfg->if_handle, 0, 0);
if (status)... | false | false | false | false | false | 0 |
ReadRefData(std::string filename)
{
std::ifstream fileIn(filename.c_str(), std::ios::in);
if (!fileIn) {
return "";
} else {
std::stringstream stream;
stream << fileIn.rdbuf();
std::string ref(stream.str());
fileIn.close();
return ref;
}
} | false | false | false | false | false | 0 |
path_resolve(char *dest, const char *src)
{
size_t sz;
char *s;
char spath[PIL_PATHNAME_MAX + 1];
char tpath[2 * (PIL_PATHNAME_MAX + 1)]; /* Avoid buffer overflow */
/*
* Save the input path string to a local buffer since strtok()
* destroys its input argument.
*/
if (strlen(src) > PIL_PATHN... | false | false | false | false | false | 0 |
check_type_or_symbol_string(object *p)
{
while (type_of(*p) != t_symbol && type_of(*p) != t_string)
*p = wrong_type_argument(TSor_symbol_string, *p);
} | false | false | false | false | false | 0 |
tcp_seg_prepend_fakeclose(u_char *pkt, int pktlen)
{
ELEM *new, *list = NULL;
struct ip *iph = (struct ip *)pkt;
int ip_hl = iph->ip_hl * 4;
struct tcphdr *tcph = (struct tcphdr *)(pkt + ip_hl);
u_char *data;
if ((tcph->th_flags & TH_SYN) == 0)
return NULL;
/* Add our real SYN packet to list. */
n... | false | true | false | false | false | 1 |
check_lock(int fd, int offset, int len)
{
struct flock lock;
int ret;
lock.l_type = F_WRLCK;
lock.l_whence = SEEK_SET;
lock.l_start = offset;
lock.l_len = len;
lock.l_pid = 0;
ret = fcntl(fd, F_GETLK, &lock);
if (ret != 0) {
printf("error calling fcntl F_GETLCK: %s\n", strerror(errno));
return -1;
}
i... | false | false | false | false | false | 0 |
_e2pcr_finalise_item (VPATH *localpath, VPATH *temppath, VPATH *newpath,
gboolean same_name, gboolean preserve, gboolean wipe, guint8 hashes[KEY_LENGTH])
{
#ifdef E2_VFS
VPATH otherpath;
otherpath.spacedata = localpath->spacedata;
#endif
gboolean success;
gchar *tmp;
if (same_name)
{
if (preserve)
{
//no ... | false | false | false | false | false | 0 |
internal_writeToStream(mrpt::utils::CStream &out) const
{
const uint32_t msg_len = sizeof(header) + header.msg_len + 4;
out << msg_len;
out.WriteBuffer(&header,sizeof(header));
out << num_comps;
ASSERT_EQUAL_(num_comps,components.size());
if (num_comps)
out.WriteBuffer(&components[0],sizeof(components[0])*compo... | false | false | false | false | false | 0 |
save_init(int argc, char *hostname, char *port)
{
Atom actual_type;
int actual_format;
unsigned long nitems;
unsigned long bytes_after;
/*
* Fetch the initial value of the XA_COMMAND property and store
* it in 'cmd'.
*/
XGetWindowProperty(display, XtWindow(toplevel), XA_WM_COMMAND,
0L, 1000000L, False... | false | false | false | false | false | 0 |
scale_value_changed (GtkAdjustment *adjustment,
gpointer user_data)
{
ScaleData *scale_data = user_data;
double num;
char *value;
char *markup;
num = gtk_adjustment_get_value (adjustment);
value = g_strdup_printf (scale_data->format, num);
if ((num == 0.0) && ((value[0] == '-') || (va... | false | false | false | false | false | 0 |
isNumeric(char *p)
{
int i;
for (i = 0; i <= strlen(p); i++)
if (p[i] != '\0' && ! isdigit(p[i])) return(FALSE);
return(TRUE);
} | false | false | false | false | false | 0 |
stac_shutup(struct hda_codec *codec)
{
struct sigmatel_spec *spec = codec->spec;
snd_hda_shutup_pins(codec);
if (spec->eapd_mask)
stac_gpio_set(codec, spec->gpio_mask,
spec->gpio_dir, spec->gpio_data &
~spec->eapd_mask);
} | false | false | false | false | false | 0 |
StartNotebookPage( const wxString Name, wxNotebookPage * pPage )
{
if( mShuttleMode != eIsCreating )
return;
// return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
wxNotebook * pNotebook = (wxNotebook*)mpParent;
// wxNotebookPage * pPage = new wxPanel(mpParent );
pPage->Create( mpPa... | false | false | false | false | false | 0 |
tb_switch_resume(struct tb_switch *sw)
{
int i, err;
u64 uid;
tb_sw_info(sw, "resuming switch\n");
err = tb_drom_read_uid_only(sw, &uid);
if (err) {
tb_sw_warn(sw, "uid read failed\n");
return err;
}
if (sw->uid != uid) {
tb_sw_info(sw,
"changed while suspended (uid %#llx -> %#llx)\n",
sw->uid, uid)... | false | false | false | false | false | 0 |
isHomogeneous()const
{
IntegerVector v=IntegerVector::allOnes(theRing.getNumberOfVariables());
return isHomogeneous(v);
} | false | false | false | false | false | 0 |
cb_scg_destroy (GnmExprEntry *gee, SheetControlGUI *scg)
{
g_return_if_fail (scg == gee->scg);
gee_rangesel_reset (gee);
gee->scg = NULL;
gee->sheet = NULL;
} | false | false | false | false | false | 0 |
NC_free_cdf(handle)
NC *handle ;
{
int ret_value = SUCCEED;
if(handle != NULL)
{
if (NC_free_xcdf(handle) == FAIL)
{
ret_value = FAIL;
goto done;
}
/* destroy xdr struct */
xdr_destroy(ha... | false | false | false | false | false | 0 |
gkd_secret_property_append_variant (DBusMessageIter *iter,
const GckAttribute *attr)
{
const gchar *property;
DataType data_type;
g_return_val_if_fail (attr, FALSE);
g_return_val_if_fail (iter, FALSE);
if (!attribute_to_property (attr->type, &property, &data_type))
return FA... | false | false | false | false | false | 0 |
save_zram (int *len, int num)
{
if (num < 0) {
*len = allocated_z3chipmem;
return z3chipmem;
}
*len = num ? allocated_z3fastmem2 : allocated_z3fastmem;
return num ? z3fastmem2 : z3fastmem;
} | false | false | false | false | false | 0 |
on_clicked_show_presentity_menu (HeapView* self,
Ekiga::Presentity* presentity,
GdkEventButton* event)
{
Ekiga::TemporaryMenuBuilder temp;
MenuBuilderGtk builder;
self->priv->heap->populate_menu (temp);
presentity->populate_menu (builder);
if (!temp.empty ()) {
builder.add_separator ();
t... | 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.