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 |
|---|---|---|---|---|---|---|
verifyColumn(::A a_)
{
if (a_!=0&&!QS(a_))
{
if (a_->t==Et) return MSTrue;
else if (a_->r==1&&a_->t!=Ct) return MSTrue;
else if (a_->t==Ct&&a_->r>=1&&a_->r<=2) return MSTrue;
}
return MSFalse;
} | false | false | false | false | false | 0 |
print_common_decls(
Lsymtab *sym_entry, /* COMMON block symbol table entry */
char **header) /* Header to print IF there are variables printed*/
#else /* K&R style */
print_common_decls(sym_entry, header )
Lsymtab *sym_entry; /* COMMON block symbol table entry */
char **he... | false | false | false | false | false | 0 |
freercsnode (RCSNode **rnodep)
{
if (rnodep == NULL || *rnodep == NULL)
return;
((*rnodep)->refcount)--;
if ((*rnodep)->refcount != 0)
{
*rnodep = NULL;
return;
}
free ((*rnodep)->path);
free ((*rnodep)->print_path);
if ((*rnodep)->head != NULL)
free ((*rnodep)->head);
if ((*rno... | false | false | false | false | false | 0 |
option_enabled (int opt_idx, void *opts)
{
const struct cl_option *option = &(cl_options[opt_idx]);
struct gcc_options *optsg = (struct gcc_options *) opts;
void *flag_var = option_flag_var (opt_idx, optsg);
if (flag_var)
switch (option->var_type)
{
case CLVC_BOOLEAN:
return *(int *) flag_var ... | false | false | false | false | false | 0 |
paintImageOnCanvas(PaintCanvasInterface *paintCanvas) const
{
if (isImageLoaded()) {
const QSizeF canvasSize = paintCanvas->size();
const QSize inputImageSize = inputImageSizePixels();
const QSizeF boxSize = previewSize(inputImageSize, canvasSize.toSize(), false);
QPointF offset((can... | false | false | false | false | false | 0 |
get_variant_name(linep)
char **linep ;
{
char *name_end, *name_beg ;
name_beg = skip_over_whitespace(*linep) ;
name_end = skip_over_name_with_stop(name_beg, ",()") ;
if (name_beg == name_end) {
parsing_error("name or macro expected", *linep, NULL) ;
}
*linep = name_end ;
return check_... | false | false | false | false | false | 0 |
add_predicate_code (struct pred_data *pred, enum rtx_code code)
{
if (!pred->codes[code])
{
pred->num_codes++;
pred->codes[code] = true;
if (GET_RTX_CLASS (code) != RTX_CONST_OBJ)
pred->allows_non_const = true;
if (code != REG
&& code != SUBREG
&& code != MEM
&& code != CONCAT
... | false | false | false | false | false | 0 |
arp_failure_discard(void *handle, struct sk_buff *skb)
{
PDBG("%s c4iw_dev %p\n", __func__, handle);
kfree_skb(skb);
} | false | false | false | false | false | 0 |
slab_sysfs_init(void)
{
struct kmem_cache *s;
int err;
mutex_lock(&slab_mutex);
slab_kset = kset_create_and_add("slab", &slab_uevent_ops, kernel_kobj);
if (!slab_kset) {
mutex_unlock(&slab_mutex);
pr_err("Cannot register slab subsystem.\n");
return -ENOSYS;
}
slab_state = FULL;
list_for_each_entry(s, ... | false | false | false | false | false | 0 |
describe_pointer (GCObject *obj)
{
HashEntry *entry;
int i;
for (i = 0; i < dyn_array_ptr_size (®istered_bridges); ++i) {
if (obj == dyn_array_ptr_get (®istered_bridges, i)) {
printf ("Pointer is a registered bridge object.\n");
break;
}
}
entry = (HashEntry *)sgen_hash_table_lookup (&hash_table,... | false | false | false | false | false | 0 |
atmel_classd_platform_configure_dma(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct dma_slave_config *slave_config)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct atmel_classd *dd = snd_soc_card_get_drvdata(rtd->card);
if (params_physical_width(params) != 16) {
... | false | false | false | false | false | 0 |
bkn_dma_abort_rx(bkn_switch_info_t *sinfo, int chan)
{
bkn_dcb_chain_t *dcb_chain;
DBG_VERB(("Aborting Rx%d DMA.\n", chan));
dev_irq_mask_disable(sinfo, XGS_DMA_RX_CHAN + chan, 1);
dev_dma_chan_abort(sinfo, XGS_DMA_RX_CHAN + chan, 10000);
if (sinfo->rx[chan].api_dcb_chain) {
DBG_DCB_RX((... | false | false | false | false | false | 0 |
makeLoop( Graph g1, int approx, char * pFirstSetSymbol )
#else
makeLoop( g1, approx, pFirstSetSymbol)
Graph g1;
int approx;
char * pFirstSetSymbol;
#endif
{
Junction *back, *front, *begin;
Graph g;
require(g1.left != NULL && g1.right != NULL, "makeLoop: invalid graph");
back = newJunction();
front = newJunction()... | false | false | false | true | false | 1 |
put_journal_list(struct super_block *s,
struct reiserfs_journal_list *jl)
{
if (jl->j_refcount < 1) {
reiserfs_panic(s, "journal-2", "trans id %u, refcount at %d",
jl->j_trans_id, jl->j_refcount);
}
if (--jl->j_refcount == 0)
kfree(jl);
} | false | false | false | false | false | 0 |
setOutput(std::string filename)
{
this->closeFile();
this->filename = filename;
this->externalOutputStream = NULL;
if (this->mode == SVUT_OUT_STD_COLOR)
this->mode = SVUT_OUT_STD_BW;
} | false | false | false | false | false | 0 |
dgap_write_wakeup(struct board_t *bd, struct channel_t *ch,
struct un_t *un, u32 mask,
unsigned long *irq_flags1,
unsigned long *irq_flags2)
{
if (!(un->un_flags & mask))
return;
un->un_flags &= ~mask;
if (!(un->un_flags & UN_ISOPEN))
return;
if ((un->un_tty->flags & (1 << TTY_DO_W... | false | false | false | false | false | 0 |
fill_threadinfo(pthread_t id, const char *name,
gwthread_func_t *func,
struct threadinfo *ti)
{
int pipefds[2];
long first_try;
gw_assert(active_threads < THREADTABLE_SIZE);
/* initialize to default values */
ti->self = id;
ti->name = nam... | false | false | false | false | false | 0 |
IsNull() const {
if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsNull()")) return false;
return Utils::OpenHandle(this)->IsNull();
} | false | false | false | false | false | 0 |
gt_loadBWTSeqForSA(const char *projectName, enum seqBaseEncoding encType,
int BWTOptFlags, const GtAlphabet *gtalphabet,
GtError *err)
{
struct BWTSeq *bwtSeq = NULL;
EISeq *seqIdx = NULL;
MRAEnc *alphabet = NULL;
gt_assert(projectName && gtalphabet && err);
alphabet = gt... | false | false | false | false | false | 0 |
gf_dash_purge_segment_timeline(GF_DASH_Group *group, Double min_start_time)
{
u32 nb_removed, time_scale;
u64 start_time, min_start, duration;
GF_MPD_SegmentTimeline *timeline=NULL;
GF_MPD_Representation *rep = gf_list_get(group->adaptation_set->representations, group->active_rep_index);
if (!min_start_tim... | false | false | false | false | false | 0 |
ComputeMeanRadius(vtkPoints* points, double point1[3])
{
vtkIdType i;
double radius = 0.0;
for (i=0; i<points->GetNumberOfPoints(); i++)
{
double point[3];
points->GetPoint(i,point);
radius += sqrt(vtkMath::Distance2BetweenPoints(point,point1));
}
radius /= points->GetNumberOfPoints();
ret... | false | false | false | false | false | 0 |
DNSNameEncode(char **Pos_pp, char *Name, uint16_t Offset)
{
char *Pos_p;
char *Name_p;
char *Dot_p;
size_t Len;
if (NULL == Pos_pp ||
NULL == *Pos_pp ||
NULL == Name ||
strlen(Name) > DNS_NAME_SIZE)
return DNS_RCODE_FORMERR;
Pos_p = *Pos_pp;
Name_p = Name;
while ('\0' != *Name_p) {
/* Co... | false | true | false | false | false | 1 |
CallStackDoDestroy(Tcl_Interp *interp, XOTclObject *obj) {
Tcl_Command oid;
PRINTOBJ("CallStackDoDestroy", obj);
oid = obj->id;
obj->id = NULL;
if (obj->teardown && oid) {
Tcl_DeleteCommandFromToken(interp, oid);
}
} | false | false | false | false | false | 0 |
ks8851_net_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
{
struct ks8851_net *ks = netdev_priv(dev);
if (!netif_running(dev))
return -EINVAL;
return generic_mii_ioctl(&ks->mii, if_mii(req), cmd, NULL);
} | false | false | false | false | false | 0 |
GetIfStatus(int sk,char *vifdev,char *vaddress,char *vnetmask,char *vbroadcast)
{ struct sockaddr_in *sin;
struct sockaddr_in netmask;
int insane = false;
struct hostent *hp;
struct in_addr inaddr;
Verbose("Checking interface status...\n");
if ((hp = gethostbyname(VSYSNAME.nodename)) == NULL)
{
CfLog... | false | false | false | false | false | 0 |
ajRandomSeed(void)
{
ajint ix;
ajint iy;
ajint iz;
ajint i;
double x = 0.0;
ajint seed;
#ifndef WIN32
struct timeval tv;
#endif
AjPStr timestr = NULL;
/*
* seed should be set to an integer between 0 and 9999 inclusive; a value
* of 0 will initialise the generato... | false | false | false | false | false | 0 |
bert_regex_optname(unsigned int mask)
{
unsigned int opt_mask;
unsigned int i = 0;
while ((opt_mask = bert_regex_options[i].mask))
{
if (mask == opt_mask)
{
return bert_regex_options[i].name;
}
++i;
}
return NULL;
} | false | false | false | false | false | 0 |
iproute_add(int ifindex, in_addr_t src, in_addr_t dst, in_addr_t gw, int proto)
{
struct ipaddr_req {
struct nlmsghdr n;
struct rtmsg i;
char buf[4096];
} req;
if (!rth)
open_rth();
if (!rth)
return -1;
memset(&req, 0, sizeof(req) - 4096);
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
req... | true | true | false | false | false | 1 |
_loglv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)),
struct dm_report_field *field,
const void *data, void *private __attribute__((unused)))
{
const struct logical_volume *lv = (const struct logical_volume *) data;
const char *name;
if ((name = lv_mirror_log_dup(mem, lv))... | false | false | false | false | false | 0 |
eeepc_hotk_thaw(struct device *device)
{
struct eeepc_laptop *eeepc = dev_get_drvdata(device);
if (eeepc->wlan_rfkill) {
int wlan;
/*
* Work around bios bug - acpi _PTS turns off the wireless led
* during suspend. Normally it restores it on resume, but
* we should kick it ourselves in case hibernation... | false | false | false | false | false | 0 |
fillIntegerMatrixFromFile(const char* filename, int* matrix, int dimension)
{
FILE* file = fopen(filename, "r");
if(file == NULL)
{
fprintf(stderr, "can't open file\n");
return -1;
}
int rowIndex;
int cellIndex;
for(rowIndex = 0; rowIndex < dimension; rowIndex++)
{
for(cellIndex = 0; cellIndex < dimensi... | false | false | false | false | true | 1 |
add_password( char* user, FILE* f )
{
char pass[100];
char* pw;
char* cpw;
char salt[3];
if ( ! isatty( fileno( stdin ) ) )
{
char * ret= fgets( pass, sizeof(pass), stdin );
if ( pass[strlen(pass) - 1] == '\n' )
pass[strlen(pass) - 1] = '\0';
pw = pass;
}
else
{
pw = strd( (char... | true | true | false | false | true | 1 |
vars_in_attributes(Attribute attrs)
{
Plist vars = NULL;
Attribute a;
for (a = attrs; a; a = a->next) {
if (inheritable(a)) {
vars = set_of_vars(a->u.t, vars);
}
}
return vars;
} | false | false | false | false | false | 0 |
mmap_string_ref(MMAPString * string)
{
chash * ht;
int r;
chashdatum key;
chashdatum data;
pthread_mutex_lock(&mmapstring_lock);
if (mmapstring_hashtable == NULL) {
mmapstring_hashtable_init();
}
ht = mmapstring_hashtable;
if (ht == NULL) {
pthread_mutex_unlock(&mmapstring_lock);
ret... | false | false | false | false | false | 0 |
ajSeqrefFmtAuthorsEmbl(const AjPSeqRef ref, AjPStr* Pdest)
{
ajStrAssignClear(Pdest);
if(!ref->Authors)
return ajFalse;
ajStrAssignS(Pdest, ref->Authors);
return ajTrue;
} | false | false | false | false | false | 0 |
itemAccessorBody( CfgEntry *e, const CfgConfig &cfg )
{
QString result;
QTextStream out(&result, QIODevice::WriteOnly);
out << "return " << itemPath(e, cfg);
if (!e->param().isEmpty()) out << "[i]";
out << ";" << endl;
return result;
} | false | false | false | false | false | 0 |
_g_file_get_file_size (GFile *file)
{
goffset size = 0;
GFileInfo *info;
GError *error = NULL;
if (file == NULL)
return 0;
info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_SIZE, 0, NULL, &error);
if (info != NULL) {
size = g_file_info_get_size (info);
g_object_unref (info);
}
else {
g_w... | false | false | false | false | false | 0 |
ipc_init_ids(struct ipc_ids *ids)
{
ids->in_use = 0;
ids->seq = 0;
ids->next_id = -1;
init_rwsem(&ids->rwsem);
idr_init(&ids->ipcs_idr);
} | false | false | false | false | false | 0 |
parseBrackets( int *pos, const QMap<QString, QString> &dict ) const
{
if( testChar( pos ) != CTBracketOpen )
return QString();
( *pos )++;
// Check if next char is %
if( testChar( pos ) != CTToken )
return QLatin1String( "[" );
int retPos = *pos;
( *pos )++;
// Parse tok... | false | false | false | false | false | 0 |
set_showval (session *sess, const struct prefs *var, char *tbuf)
{
size_t len;
size_t dots;
size_t j;
len = strlen (var->name);
memcpy (tbuf, var->name, len);
dots = 29 - len;
if (dots < 0)
{
dots = 0;
}
tbuf[len++] = '\003';
tbuf[len++] = '2';
for (j = 0; j < dots; j++)
{
tbuf[j + len] = '.';
}
... | false | true | false | false | false | 1 |
is_virtual_bank(char *path)
{
char *p;
if ((p = strrchr(path, '.')) == NULL)
return FALSE;
if (strcmp(p + 1, "bnk") == 0)
return TRUE;
return FALSE;
} | false | false | false | false | false | 0 |
rebuild_consensi(ED4_base *start_species, ED4_update_flag update_flag) {
int i;
ED4_base *temp_parent;
ED4_multi_species_manager *multi_species_manager = NULL;
ED4_group_manager *first_group_manager = NULL;
temp_parent = start_species;
switch (... | false | false | false | false | false | 0 |
intersect(const Ray& r) const
{
float t0, t1;
float min = -INF;
float max = INF;
t0 = (bb[r.negPos[0]].x - r.pos.x) * r.dirInv.x;
t1 = (bb[r.negPos[1]].x - r.pos.x) * r.dirInv.x;
if (t0 > min) min = t0;
if (t1 < max) max = t1;
if (min > max) return false;
t0 = (bb[r.negPos[2]].y - r.pos.y) * r.dirInv.y;
t1... | false | false | false | false | false | 0 |
gth_script_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GthScript *self;
self = GTH_SCRIPT (object);
switch (property_id) {
case PROP_ID:
g_free (self->priv->id);
self->priv->id = g_value_dup_string (value);
... | false | false | false | false | false | 0 |
FindXDiscontinuity(OGRCoordinateTransformation* poCT,
double dfX1, double dfX2, double dfY,
double& dfMinX, double& dfMinY, double& dfMaxX, double& dfMaxY,
int nRecLevel = 0)
{
double dfXMid = (dfX1 + dfX2) / 2;
double... | false | false | false | false | false | 0 |
operator=(const GAParameterList& list){
if(&list == this) return *this;
unsigned int i;
for(i=0; i<n; i++)
delete p[i];
delete [] p;
N = list.N;
n = list.n;
cur = list.cur;
p = new GAParameter * [N];
for(i=0; i<n; i++)
p[i] = new GAParameter(*(list.p[i]));
return *this;
} | false | false | false | false | false | 0 |
luaK_goiffalse (FuncState *fs, expdesc *e) {
int pc; /* pc of last jump */
luaK_dischargevars(fs, e);
switch (e->k) {
case VNIL: case VFALSE: {
pc = NO_JUMP; /* always false; do nothing */
break;
}
case VJMP: {
pc = e->u.s.info;
break;
}
case VTRUE: {
if (!hasju... | false | false | false | false | false | 0 |
visitIndirectBrInst(IndirectBrInst &I) {
visitMemoryReference(I, I.getAddress(), AliasAnalysis::UnknownSize, 0, 0,
MemRef::Branchee);
Assert1(I.getNumDestinations() != 0,
"Undefined behavior: indirectbr with no destinations", &I);
} | false | false | false | false | false | 0 |
lwidth() const
{
unsigned sum = 0;
for (NetAssign_*cur = lval_ ; cur ; cur = cur->more)
sum += cur->lwidth();
return sum;
} | false | false | false | false | false | 0 |
data(const FXchar* data,FXint len){
if (elem==Elem_LastFM_Error) {
message.assign(data,len);
}
else if (elem==Elem_LastFM_Session_Key) {
key.assign(data,len);
}
else if (elem==Elem_LastFM_Token) {
token.assign(data,len);
}
} | false | false | false | false | false | 0 |
build_user(const char *mac, struct phone_profile *profile)
{
struct user *user;
if (!(user = ao2_alloc(sizeof(*user), user_destructor))) {
profile = unref_profile(profile);
return NULL;
}
if (ast_string_field_init(user, 32)) {
profile = unref_profile(profile);
user = unref_user(user);
return NULL;
}
... | false | false | false | false | false | 0 |
atp_remove_mnemonic (const gchar* label)
{
const char *src;
char *dst;
char *without;
without = g_new (char, strlen(label) + 1);
dst = without;
for (src = label; *src != '\0'; ++src)
{
if (*src == '_')
{
/* Remove single underscore */
++src;
}
*dst++ = *src;
}
*dst = *src;
return without;
} | false | false | false | false | false | 0 |
sci_release_port(struct uart_port *port)
{
struct sci_port *sport = to_sci_port(port);
if (port->flags & UPF_IOREMAP) {
iounmap(port->membase);
port->membase = NULL;
}
release_mem_region(port->mapbase, sport->reg_size);
} | false | false | false | false | false | 0 |
cuddAddRoundOffRecur(
DdManager * dd,
DdNode * f,
double trunc)
{
DdNode *res, *fv, *fvn, *T, *E;
double n;
DD_CTFP1 cacheOp;
statLine(dd);
if (cuddIsConstant(f)) {
n = ceil(cuddV(f)*trunc)/trunc;
res = cuddUniqueConst(dd,n);
return(res);
}
cacheOp = (DD_CTFP1) Cudd_addRoundOff;
... | false | false | false | false | false | 0 |
AddressBook_MenuInit( void )
{
int i;
memset(&s_addressbook_menu, 0, sizeof(s_addressbook_menu));
s_addressbook_menu.x = viddef.width / 2 - 142;
s_addressbook_menu.y = viddef.height / 2 - 58;
s_addressbook_menu.nitems = 0;
for ( i = 0; i < MAX_LOCAL_SERVERS; i++ )
{
cvar_t *adr;
char buffer[20];
Com_sp... | false | false | false | false | false | 0 |
crmf_create_poposignkey_algid(PLArenaPool *poolp,
SECKEYPublicKey *inPubKey)
{
SECAlgorithmID *algID;
SECOidTag tag;
SECStatus rv;
void *mark;
mark = PORT_ArenaMark(poolp);
algID = PORT_ArenaZNew(poolp, SECAlgorithmID);
if (algID == NULL) {
goto ... | false | false | false | false | false | 0 |
mock_no_mechanisms_C_UnwrapKey (CK_SESSION_HANDLE session,
CK_MECHANISM_PTR mechanism,
CK_OBJECT_HANDLE unwrapping_key,
CK_BYTE_PTR wrapped_key,
CK_ULONG wrapped_key_len,
... | false | false | false | false | false | 0 |
write_viminfo_varlist(fp)
FILE *fp;
{
hashitem_T *hi;
dictitem_T *this_var;
int todo;
char *s;
char_u *p;
char_u *tofree;
char_u numbuf[NUMBUFLEN];
if (find_viminfo_parameter('!') == NULL)
return;
fputs(_("\n# global variables:\n"), fp);
todo = (int)globvarht.ht_used;... | false | false | false | false | false | 0 |
EmitMatcherTable(const Matcher *TheMatcher,
const CodeGenDAGPatterns &CGP,
raw_ostream &O) {
formatted_raw_ostream OS(O);
OS << "// The main instruction selector code.\n";
OS << "SDNode *SelectCode(SDNode *N) {\n";
MatcherTableEmitter MatcherEmitter(CGP)... | false | false | false | false | false | 0 |
create_component (ECalBackendContacts *cbc,
const gchar *uid,
EContactDate *cdate,
const gchar *summary)
{
ECalComponent *cal_comp;
ECalComponentText comp_summary;
icalcomponent *ical_comp;
icalproperty *prop;
struct icaltime... | false | false | false | false | false | 0 |
getProperties(gem::Properties&props) {
if(!m_handle)return;
unicap_status_t status=0;
std::vector<std::string> keys=props.keys();
bool getwidth=false, getheight=false;
int i=0;
for(i=0; i<keys.size(); i++) {
std::string key=keys[i];
unicap_property_t prop;
strncpy(prop.identifier, key.c_str(),... | false | false | false | false | false | 0 |
_check_jet_alg_good_for_median() const{
const JetDefinition * jet_def = &_jet_def;
// if no explicit jet def has been provided, fall back on the
// cluster sequence
if (_jet_def.jet_algorithm() == undefined_jet_algorithm){
const ClusterSequence * cs = dynamic_cast<ClusterSequenceStructure*>(_csi())->valida... | false | false | false | false | false | 0 |
collectExtraInfo(QWidget * parent, const QString & family, const QString & prop, const QString & value, bool swappingEnabled, QString & returnProp, QString & returnValue, QWidget * & returnWidget, bool & hide)
{
bool result = MysteryPart::collectExtraInfo(parent, family, prop, value, swappingEnabled, returnProp, retur... | false | false | false | false | false | 0 |
us_reactor_handler_tcp_client_init( us_reactor_handler_t *self_,
us_allocator_t *allocator,
int fd,
void *extra,
int queue_buf_size,
... | false | false | false | false | false | 0 |
remove_history (which)
int which;
{
HIST_ENTRY *return_value;
if (which >= history_length || !history_length)
return_value = (HIST_ENTRY *)NULL;
else
{
register int i;
return_value = the_history[which];
for (i = which; i < history_length; i++)
the_history[i] = the_history[i + 1];... | false | false | false | false | false | 0 |
qr_content_extract (dict_t *xdata)
{
data_t *data = NULL;
void *content = NULL;
data = dict_get (xdata, GF_CONTENT_KEY);
if (!data)
return NULL;
content = GF_CALLOC (1, data->len, gf_qr_mt_content_t);
if (!content)
return NULL;
memcpy (content, data->data, data->len);
return content;
} | false | false | false | false | false | 0 |
fh_cache_lru(void)
{
unsigned int best = UINT_MAX;
int best_idx = 0;
int i;
/* if cache is not full, we simply hand out the next slot */
if (fh_cache_max < CACHE_ENTRIES - 1)
return fh_cache_max++;
for (i = 0; i < CACHE_ENTRIES; i++) {
if (i == fh_last_entry)
continue;
if (fh_cache[i].... | false | false | false | false | false | 0 |
array_insert(void *base, size_t elt_size, unsigned nr_elts,
unsigned index, void *elt)
__dm_written_to_disk(elt)
{
if (index < nr_elts)
memmove(base + (elt_size * (index + 1)),
base + (elt_size * index),
(nr_elts - index) * elt_size);
memcpy_disk(base + (elt_size * index), elt, elt_size);
} | false | false | false | false | false | 0 |
handle_else(include_ctx_t *ctx, ap_filter_t *f,
apr_bucket_brigade *bb)
{
request_rec *r = f->r;
if (ctx->argc) {
ap_log_rerror(APLOG_MARK,
(!(ctx->if_nesting_level)) ? APLOG_ERR : APLOG_WARNING,
0, r, APLOGNO(01360)
... | false | false | false | false | false | 0 |
slapd_qsort(baggage_carrier *bc,IDList *list, sort_spec *s)
{
ID *lo, *hi; /* ends of sub-array currently sorting */
ID *mid; /* points to middle of subarray */
ID *loguy, *higuy; /* traveling pointers for partition step */
NIDS size; /* size of the sub-... | false | false | false | false | false | 0 |
giraffe_fov_clear(GiFieldOfView* self)
{
if (self != NULL) {
if (self->cubes.errors != NULL) {
cx_slist_destroy(self->cubes.errors,
(cx_free_func)giraffe_cube_delete);
self->cubes.errors = NULL;
}
if (self->cubes.spectra != NULL) {
... | false | false | false | false | false | 0 |
e_widget_ilist_nth_data_get(Evas_Object *obj, int n)
{
E_Widget_Data *wd;
E_Widget_Callback *wcb;
wd = e_widget_data_get(obj);
if (!wd) return NULL;
wcb = eina_list_nth(wd->callbacks, n);
if (!wcb)
return NULL;
else
return wcb->data;
} | false | false | false | false | false | 0 |
pop_commands(std::vector<CdlInterpreterCommandEntry>* original_commands)
{
CYG_REPORT_FUNCNAME("CdlInterpreter::pop_commands");
CYG_REPORT_FUNCARG2XV(this, &original_commands);
CYG_PRECONDITION_THISC();
CYG_PRECONDITION(0 != current_commands, "no pop without a previous push please");
std::vector<Cd... | false | false | false | false | false | 0 |
bxt_get_cd(struct mmc_host *mmc)
{
int gpio_cd = mmc_gpio_get_cd(mmc);
struct sdhci_host *host = mmc_priv(mmc);
unsigned long flags;
int ret = 0;
if (!gpio_cd)
return 0;
pm_runtime_get_sync(mmc->parent);
spin_lock_irqsave(&host->lock, flags);
if (host->flags & SDHCI_DEVICE_DEAD)
goto out;
ret = !!(sdh... | false | false | false | false | false | 0 |
Draw(const R3DrawFlags draw_flags) const
{
// Draw all triangles
for (int i = 0; i < triangles.NEntries(); i++)
triangles.Kth(i)->Draw(draw_flags);
} | false | false | false | false | false | 0 |
regcache_write(struct regmap *map,
unsigned int reg, unsigned int value)
{
if (map->cache_type == REGCACHE_NONE)
return 0;
BUG_ON(!map->cache_ops);
if (!regmap_volatile(map, reg))
return map->cache_ops->write(map, reg, value);
return 0;
} | false | false | false | false | false | 0 |
AcpiExStoreBufferToBuffer (
ACPI_OPERAND_OBJECT *SourceDesc,
ACPI_OPERAND_OBJECT *TargetDesc)
{
UINT32 Length;
UINT8 *Buffer;
ACPI_FUNCTION_TRACE_PTR (ExStoreBufferToBuffer, SourceDesc);
/* If Source and Target are the same, just return */
if (... | false | false | false | false | false | 0 |
DescribeOneFlag(const CommandLineFlagInfo& flag) {
string main_part;
SStringPrintf(&main_part, " -%s (%s)",
flag.name.c_str(),
flag.description.c_str());
const char* c_string = main_part.c_str();
int chars_left = static_cast<int>(main_part.length());
string final_string = ""... | false | false | false | false | false | 0 |
nextSuperBasic()
{
if (firstFree_ >= 0) {
int returnValue = firstFree_;
int iColumn = firstFree_ + 1;
for (; iColumn < numberRows_ + numberColumns_; iColumn++) {
if (getStatus(iColumn) == isFree)
if (fabs(dj_[iColumn]) > 1.0e2 * dualTolerance_)
... | false | false | false | false | false | 0 |
gt_pch_nx_vec_condition_va_gc_ (void *x_p)
{
vec<condition,va_gc> * const x = (vec<condition,va_gc> *)x_p;
if (gt_pch_note_object (x, x, gt_pch_p_20vec_condition_va_gc_))
{
gt_pch_nx (x);
}
} | false | false | false | false | false | 0 |
sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
{
struct sdhci_host *host;
int present;
unsigned long flags;
host = mmc_priv(mmc);
sdhci_runtime_pm_get(host);
/* Firstly check card presence */
present = mmc->ops->get_cd(mmc);
spin_lock_irqsave(&host->lock, flags);
WARN_ON(host->mrq != NULL);
... | false | false | false | false | false | 0 |
too_big( int limit, int *list, int num)
{
int i, member_exceeds_limit = FALSE;
for (i=0; i<num; i++)
if (list[i] > limit) {
member_exceeds_limit = TRUE;
break;
}
return(member_exceeds_limit);
} | false | false | false | false | false | 0 |
sbrkout_draw_balls( struct mame_bitmap *bitmap )
{
int ball;
for (ball=2; ball>=0; ball--)
{
int code = ((sbrkout_vert_ram[ball * 2 + 1] & 0x80) >> 7);
int sx = 31 * 8 - sbrkout_horiz_ram[ball * 2];
int sy = 30 * 8 - sbrkout_vert_ram[ball * 2];
drawgfx(bitmap, Machine->gfx[1],
code, 0,
0,... | false | false | false | false | false | 0 |
stringmap_subtree_to_dot(struct stringmap_node *n, int is_leaf, const char *filename_out) {
FILE *f = fopen(filename_out, "w");
fputs("digraph G {\n", f);
if (is_leaf)
leaf_to_dot(n, f);
else
node_to_dot(n, f, 0);
fputs("}\n", f);
fclose(f);
} | false | false | false | false | true | 1 |
fscache_histogram_show(struct seq_file *m, void *v)
{
unsigned long index;
unsigned n[5], t;
switch ((unsigned long) v) {
case 1:
seq_puts(m, "JIFS SECS OBJ INST OP RUNS OBJ RUNS RETRV DLY RETRIEVLS\n");
return 0;
case 2:
seq_puts(m, "===== ===== ========= ========= ========= ========= =========\n");
... | false | false | false | false | false | 0 |
test_extension_get_settings (PeasEngine *engine,
PeasPluginInfo *info)
{
PeasExtension *extension;
IntrospectionBase *base;
GSettings *settings;
g_assert (peas_engine_load_plugin (engine, info));
extension = peas_engine_create_extension (engine, info,
... | false | false | false | false | false | 0 |
e_table_search_search (ETableSearch *e_table_search,
gchar *string,
ETableSearchFlags flags)
{
gboolean ret_val;
g_return_val_if_fail (E_IS_TABLE_SEARCH (e_table_search), FALSE);
g_signal_emit (
e_table_search,
e_table_search_signals[SEARCH_SEARCH], 0,
string, fla... | false | false | false | false | false | 0 |
tsearch_readline_begin(tsearch_readline_state *stp,
const char *filename)
{
if ((stp->fp = AllocateFile(filename, "r")) == NULL)
return false;
stp->filename = filename;
stp->lineno = 0;
stp->curline = NULL;
/* Setup error traceback support for ereport() */
stp->cb.callback = tsearch_readline_callback;
... | false | false | false | false | false | 0 |
lowerSymbolOperandDarwin(const MachineOperand &MO,
MCSymbol *Sym) const {
// FIXME: We would like an efficient form for this, so we don't have to do a
// lot of extra uniquing.
MCSymbolRefExpr::VariantKind RefKind = MCSymbolRefExpr::VK_None;
if ((MO.getTarg... | false | false | false | false | false | 0 |
abortPageRecv()
{
if (useV34) return; // nothing to do in V.34
char c = CAN; // anything other than DC1/DC3
putModem(&c, 1, 1);
} | false | false | false | false | false | 0 |
get_named_param (const char *s, MODEL *pmod,
int *bnum)
{
if (NONLIST_MODEL(pmod->ci) && pmod->params != NULL) {
char test[VNAMELEN];
int i;
*test = '\0';
strncat(test, s, VNAMELEN - 1);
tailstrip(test);
for (i=0; i<pmod->nparams; i++) {
if (!strcmp(test, pmod->params[i])) {
*bnum = i;
retu... | false | false | false | false | false | 0 |
meta_frame_layout_copy (const MetaFrameLayout *src)
{
MetaFrameLayout *layout;
layout = g_new0 (MetaFrameLayout, 1);
*layout = *src;
layout->refcount = 1;
return layout;
} | false | false | false | false | false | 0 |
wacom_i2c_irq(int irq, void *dev_id)
{
struct wacom_i2c *wac_i2c = dev_id;
struct input_dev *input = wac_i2c->input;
u8 *data = wac_i2c->data;
unsigned int x, y, pressure;
unsigned char tsw, f1, f2, ers;
int error;
error = i2c_master_recv(wac_i2c->client,
wac_i2c->data, sizeof(wac_i2c->data));
if (error < ... | false | false | false | false | false | 0 |
convert_athrow(struct parse_context *ctx)
{
struct stack *mimic_stack = ctx->bb->mimic_stack;
struct expression *exception_ref;
struct expression *nullcheck;
struct statement *stmt;
stmt = alloc_statement(STMT_ATHROW);
if (!stmt)
return warn("out of memory"), -ENOMEM;
exception_ref = stack_pop(mimic_stack);
... | false | false | false | false | false | 0 |
strscan_initialize(int argc, VALUE *argv, VALUE self)
{
struct strscanner *p;
VALUE str, need_dup;
Data_Get_Struct(self, struct strscanner, p);
rb_scan_args(argc, argv, "11", &str, &need_dup);
StringValue(str);
p->str = str;
return self;
} | false | false | false | false | false | 0 |
obj_migdata_set_dest_digest(TSS_HMIGDATA hMigData, UINT32 digestSize, BYTE *digest)
{
struct tsp_object *obj;
struct tr_migdata_obj *migdata;
TSS_RESULT result = TSS_SUCCESS;
if ((obj = obj_list_get_obj(&migdata_list, hMigData)) == NULL)
return TSPERR(TSS_E_INVALID_HANDLE);
migdata = (struct tr_migdata_obj *)o... | false | false | false | false | false | 0 |
addTreeView(const core::rect<s32>& rectangle,
IGUIElement* parent, s32 id,
bool drawBackground,
bool scrollBarVertical, bool scrollBarHorizontal)
{
IGUITreeView* b = new CGUITreeView(this, parent ? parent : this, id, rectangle,
true, drawBackground, scrollBarVertical, scrollBarHorizontal);
... | false | false | false | false | false | 0 |
make_call_declarator (cp_declarator *target,
tree parms,
cp_cv_quals cv_qualifiers,
cp_virt_specifiers virt_specifiers,
tree exception_specification,
tree late_return_type)
{
cp_declarator *declarator;
declarator = make_declarator (cdk_function);
declarator->declarator = t... | false | false | false | false | false | 0 |
bus_connection_owner_new (BusConnection *connection,
guint32 flags)
{
BusConnectionOwner *owner = NULL;
g_assert (BUS_IS_CONNECTION (connection));
owner = g_slice_new (BusConnectionOwner);
if (owner != NULL) {
owner->conn = g_object_ref (connection);
bu... | false | false | false | false | false | 0 |
clutter_actor_grab_key_focus (ClutterActor *self)
{
ClutterActor *stage;
g_return_if_fail (CLUTTER_IS_ACTOR (self));
stage = _clutter_actor_get_stage_internal (self);
if (stage != NULL)
clutter_stage_set_key_focus (CLUTTER_STAGE (stage), self);
} | 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.