*/
void avc_dump_av(struct audit_buffer *ab, u16 tclass, u32 av)
{
- char **common_pts = 0;
+ char **common_pts = NULL;
u32 common_base = 0;
int i, i2, perm;
}
} else {
/* apply to one node */
- node = avc_search_node(ssid, tsid, tclass, 0);
+ node = avc_search_node(ssid, tsid, tclass, NULL);
if (node) {
avc_update_node(event,node,perms);
}
u32 perms, u32 seqno)
{
return avc_control(AVC_CALLBACK_GRANT,
- ssid, tsid, tclass, perms, seqno, 0);
+ ssid, tsid, tclass, perms, seqno, NULL);
}
/**
u32 perms, u32 seqno)
{
return avc_control(AVC_CALLBACK_REVOKE,
- ssid, tsid, tclass, perms, seqno, 0);
+ ssid, tsid, tclass, perms, seqno, NULL);
}
/**
avc_node_freelist = tmp;
avc_cache.active_nodes--;
}
- avc_cache.slots[i] = 0;
+ avc_cache.slots[i] = NULL;
}
avc_cache.lru_hint = 0;
for (c = avc_callbacks; c; c = c->next) {
if (c->events & AVC_CALLBACK_RESET) {
rc = c->callback(AVC_CALLBACK_RESET,
- 0, 0, 0, 0, 0);
+ 0, 0, 0, 0, NULL);
if (rc)
goto out;
}
{
if (enable)
return avc_control(AVC_CALLBACK_AUDITALLOW_ENABLE,
- ssid, tsid, tclass, perms, seqno, 0);
+ ssid, tsid, tclass, perms, seqno, NULL);
else
return avc_control(AVC_CALLBACK_AUDITALLOW_DISABLE,
- ssid, tsid, tclass, perms, seqno, 0);
+ ssid, tsid, tclass, perms, seqno, NULL);
}
/**
{
if (enable)
return avc_control(AVC_CALLBACK_AUDITDENY_ENABLE,
- ssid, tsid, tclass, perms, seqno, 0);
+ ssid, tsid, tclass, perms, seqno, NULL);
else
return avc_control(AVC_CALLBACK_AUDITDENY_DISABLE,
- ssid, tsid, tclass, perms, seqno, 0);
+ ssid, tsid, tclass, perms, seqno, NULL);
}
/**
ae->used = 1;
} else {
avc_cache_stats_incr(AVC_ENTRY_DISCARDS);
- ae = 0;
+ ae = NULL;
}
}
int cond_read_bool(struct policydb *p, struct hashtab *h, void *fp)
{
- char *key = 0;
+ char *key = NULL;
struct cond_bool_datum *booldatum;
__u32 *buf, len;
return 0;
err:
- cond_destroy_bool(key, booldatum, 0);
+ cond_destroy_bool(key, booldatum, NULL);
return -1;
}
n1 = e1->node;
n2 = e2->node;
- prev = 0;
+ prev = NULL;
while (n1 || n2) {
new = kmalloc(sizeof(*new), GFP_ATOMIC);
if (!new) {
n2 = n2->next;
}
- new->next = 0;
+ new->next = NULL;
if (prev)
prev->next = new;
else
ebitmap_init(dst);
n = src->node;
- prev = 0;
+ prev = NULL;
while (n) {
new = kmalloc(sizeof(*new), GFP_ATOMIC);
if (!new) {
memset(new, 0, sizeof(*new));
new->startbit = n->startbit;
new->map = n->map;
- new->next = 0;
+ new->next = NULL;
if (prev)
prev->next = new;
else
{
struct ebitmap_node *n, *prev, *new;
- prev = 0;
+ prev = NULL;
n = e->node;
while (n && n->startbit <= bit) {
if ((n->startbit + MAPSIZE) > bit) {
}
e->highbit = 0;
- e->node = 0;
+ e->node = NULL;
return;
}
int sens_read(struct policydb *p, struct hashtab *h, void *fp)
{
- char *key = 0;
+ char *key = NULL;
struct level_datum *levdatum;
int rc;
u32 *buf, len;
int cat_read(struct policydb *p, struct hashtab *h, void *fp)
{
- char *key = 0;
+ char *key = NULL;
struct cat_datum *catdatum;
int rc;
u32 *buf, len;
*/
int roles_init(struct policydb *p)
{
- char *key = 0;
+ char *key = NULL;
int rc;
struct role_datum *role;
kfree(key);
comdatum = datum;
- hashtab_map(comdatum->permissions.table, perm_destroy, 0);
+ hashtab_map(comdatum->permissions.table, perm_destroy, NULL);
hashtab_destroy(comdatum->permissions.table);
kfree(datum);
return 0;
kfree(key);
cladatum = datum;
- hashtab_map(cladatum->permissions.table, perm_destroy, 0);
+ hashtab_map(cladatum->permissions.table, perm_destroy, NULL);
hashtab_destroy(cladatum->permissions.table);
constraint = cladatum->constraints;
while (constraint) {
int i;
for (i = 0; i < SYM_NUM; i++) {
- hashtab_map(p->symtab[i].table, destroy_f[i], 0);
+ hashtab_map(p->symtab[i].table, destroy_f[i], NULL);
hashtab_destroy(p->symtab[i].table);
}
static int perm_read(struct policydb *p, struct hashtab *h, void *fp)
{
- char *key = 0;
+ char *key = NULL;
struct perm_datum *perdatum;
int rc;
u32 *buf, len;
static int common_read(struct policydb *p, struct hashtab *h, void *fp)
{
- char *key = 0;
+ char *key = NULL;
struct common_datum *comdatum;
u32 *buf, len, nel;
int i, rc;
static int class_read(struct policydb *p, struct hashtab *h, void *fp)
{
- char *key = 0;
+ char *key = NULL;
struct class_datum *cladatum;
struct constraint_node *c, *lc;
struct constraint_expr *e, *le;
static int role_read(struct policydb *p, struct hashtab *h, void *fp)
{
- char *key = 0;
+ char *key = NULL;
struct role_datum *role;
int rc;
u32 *buf, len;
static int type_read(struct policydb *p, struct hashtab *h, void *fp)
{
- char *key = 0;
+ char *key = NULL;
struct type_datum *typdatum;
int rc;
u32 *buf, len;
static int user_read(struct policydb *p, struct hashtab *h, void *fp)
{
- char *key = 0;
+ char *key = NULL;
struct user_datum *usrdatum;
int rc;
u32 *buf, len;
u32 requested,
struct av_decision *avd)
{
- struct context *scontext = 0, *tcontext = 0;
+ struct context *scontext = NULL, *tcontext = NULL;
int rc = 0;
if (!ss_initialized) {
{
char *scontextp;
- *scontext = 0;
+ *scontext = NULL;
*scontext_len = 0;
/* Compute the size of the context. */
u32 specified,
u32 *out_sid)
{
- struct context *scontext = 0, *tcontext = 0, newcontext;
- struct role_trans *roletr = 0;
+ struct context *scontext = NULL, *tcontext = NULL, newcontext;
+ struct role_trans *roletr = NULL;
struct avtab_key avkey;
struct avtab_datum *avdatum;
struct avtab_node *node;