libsepol: skip unnecessary check in build_type_map()
I copy-pasted it from a different part of the code, which had to deal with policydb that isn't final yet. Since we only deal with the final kernel policy here, we can skip the check for the type datum being NULL. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
This commit is contained in:
parent
87be2fbbd2
commit
cc0425f349
1 changed files with 1 additions and 2 deletions
|
@ -40,8 +40,7 @@ static ebitmap_t *build_type_map(const policydb_t *p)
|
|||
return NULL;
|
||||
|
||||
for (i = 0; i < p->p_types.nprim; i++) {
|
||||
if (p->type_val_to_struct[i] &&
|
||||
p->type_val_to_struct[i]->flavor != TYPE_ATTRIB) {
|
||||
if (p->type_val_to_struct[i]->flavor != TYPE_ATTRIB) {
|
||||
if (ebitmap_cpy(&map[i], &p->type_attr_map[i]))
|
||||
goto err;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue