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 |
|---|---|---|---|---|---|---|
elm_genlist_item_insert_before(Evas_Object *obj,
const Elm_Genlist_Item_Class *itc,
const void *data,
Elm_Object_Item *parent,
Elm_Object_Item *before_it,
Elm_Genlis... | false | false | false | false | false | 0 |
store_memory(struct device *d, struct device_attribute *attr,
const char *buf, size_t count)
{
struct ipw2100_priv *priv = dev_get_drvdata(d);
struct net_device *dev = priv->net_dev;
const char *p = buf;
(void)dev; /* kill unused-var warning for debug-only code */
if (count < 1)
return count;
if (p[0... | false | false | false | false | false | 0 |
userdiff_find_by_path(const char *path)
{
static struct git_attr *attr;
struct git_attr_check check;
if (!attr)
attr = git_attr("diff");
check.attr = attr;
if (!path)
return NULL;
if (git_checkattr(path, 1, &check))
return NULL;
if (ATTR_TRUE(check.value))
return &driver_true;
if (ATTR_FALSE(check.va... | false | false | false | false | false | 0 |
_q_stateChanged(QMediaPlayer::State ps)
{
Q_Q(QMediaPlayer);
if (filterStates)
return;
if (playlist
&& ps != state && ps == QMediaPlayer::StoppedState
&& (control->mediaStatus() == QMediaPlayer::EndOfMedia ||
control->mediaStatus() == QMediaPlayer::InvalidMe... | false | false | false | false | false | 0 |
gdl_dock_master_instance_init (GdlDockMaster *master)
{
master->dock_objects = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, NULL);
master->toplevel_docks = NULL;
master->controller = NULL;
master->dock_number = 1;
master->_priv = g_ne... | false | false | false | false | false | 0 |
free_output(
Tcl_Interp *interp,
struct output *o)
{
if (o == 0) return;
free_output(interp,o->next);
exp_free_i(interp,o->i_list,inter_updateproc);
ckfree((char *)o);
} | false | false | false | false | false | 0 |
createDeviceInterface(const Solid::DeviceInterface::Type& type)
{
if (!queryDeviceInterface(type)) {
return 0;
}
DeviceInterface *iface = 0;
switch (type)
{
case Solid::DeviceInterface::GenericInterface:
iface = new GenericInterface(this);
break;
case Solid::DeviceIn... | false | false | false | false | false | 0 |
process_suspend_info(struct mddev *mddev,
int slot, sector_t lo, sector_t hi)
{
struct md_cluster_info *cinfo = mddev->cluster_info;
struct suspend_info *s;
if (!hi) {
remove_suspend_info(mddev, slot);
set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
md_wakeup_thread(mddev->thread);
return;
}
s = kzalloc(... | false | false | false | false | false | 0 |
initMeasureFormat(
const Locale &locale,
UMeasureFormatWidth w,
NumberFormat *nfToAdopt,
UErrorCode &status) {
static const char *listStyles[] = {"unit", "unit-short", "unit-narrow"};
LocalPointer<NumberFormat> nf(nfToAdopt);
if (U_FAILURE(status)) {
return;
}
... | false | false | false | false | false | 0 |
mystrdup(char *s) /* string to duplicate to heap storage */
{
char *buf;
if (!(buf = (char *)malloc(strlen(s)+1)))
return NULL;
strcpy(buf, s);
return buf;
} | false | false | false | false | false | 0 |
randomize_password(struct w *widgets)
{
char *rnd_string;
int len = 6; /* Default password length */
gchar *utf8=NULL;
rnd_string = random_string(len);
/* Insert the randomized password in the password entry */
utf8 = g_locale_to_utf8(rnd_string, strlen(rnd_string), NULL, NULL, NULL);
... | false | true | false | false | true | 1 |
hasLazyResolverStub(const GlobalValue *GV) const {
// We never have stubs if HasLazyResolverStubs=false or if in static mode.
if (!HasLazyResolverStubs || TM.getRelocationModel() == Reloc::Static)
return false;
bool isDecl = GV->isDeclaration();
if (GV->hasHiddenVisibility() && !isDecl && !GV->hasCommonLink... | false | false | false | false | false | 0 |
Open( GDALOpenInfo * poOpenInfo )
{
if( !Identify( poOpenInfo ) )
return NULL;
if( poOpenInfo->eAccess == GA_Update )
{
CPLError( CE_Failure, CPLE_NotSupported,
"The GIF driver does not support update access to existing"
" files.\n" );
return NU... | false | false | false | false | false | 0 |
ath6kl_htc_mbox_tx(struct htc_target *target,
struct htc_packet *packet)
{
struct htc_endpoint *endpoint;
struct list_head queue;
ath6kl_dbg(ATH6KL_DBG_HTC,
"htc tx ep id %d buf 0x%p len %d\n",
packet->endpoint, packet->buf, packet->act_len);
if (packet->endpoint >= ENDPOINT_MAX) {
WARN_ON(1)... | false | false | false | false | false | 0 |
get_rights(imap &imapAccount,
Token t)
{
if (t == EOL)
{
done();
return;
}
if (t != ATOM && t != STRING)
{
error(imapAccount);
return;
}
rights.push_back(t.text);
} | false | false | false | false | false | 0 |
HPair_Span_is_valid(Heuristic_Span *heuristic_span,
HSP *src, HSP *dst,
gint query_emit, gint target_emit){
register gint effective_query_limit, effective_target_limit;
effective_query_limit = heuristic_span->span->max_query
... | false | false | false | false | false | 0 |
pushresult (lua_State *L, int i, const char *filename) {
if (i) {
lua_pushboolean(L, 1);
return 1;
}
else {
lua_pushnil(L);
if (filename)
lua_pushfstring(L, "%s: %s", filename, strerror(errno));
else
lua_pushfstring(L, "%s", strerror(errno));
lua_pushnumber(L, errno);
retur... | false | false | false | false | false | 0 |
bddVarToConst(
DdNode * f,
DdNode ** gp,
DdNode ** hp,
DdNode * one)
{
DdNode *g = *gp;
DdNode *h = *hp;
if (f == g) { /* ITE(F,F,H) = ITE(F,1,H) = F + H */
*gp = one;
} else if (f == Cudd_Not(g)) { /* ITE(F,!F,H) = ITE(F,0,H) = !F * H */
*gp = Cudd_Not(one);
}
if (f == h) { ... | false | false | false | false | false | 0 |
channel_change_topic(IRC_SERVER_REC *server, const char *channel,
const char *topic, const char *setby,
time_t settime)
{
CHANNEL_REC *chanrec;
char *recoded = NULL;
chanrec = channel_find(SERVER(server), channel);
if (chanrec == NULL) return;
/* the topic may be send out encoded, so we need to
re... | false | false | false | false | false | 0 |
dsp_adc(void)
{
Uint32 srcreg, destreg, source[3], dest[3], curcarry;
Uint16 newsr;
curcarry = (dsp_core->registers[DSP_REG_SR]>>DSP_SR_C) & 1;
destreg = (cur_inst>>3) & 1;
dest[0] = dsp_core->registers[DSP_REG_A2+destreg];
dest[1] = dsp_core->registers[DSP_REG_A1+destreg];
dest[2] = dsp_core->registers[DSP_RE... | false | false | false | false | false | 0 |
Remove_In_Stream_List(int stm, StmLst **p_start)
{
StmLst *m;
for(;;)
{
m = *p_start;
if (m == NULL)
break;
if (m->stm == stm) /* found */
{
*p_start = m->next;
Free(m);
return TRUE;
}
p_start = &m->next;
}
return FALSE; /* not found */
} | false | false | false | false | false | 0 |
do_popup (GSCHEM_TOPLEVEL *w_current, GdkEventButton *event)
{
GtkWidget *menu; /* =NULL; */ /* was static */
menu = NULL; /* Why do I need to do this? */
if (!menu)
menu = (GtkWidget *) w_current->popup_menu;
if (menu == NULL) {
printf("null menu\n");
}
gtk_menu_popup (GTK_MENU (menu), NULL, ... | false | false | false | false | false | 0 |
uf_varchar2(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end __attribute__((unused)))
{
if (get_bit(bit_buff))
to[0]=to[1]=0; /* Zero lengths */
else
{
ulong length=get_bits(bit_buff,rec->space_length_bits);
int2store(to,length);
decode_bytes(rec,bit_buff,to+2,to+2+lengt... | false | false | false | false | false | 0 |
igb_set_d0_lplu_state_82575(struct e1000_hw *hw, bool active)
{
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val = E1000_SUCCESS;
u16 data;
DEBUGFUNC("igb_set_d0_lplu_state_82575");
if (!(hw->phy.ops.read_reg))
goto out;
ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data);
if (ret_val)
got... | false | false | false | false | false | 0 |
printHelp()
{
fprintf(stderr,"%s",helpText());
Application *p=applicationList;
FILE *f=stderr;
Option *l=optionList;
if(l)
{
fprintf(f,"Options:\n");
while(l)
{
if(!l->isHidden())fprintf(f,"%s:\n %s\n",l->documentationMatchString().c_str(),l->documentationDescription().c_str());
l=l... | false | false | false | false | false | 0 |
lad_sm_search_array_max(StripMining *sm,
StripMiningInnerLoop *smil,
Block *search_block,
LoopDat *lpdat,
int step,
int entry,
int dim)
{
int max, max_pre, max_post, max_pe, max_inner;
max_inner = INT_MIN;
if (search_block == NULL) {
return INT_MIN;
}
max_pre = lad_sm_sea... | false | false | false | false | false | 0 |
doCreateResponder(const Request& request)
{
MutexLock lock(_mutex);
++_responderCount;
return createResponder(request);
} | false | false | false | false | false | 0 |
cert_ProcessingParamsSetKeyAndCertUsage(
PKIX_ProcessingParams *procParams,
SECCertUsage requiredCertUsage,
PRUint32 requiredKeyUsages,
void *plContext)
{
PKIX_CertSelector *certSelector = NULL;
PKIX_ComCertSelParams *certSelParams = NULL;
PKIX_PL... | false | false | false | false | false | 0 |
get_condition_for_loop (const struct loop *loop, rtx x)
{
rtx comparison = get_condition (x, (rtx*) 0, false);
if (comparison == 0
|| ! loop_invariant_p (loop, XEXP (comparison, 0))
|| loop_invariant_p (loop, XEXP (comparison, 1)))
return comparison;
return gen_rtx_fmt_ee (swap_condition (GET_CO... | false | false | false | false | false | 0 |
LC36(base0)
register object *base0;
{ register object *base=vs_base;
register object *sup=base+VM32; VC32
vs_check;
{object V226;
object V227;
V226=(base[0]);
V227=(base[1]);
vs_top=sup;
(base0[0]->c.c_car)= one_plus((base0[0]->c.c_car));
base[2]= Cnil;
vs_top=(vs_base=base+2)+1;
return;
}
} | false | false | false | false | false | 0 |
i2c_init(const string port) throw(const char *) {
std::map<const string, const int>::const_iterator iter;
int _fd;
if ((iter = port_map.find(port)) == port_map.end()) {
if ((_fd = open(port.c_str(), O_RDWR)) < 0) {
throw "i2c_init(): Failed to open the i2c bus";
} else {
port_map.insert(pair<const string... | false | false | false | false | false | 0 |
findPrev()
{
UT_DEBUGMSG(("AP_dlg_replace::findPrev()\n"));
bool bDoneEntireDocument = false;
// call view to do the work
bool result = getFvView()->findPrev(bDoneEntireDocument);
if (bDoneEntireDocument == true)
_messageFinishedFind();
return result;
} | false | false | false | false | false | 0 |
oauth_service_add_signature (OAuthService *self,
const char *method,
const char *url,
GHashTable *parameters)
{
GTimeVal t;
GString *param_string;
GList *keys;
GList *scan;
GString *base_string;
GString *signature_key;
/* Add the OAuth specific parameters */
g_get_curre... | false | false | false | false | false | 0 |
print_Face_list(){
int i;
node ptr;
for(i=1;i<=List_R;i++){
ptr=LStart(i);
while((ptr=(node)node_get_ptr(ptr,RIGHT))!=0){
Imatrix_print((Imatrix)node_get_ptr(ptr,LEFT));
#ifdef LOG_PRINT
fprintf(msd_out,"\n")
#endif
;
}
}
} | false | false | false | false | false | 0 |
drop_menu (PanelWidget *panel,
PanelObjectPackType pack_type,
int pack_index,
const char *menu_filename,
const char *menu_path)
{
if (!panel_layout_is_writable ())
return FALSE;
return panel_menu_button_create (panel->toplevel,
pack_type, pack_index... | false | false | false | false | false | 0 |
_rdns_count (char*** rdns)
{
auto size_t count = 0;
auto char*** rdn;
for (rdn = rdns; *rdn; ++rdn) {
auto char** ava;
for (ava = *rdn; *ava; ++ava) {
++count;
}
}
return count;
} | false | false | false | false | false | 0 |
DMAbuf_move_wrpointer(int dev, int l)
{
struct audio_operations *adev = audio_devs[dev];
struct dma_buffparms *dmap = adev->dmap_out;
unsigned long ptr;
unsigned long end_ptr, p;
int post;
unsigned long flags;
spin_lock_irqsave(&dmap->lock,flags);
post= (dmap->flags & DMA_POST);
ptr = (dmap->user_counter / dm... | false | false | false | false | false | 0 |
game_won()
{
gcomprisBoard->sublevel++;
if(gcomprisBoard->sublevel>gcomprisBoard->number_of_sublevel) {
/* Try the next level */
gcomprisBoard->sublevel=1;
gcomprisBoard->level++;
if(gcomprisBoard->level>gcomprisBoard->maxlevel)
gcomprisBoard->level = gcomprisBoard->maxlevel;
gc_sound_pl... | false | false | false | false | false | 0 |
rx_flood(struct stuff *s)
{
int i,wide,thisflags,result=0;
struct callsign_list *c;
/* FLOODn-n algorithm: next digi with non-zero ssid callsign */
c = calltab_entry(&s->in.ax_digi_call[s->in.ax_next_digi],&thisflags);
if (c && thisflags&C_IS_FLOOD
&& (wide = (s->in.ax_digi_call[s->in.ax_next_digi].ax2... | false | false | false | false | false | 0 |
mx_path_bar_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
MxPathBar *self = MX_PATH_BAR (object);
switch (property_id)
{
case PROP_EDITABLE:
g_value_set_boolean (value, m... | false | false | false | false | false | 0 |
AreaTrigger_at_stomach_cthun(Player* pPlayer, AreaTriggerEntry const* pAt)
{
if (pAt->id == AREATRIGGER_STOMACH_1)
{
if (pPlayer->isGameMaster() || !pPlayer->IsAlive())
{
return false;
}
// Summon the exit trigger which should push the player outside the stomach - no... | false | false | false | false | false | 0 |
SetLastCellId( vtkIdType c, int dataindex )
{
this->LastCellId = c;
this->LastDataSet = ( *this->DataSets )[dataindex];
// if the dataset changes, then the cached cell is invalidated
// we might as well prefetch the cached cell either way
if ( this->LastCellId != -1 )
{
this->LastDataSet->GetCell( ... | false | false | false | false | false | 0 |
ext2fs_punch(ext2_filsys fs, ext2_ino_t ino,
struct ext2_inode *inode,
char *block_buf, blk64_t start,
blk64_t end)
{
errcode_t retval;
struct ext2_inode inode_buf;
if (start > end)
return EINVAL;
/* Read inode structure if necessary */
if (!inode) {
retval = ext2fs_read_inode(fs,... | false | false | false | false | false | 0 |
istrport_get_byte(ScmInputStrPort *port)
{
return (*port->cur) ? *port->cur++ : SCM_ICHAR_EOF;
} | false | false | false | false | false | 0 |
sp887x_readreg (struct sp887x_state* state, u16 reg)
{
u8 b0 [] = { reg >> 8 , reg & 0xff };
u8 b1 [2];
int ret;
struct i2c_msg msg[] = {{ .addr = state->config->demod_address, .flags = 0, .buf = b0, .len = 2 },
{ .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 2 }};
if ((ret = i2c_... | false | false | false | false | false | 0 |
sweep_pages (void)
{
unsigned order;
for (order = 2; order < NUM_ORDERS; order++)
{
/* The last page-entry to consider, regardless of entries
placed at the end of the list. */
page_entry * const last = G.page_tails[order];
size_t num_objects;
size_t live_objects;
page_entry *p... | false | false | false | false | false | 0 |
check_abbr(c, ptr, col, mincol)
int c;
char_u *ptr;
int col;
int mincol;
{
int len;
int j;
char_u tb[3];
struct mapblock *mp;
int is_id = TRUE;
if (no_abbr_cnt) /* abbrev. are not recursive */
return FALSE;
#ifdef KANJI
if (col && ISkanjiPointer(ptr, &ptr[col - 1]))
;
else
#endif
if (c... | false | false | false | false | false | 0 |
bjnp_recv_header (int devno, size_t *payload_size )
{
/*
* This function receives the response header to bjnp commands.
* devno device number
* size: return value for data size returned by scanner
* Returns:
* SANE_STATUS_IO_ERROR when any IO error occurs
* SANE_STATUS_GOOD in case no errors were encountered
*... | false | false | false | false | false | 0 |
test_gd_organization_escaping (void)
{
GDataGDOrganization *org;
org = gdata_gd_organization_new ("Steptoe & Son", "Title & Stuff", GDATA_GD_ORGANIZATION_WORK "?foo&bar", "Personal & Private", TRUE);
gdata_gd_organization_set_department (org, "Department & Stuff");
gdata_gd_organization_set_job_description (org, "... | false | false | false | false | false | 0 |
memHeapAddRef (void** ppvMemHeap)
{
OSMemHeap* pMemHeap;
if (ppvMemHeap == 0 || *ppvMemHeap == 0) return;
pMemHeap = *(OSMemHeap**)ppvMemHeap;
ast_mutex_lock(&pMemHeap->pLock);
pMemHeap->refCnt++;
ast_mutex_unlock(&pMemHeap->pLock);
} | false | false | false | false | false | 0 |
FuncADD_ROW_VECTOR_5_FAST ( Obj self,
Obj list1,
Obj list2,
Obj mult,
Obj from,
Obj to )
{
UInt i;
Obj e1,e2, prd, sum;
while (!IS_INTOBJ(to) ||
... | false | false | false | false | false | 0 |
isf(void *param, Dsymbol *s)
{
FuncDeclaration *fd = s->isFuncDeclaration();
if (!fd)
return 0;
//printf("param = %p, fd = %p %s\n", param, fd, fd->toChars());
return (RootObject *)param == fd;
} | false | false | false | false | false | 0 |
vtraceServer(const char* fmt, va_list ap)
{
if (tracingLevel & FAXTRACE_SERVER)
vlogInfo(fmt, ap);
} | false | false | false | false | false | 0 |
shuffle()
{
QList<int> fromRows, toRows;
{
const int rowCount = The::playlist()->qaim()->rowCount();
fromRows.reserve( rowCount );
QMultiMap<int, int> shuffleToRows;
for( int row = 0; row < rowCount; ++row )
{
fromRows.append( row );
shuffleToRow... | false | false | false | false | false | 0 |
mpz_realloc(mpz_ptr z, u_int32_t i)
{
void *new;
u_int32_t j;
if (i < z->a)
return SBN_OK;
new = realloc(z->d, (i+1)*MPZ_ATOMSZ);
if (new == NULL)
return SBN_MEM;
z->d = new;
/* set the new words to zero */
for (j = z->a; j <= i; j++)
z->d[j] = 0;
z->a = j; /* j = i+1 here */
return SBN_OK;
} | false | false | false | false | false | 0 |
camel_ews_store_summary_get_folders (CamelEwsStoreSummary *ews_summary,
const gchar *prefix)
{
GSList *folders = NULL;
gchar **groups = NULL;
gsize length;
gint prefixlen = 0;
gint i;
if (prefix)
prefixlen = strlen (prefix);
S_LOCK (ews_summary);
groups = g_key_file_get... | false | false | false | false | false | 0 |
clear_aliases(const DjVuPort * port)
{
GCriticalSectionLock lock(&map_lock);
for(GPosition pos=a2p_map;pos;)
if (a2p_map[pos]==port)
{
GPosition this_pos=pos;
++pos;
a2p_map.del(this_pos);
} else ++pos;
} | false | false | false | false | false | 0 |
put(gunichar ch) throw(StreamException)
{
int ich = (int)ch;
outputStream->put(ich);
} | false | false | false | false | false | 0 |
st_int_enqueue(struct st_data_s *st_gdata, struct sk_buff *skb)
{
unsigned long flags = 0;
pr_debug("%s", __func__);
spin_lock_irqsave(&st_gdata->lock, flags);
switch (st_ll_getstate(st_gdata)) {
case ST_LL_AWAKE:
pr_debug("ST LL is AWAKE, sending normally");
skb_queue_tail(&st_gdata->txq, skb);
break;
ca... | false | false | false | false | false | 0 |
thermal_temp_input_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct sensor_device_attribute *sensor_attr =
to_sensor_dev_attr(attr);
int idx = sensor_attr->index;
s32 value;
int res;
res = thermal_get_sensor(idx, &value);
if (res)
return res;
if (value == TPACPI_THE... | false | false | false | false | false | 0 |
operator>>(std::istream& i, Matrix& m) {
int dim;
i >> dim;
Matrix n(dim);
for (int j=0; j<dim; ++j)
for (int k=0; k<dim; ++k)
i >> n(j,k);
m = n;
return i;
} | false | false | false | false | false | 0 |
presentWindows(WId controller, const QList<WId> &ids)
{
#ifdef Q_WS_X11
const int numWindows = ids.count();
QVarLengthArray<long, 32> data(numWindows);
int actualCount = 0;
for (int i = 0; i < numWindows; ++i) {
data[i] = ids.at(i);
++actualCount;
}
if (actualCount != numWindo... | false | false | false | false | false | 0 |
readText(Encoding encoding)
{
return fromEncoding(mTcpSocket->readAll(), encoding);
} | false | false | false | false | false | 0 |
usage(const char *appname)
{
printf("Usage:\n");
printf("\t%s [-a <alg>] [-n <number of elements>] [-s <scenario>]\n", appname);
printf("\t%s [-a <alg>] <number, number, number...>\n", appname);
printf("\nAlgorithms:\n");
for(uint32_t i = 0; i < num_algorithms; i++)
printf("\t[%u] %s\n", i, ... | false | false | false | false | false | 0 |
get_pref_hour_ampm(char *datef)
{
const char *svalue;
get_pref(PREF_TIME, NULL, &svalue);
strncpy(datef, svalue, 2);
datef[2]='\0';
if (!strncasecmp(&(svalue[strlen(svalue)-2]), "%p", 2)) {
strncpy(&(datef[2]), &(svalue[strlen(svalue)-2]), 2);
datef[4]='\0';
}
} | false | true | false | false | false | 1 |
folderAsString(const KBookmarkGroup &parent) const {
QString str;
QTextStream fstream(&str, QIODevice::WriteOnly);
for (KBookmark bk = parent.first(); !bk.isNull(); bk = parent.next(bk)) {
if (bk.isSeparator()) {
fstream << "<HR>" << endl;
continue;
}
QString text = Qt::es... | false | false | false | false | false | 0 |
nvkm_i2c_init(struct nvkm_subdev *subdev)
{
struct nvkm_i2c *i2c = nvkm_i2c(subdev);
struct nvkm_i2c_bus *bus;
struct nvkm_i2c_pad *pad;
list_for_each_entry(pad, &i2c->pad, head) {
nvkm_i2c_pad_init(pad);
}
list_for_each_entry(bus, &i2c->bus, head) {
nvkm_i2c_bus_init(bus);
}
return 0;
} | false | false | false | false | false | 0 |
name_option(long type)
{
const char *at[] = {
"unknown",
"integer",
"float",
"string",
"boolean",
"file",
"outfile"
};
if ((type & ARGTYPE_TYPEMASK) <= 6) {
return at[type & ARGTYPE_TYPEMASK];
}
return at[0];
} | false | false | false | false | false | 0 |
stmt_dominates_stmt_p (gimple s1, gimple s2)
{
basic_block bb1 = gimple_bb (s1), bb2 = gimple_bb (s2);
if (!bb1
|| s1 == s2)
return true;
if (bb1 == bb2)
{
gimple_stmt_iterator bsi;
if (gimple_code (s2) == GIMPLE_PHI)
return false;
if (gimple_code (s1) == GIMPLE_PHI)
return t... | false | false | false | false | false | 0 |
leds_init(void)
{
leds_class = class_create(THIS_MODULE, "leds");
if (IS_ERR(leds_class))
return PTR_ERR(leds_class);
leds_class->pm = &leds_class_dev_pm_ops;
leds_class->dev_groups = led_groups;
return 0;
} | false | false | false | false | false | 0 |
del_attr(const string &name, int i)
{
#if WWW_ENCODING
string lname = www2id(name);
#else
string lname = remove_space_encoding(name);
#endif
Attr_iter iter = simple_find(lname);
if (iter != attr_map.end()) {
if (i == -1) { // Delete the whole attribute
entry *e = *iter;
... | false | false | false | false | false | 0 |
hide_cluster_cb (GtkToggleButton * btn, gpointer cbd)
{
gint k = GPOINTER_TO_INT (cbd);
gint i;
ggobid *gg = GGobiFromWidget (GTK_WIDGET (btn), true);
GGobiData *d = datad_get_from_notebook (gg->cluster_ui.notebook, gg);
gboolean prev, changed = false;
g_assert (d->sampled.nels == d->nrows);
g_assert (d-... | false | false | false | false | false | 0 |
symbol_mark_resolved (symbolS *s)
{
if (LOCAL_SYMBOL_CHECK (s))
{
local_symbol_mark_resolved ((struct local_symbol *) s);
return;
}
s->sy_flags.sy_resolved = 1;
} | false | false | false | false | false | 0 |
ax88172a_bind(struct usbnet *dev, struct usb_interface *intf)
{
int ret;
u8 buf[ETH_ALEN];
struct ax88172a_private *priv;
usbnet_get_endpoints(dev, intf);
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
dev->driver_priv = priv;
/* Get the MAC address */
ret = asix_read_cmd(dev, AX_C... | false | false | false | false | false | 0 |
parseAtom(char *buf, int offset, AtomPtr *value_return, int insensitive)
{
int y0, i, j, k;
AtomPtr atom;
int escape = 0;
char *s;
i = offset;
if(buf[i] == '\"') {
i++;
y0 = i;
while(buf[i] != '\"' && buf[i] != '\n' && buf[i] != '\0') {
if(buf[i] == '\\' && b... | false | false | false | false | false | 0 |
renderBackground(const QString& filename, int type, const QColor& background, const QSize& size)
{
QImage image(size, QImage::Format_RGB32);
image.fill(background.rgb());
QPainter painter(&image);
if (type > 1) {
QImageReader source(filename);
QSize scaled = source.size();
switch (type) {
case 3:
scaled... | false | false | false | false | false | 0 |
emptycompoundconst(int lineno, Constant* c)
{
ASSERT(c != NULL);
c->lineno = lineno;
c->nctype = NC_COMPOUND;
c->value.compoundv = builddatalist(0);
return c;
} | false | false | false | false | false | 0 |
Swap_Init (void)
{
byte swaptest[2] = {1,0};
// set the byte swapping variables in a portable manner
if ( *(short *)swaptest == 1)
{
bigendien = false;
_BigShort = ShortSwap;
_LittleShort = ShortNoSwap;
_BigLong = LongSwap;
_LittleLong = LongNoSwap;
_BigFloat = FloatSwap;
_LittleFloat = F... | false | false | false | false | false | 0 |
dcbnl_send_msg(int nl_sd, struct nlmsghdr *nlh)
{
struct sockaddr_nl nladdr;
void *buf = nlh;
int r, len = nlh->nlmsg_len;
memset(&nladdr, 0, sizeof(nladdr));
nladdr.nl_family = AF_NETLINK;
do {
r = sendto(nl_sd, buf, len, 0, (struct sockaddr *)&nladdr,
sizeof(nladdr));
} while (r < 0 && errno == EINTR);
... | false | false | false | false | false | 0 |
mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
if (!page()) {
GraphicsWebViewBase::mouseReleaseEvent(event);
return;
}
QMouseEvent me(QEvent::MouseButtonRelease, event->pos().toPoint(),
event->button(),event->buttons(), event->modifiers());
if (!m_dragToScroll || (scr... | false | false | false | false | false | 0 |
pm_autosleep_set_state(suspend_state_t state)
{
#ifndef CONFIG_HIBERNATION
if (state >= PM_SUSPEND_MAX)
return -EINVAL;
#endif
__pm_stay_awake(autosleep_ws);
mutex_lock(&autosleep_lock);
autosleep_state = state;
__pm_relax(autosleep_ws);
if (state > PM_SUSPEND_ON) {
pm_wakep_autosleep_enabled(true);
q... | false | false | false | false | false | 0 |
GDALRegister_PNG()
{
GDALDriver *poDriver;
if( GDALGetDriverByName( "PNG" ) == NULL )
{
poDriver = new GDALDriver();
poDriver->SetDescription( "PNG" );
poDriver->SetMetadataItem( GDAL_DMD_LONGNAME,
"Portable Network Graphics" );
... | false | false | false | false | false | 0 |
setMode(FV_InlineDragMode iEditMode)
{
bool bClearSelection =false;
if(m_bSelectionDrawn && (iEditMode == FV_InlineDrag_NOT_ACTIVE))
{
bClearSelection = true;
}
m_iInlineDragMode = iEditMode;
if(bClearSelection)
{
m_pView->updateScreen(false);
m_bSelection... | false | false | false | false | false | 0 |
cmsIT8Alloc(cmsContext ContextID)
{
cmsIT8* it8;
int i;
it8 = (cmsIT8*) _cmsMallocZero(ContextID, sizeof(cmsIT8));
if (it8 == NULL) return NULL;
AllocTable(it8);
it8->MemoryBlock = NULL;
it8->MemorySink = NULL;
it8 ->nTable = 0;
it8->ContextID = ContextID;
it8->Allo... | false | false | false | false | false | 0 |
curl_writefunction(void *ptr, size_t size,
size_t nmemb, void *stream)
{
unsigned char *data = (unsigned char *)ptr;
unsigned char *status = (unsigned char *)stream;
/* Grab the status line text from the first line of output */
if ((status[0] == 0) && (status[1] == 1)) ... | false | false | false | false | false | 0 |
create_func_true(MY_XPATH *xpath, Item **args, uint nargs)
{
return new Item_bool(1);
} | false | false | false | false | false | 0 |
vivo_type_find (GstTypeFind * tf, gpointer unused)
{
static const guint8 vivo_marker[] = { 'V', 'e', 'r', 's', 'i', 'o', 'n',
':', 'V', 'i', 'v', 'o', '/'
};
const guint8 *data;
guint hdr_len, pos;
data = gst_type_find_peek (tf, 0, 1024);
if (data == NULL || data[0] != 0x00)
return;
if ((data[1]... | false | false | false | false | false | 0 |
bi_proc(name, ip)
char *name;
struct implement *ip;
{
int nargs;
char prefix[3];
prefix[0] = ip->prefix[0];
prefix[1] = ip->prefix[1];
prefix[2] = '\0';
nargs = ip->nargs;
if (nargs > 0 && ip->arg_flgs[nargs - 1] & VarPrm)
nargs = -nargs;
fprintf(inclfile, "\n");
implproto(ip);
... | false | false | false | false | false | 0 |
index_add_value(struct index_value **values,
const char *value, unsigned int priority)
{
struct index_value *v;
int duplicate = 0;
int len;
/* report the presence of duplicate values */
for (v = *values; v; v = v->next) {
if (streq(v->value, value))
duplicate = 1;
}
/* find position to insert value */... | false | false | false | false | false | 0 |
_test_element_timer(void *data)
{
struct test_element_timer_data *d = data;
E_Connman_Element *element = d->element;
if (e_connman_element_is_profile(element))
_test_element(element, test_desc_profile);
else if (e_connman_element_is_manager(element))
_test_element(element, test_desc_manager);
... | false | false | false | false | false | 0 |
countryAt(const QPointF& point)
{
// kDebug() << "ONU::countryAt x y " << x << " " << y;
QPointF norm = point;
norm /= m_zoom;
if ( norm.x() < 0 || norm.x() >= countriesMask.width()
|| norm.y() < 0 || norm.y() >= countriesMask.height() )
return 0;
int index = qBlue(countriesMask.pixel(no... | false | false | false | false | false | 0 |
string_obj_hash(const void *key, unsigned long size)
{
struct vm_object *array;
unsigned long hash;
jint offset;
jint count;
offset = field_get_int(key, vm_java_lang_String_offset);
count = field_get_int(key, vm_java_lang_String_count);
array = field_get_object(key, vm_java_lang_String_value);
hash = 0;
for... | false | false | false | false | false | 0 |
state_dbg_show(struct seq_file *s, void *p)
{
struct pxa_udc *udc = s->private;
u32 tmp;
if (!udc->driver)
return -ENODEV;
/* basic device status */
seq_printf(s, DRIVER_DESC "\n"
"%s version: %s\n"
"Gadget driver: %s\n",
driver_name, DRIVER_VERSION,
udc->driver ? udc->driver->driver.name :... | false | false | false | false | false | 0 |
generateAbbrev() const {
DIEAbbrev Abbrev(Tag, hasChildren());
for (const DIEValue &V : values())
Abbrev.AddAttribute(V.getAttribute(), V.getForm());
return Abbrev;
} | false | false | false | false | false | 0 |
compile_declaration_list (NODE_T * p, FILE_T out, int * decs, char * pop)
{
for (; p != NO_NODE; FORWARD (p)) {
switch (ATTRIBUTE (p)) {
case MODE_DECLARATION:
case PROCEDURE_DECLARATION:
case BRIEF_OPERATOR_DECLARATION:
case PRIORITY_DECLARATION:
{
/* No action needed */
(* decs) +... | true | true | false | false | false | 1 |
mailimf_return_parse(const char * message, size_t length,
size_t * index,
struct mailimf_return ** result)
{
struct mailimf_path * path = NULL;
struct mailimf_return * return_path;
size_t cur_token;
int r;
int res;
cur_token = * index;
r = mailimf_token_case_insensitive_parse(message, length,
... | false | false | false | false | false | 0 |
gst_allocator_sysmem_init (GstAllocatorSysmem * allocator)
{
GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
GST_CAT_DEBUG (GST_CAT_MEMORY, "init allocator %p", allocator);
alloc->mem_type = GST_ALLOCATOR_SYSMEM;
alloc->mem_map = (GstMemoryMapFunction) _sysmem_map;
alloc->mem_unmap = (GstMemoryUnmapFu... | false | false | false | false | false | 0 |
abituguru3_detect(void)
{
/*
* See if there is an uguru3 there. An idle uGuru3 will hold 0x00 or
* 0x08 at DATA and 0xAC at CMD. Sometimes the uGuru3 will hold 0x05
* or 0x55 at CMD instead, why is unknown.
*/
u8 data_val = inb_p(ABIT_UGURU3_BASE + ABIT_UGURU3_DATA);
u8 cmd_val = inb_p(ABIT_UGURU3_BASE + ABI... | false | false | false | false | false | 0 |
thermal_zone_device_reset(struct thermal_zone_device *tz)
{
struct thermal_instance *pos;
tz->temperature = THERMAL_TEMP_INVALID;
tz->passive = 0;
list_for_each_entry(pos, &tz->thermal_instances, tz_node)
pos->initialized = false;
} | false | false | false | false | false | 0 |
row_sel_build_committed_vers_for_mysql(
/*===================================*/
dict_index_t* clust_index, /*!< in: clustered index */
row_prebuilt_t* prebuilt, /*!< in: prebuilt struct */
const rec_t* rec, /*!< in: record in a clustered index */
ulint** offsets, /*!< in/out: offsets returned by
rec_get_offs... | 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.