h->mask = 0;
}
-int avtab_init(struct avtab *h)
+void avtab_init(struct avtab *h)
{
kvfree(h->htable);
h->htable = NULL;
h->nel = 0;
- return 0;
}
int avtab_alloc(struct avtab *h, u32 nrules)
u32 mask; /* mask to compute hash func */
};
-int avtab_init(struct avtab *);
+void avtab_init(struct avtab *h);
int avtab_alloc(struct avtab *, u32);
struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *k);
void avtab_destroy(struct avtab *h);
evaluate_cond_node(p, &p->cond_list[i]);
}
-int cond_policydb_init(struct policydb *p)
+void cond_policydb_init(struct policydb *p)
{
- int rc;
-
p->bool_val_to_struct = NULL;
p->cond_list = NULL;
p->cond_list_len = 0;
- rc = avtab_init(&p->te_cond_avtab);
- if (rc)
- return rc;
-
- return 0;
+ avtab_init(&p->te_cond_avtab);
}
static void cond_node_destroy(struct cond_node *node)
struct cond_av_list false_list;
};
-int cond_policydb_init(struct policydb *p);
+void cond_policydb_init(struct policydb *p);
void cond_policydb_destroy(struct policydb *p);
int cond_init_bool_indexes(struct policydb *p);
*/
static int policydb_init(struct policydb *p)
{
- int rc;
-
memset(p, 0, sizeof(*p));
- rc = avtab_init(&p->te_avtab);
- if (rc)
- return rc;
-
- rc = cond_policydb_init(p);
- if (rc)
- return rc;
+ avtab_init(&p->te_avtab);
+ cond_policydb_init(p);
p->filename_trans = hashtab_create(filenametr_hash, filenametr_cmp,
(1 << 11));