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 <st...@nxnw.org>
---
 parser/parser_regex.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Index: b/parser/parser_regex.c
===================================================================
--- a/parser/parser_regex.c
+++ b/parser/parser_regex.c
@@ -731,16 +731,13 @@ static int build_mnt_opts(std::string& b
        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)


-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to