libsepol: Return +1 when declaration is followed by a require
A check is made in symtab_insert() for the case when an identifier had already been declared and was now being required. This meant that a declaration followed by a require was treated differently from a require followed by a declaration. Remove that check and treat both cases the same (which means returning +1). Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
This commit is contained in:
parent
b6f3e0086f
commit
8adbd615c1
1 changed files with 0 additions and 3 deletions
|
@ -1666,9 +1666,6 @@ int symtab_insert(policydb_t * pol, uint32_t sym,
|
||||||
}
|
}
|
||||||
} else if (scope_datum->scope == SCOPE_REQ && scope == SCOPE_DECL) {
|
} else if (scope_datum->scope == SCOPE_REQ && scope == SCOPE_DECL) {
|
||||||
scope_datum->scope = SCOPE_DECL;
|
scope_datum->scope = SCOPE_DECL;
|
||||||
} else if (scope_datum->scope != scope) {
|
|
||||||
/* This only happens in DECL then REQUIRE case, which is handled by caller */
|
|
||||||
return -2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* search through the pre-existing list to avoid adding duplicates */
|
/* search through the pre-existing list to avoid adding duplicates */
|
||||||
|
|
Loading…
Reference in a new issue