mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 22:35:35 +00:00
parser: remove unneeded goto target in build_mnt_opts()
As noted by Seth Arnold, there's now only one failure case in the function and thus does not warrant a goto target (especially since there's no cleanup to occur). Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Christian Boltz <apparmor@cboltz.de>
This commit is contained in:
@@ -728,16 +728,13 @@ static int build_mnt_opts(std::string& buffer, struct value_list *opts)
|
||||
list_for_each(opts, ent) {
|
||||
ptype = convert_aaregex_to_pcre(ent->value, 0, buffer, &pos);
|
||||
if (ptype == ePatternInvalid)
|
||||
goto fail;
|
||||
return FALSE;
|
||||
|
||||
if (ent->next)
|
||||
buffer.append(",");
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
fail:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int process_mnt_entry(aare_ruleset_t *dfarules, struct mnt_entry *entry)
|
||||
|
Reference in New Issue
Block a user