alias_apply: change return type to bool

We can use the rbapply() return value to detect failure.
This commit is contained in:
Todd C. Miller
2023-11-09 15:31:26 -07:00
parent ab49adb92d
commit a2998a6701
6 changed files with 23 additions and 21 deletions

View File

@@ -388,7 +388,7 @@ const char *alias_type_to_string(short alias_type);
struct alias *alias_get(const struct sudoers_parse_tree *parse_tree, const char *name, short type);
struct alias *alias_remove(struct sudoers_parse_tree *parse_tree, const char *name, short type);
bool alias_find_used(struct sudoers_parse_tree *parse_tree, struct rbtree *used_aliases);
void alias_apply(struct sudoers_parse_tree *parse_tree, int (*func)(struct sudoers_parse_tree *, struct alias *, void *), void *cookie);
bool alias_apply(struct sudoers_parse_tree *parse_tree, int (*func)(struct sudoers_parse_tree *, struct alias *, void *), void *cookie);
void alias_free(void *a);
void alias_put(struct alias *a);