[apparmor] [patch 04/18] parser: remove unneeded goto target in build_mnt_opts() [resend]

Christian Boltz apparmor at cboltz.de
Thu Jan 16 23:32:12 UTC 2014


Hello,

Am Donnerstag, 16. Januar 2014 schrieb Steve Beattie:
> 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 at 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;
>  }

Looks like one of the rare cases where I add
    Acked-by: Christian Boltz <apparmor at cboltz.de>
to a C patch ;-)


Regards,

Christian Boltz
-- 
My Trash Can is also a shortcut for Amarok... I guess the Amarok team
must have had some wild thoughts about the features of their program =)
[Benjamin Bach in opensuse]




More information about the AppArmor mailing list