lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 8 Dec 2018 15:55:27 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Cc:     Sam Ravnborg <sam@...nborg.org>,
        Ulf Magnusson <ulfalizer@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/5] kconfig: remove unneeded setsym label in conf_read_simple()

On Fri, Nov 30, 2018 at 6:17 PM Masahiro Yamada
<yamada.masahiro@...ionext.com> wrote:
>
> The two 'goto setsym' statements are reachable only when sym == NULL.
>
> The code below the 'setsym:' label does nothing when sym == NULL
> since there is just one if-block guarded by 'if (sym && ...)'.
>
> Hence, 'goto setsym' can be replaced with 'continue'.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---

Series, applied to linux-kbuild/kconfig.



>  scripts/kconfig/confdata.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index 91d0a5c..1e35529 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -363,7 +363,7 @@ int conf_read_simple(const char *name, int def)
>                                 sym = sym_find(line + 2 + strlen(CONFIG_));
>                                 if (!sym) {
>                                         sym_add_change_count(1);
> -                                       goto setsym;
> +                                       continue;
>                                 }
>                         } else {
>                                 sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
> @@ -397,7 +397,7 @@ int conf_read_simple(const char *name, int def)
>                                 sym = sym_find(line + strlen(CONFIG_));
>                                 if (!sym) {
>                                         sym_add_change_count(1);
> -                                       goto setsym;
> +                                       continue;
>                                 }
>                         } else {
>                                 sym = sym_lookup(line + strlen(CONFIG_), 0);
> @@ -416,7 +416,7 @@ int conf_read_simple(const char *name, int def)
>
>                         continue;
>                 }
> -setsym:
> +
>                 if (sym && sym_is_choice_value(sym)) {
>                         struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
>                         switch (sym->def[def].tri) {
> --
> 2.7.4
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ