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, 17 Jul 2016 00:27:37 +0900
From:	Masahiro Yamada <yamada.masahiro@...ionext.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	"Yann E. MORIN" <yann.morin.1998@...e.fr>,
	"Luis R. Rodriguez" <mcgrof@...nel.org>,
	Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org, Michal Marek <mmarek@...e.com>
Subject: Re: [patch] kconfig: Add some missing curly braces

2016-07-14 7:34 GMT+09:00 Dan Carpenter <dan.carpenter@...cle.com>:
> There are missing curly braces here so we print some stuff to stderr
> which we hadn't intended.
>
> Fixes: 1c199f2878f6 ('kbuild: document recursive dependency limitation / resolution')
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
> diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
> index 2432298..ff0feab 100644
> --- a/scripts/kconfig/symbol.c
> +++ b/scripts/kconfig/symbol.c
> @@ -1127,11 +1127,12 @@ static void sym_check_print_recursive(struct symbol *last_sym)
>                                         break;
>                         }
>                 }
> -               if (stack->sym == last_sym)
> +               if (stack->sym == last_sym) {
>                         fprintf(stderr, "%s:%d:error: recursive dependency detected!\n",
>                                 prop->file->name, prop->lineno);
>                         fprintf(stderr, "For a resolution refer to Documentation/kbuild/kconfig-language.txt\n");
>                         fprintf(stderr, "subsection \"Kconfig recursive dependency limitations\"\n");
> +               }
>                 if (stack->expr) {
>                         fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n",
>                                 prop->file->name, prop->lineno,



Good catch!


BTW, another solution is to concatenate three messages into one.

if (stack->sym == last_sym)
         fprintf(stderr,
                 "%s:%d:error: recursive dependency detected!\n"
                 "For a resolution refer to
Documentation/kbuild/kconfig-language.txt\n"
                 "subsection \"Kconfig recursive dependency limitations\"\n",
                 prop->file->name, prop->lineno);


Personally, I prefer this.
It may be a matter of taste, though.

-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ