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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 26 Apr 2020 02:00:20 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kconfig: do not assign a variable in the return statement

On Tue, Apr 14, 2020 at 12:35 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> I am not a big fan of doing assignment in a return statement.
> Split it into two lines.
>
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>



Applied to linux-kbuild.

> ---
>
>  scripts/kconfig/menu.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index e436ba44c9c5..a5fbd6ccc006 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -65,7 +65,8 @@ void menu_add_entry(struct symbol *sym)
>  struct menu *menu_add_menu(void)
>  {
>         last_entry_ptr = &current_entry->list;
> -       return current_menu = current_entry;
> +       current_menu = current_entry;
> +       return current_menu;
>  }
>
>  void menu_end_menu(void)
> --
> 2.25.1
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ