[quagga-dev 8846] Re: [PATCH 6/9] vty: fix warnings
equinox at diac24.net
Wed Sep 14 15:21:07 BST 2011
On Tue, Sep 13, 2011 at 05:45:32PM +0400, Denis Ovsienko wrote:
> 31.08.2011, 19:31, "David Lamparter" <equinox at diac24.net>:
> > From: Stephen Hemminger <shemminger at vyatta.com>
> > Gcc now warns if function that takes printf style formatting is
> > passed a non-constant string. This avoid issues when a format character
> > is entered in some command.
> My GCCs produce no warnings for lib/command.c, is this the right patch for the problem?
I primarily merged it to my tree because
+ message = argv_concat(argv, argc, 1);
+ zlog(NULL, level, "%s", message ? message : "");
is easier to read than
- zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : ""));
It's not like we pay money per byte or something...
The commit message is a bit misleading though, the behaviour of
the code doesn't change with regards to format characters in input.
Maybe the patch was different originally and it was altered in some
More information about the Quagga-dev