Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NEfwH-0004kB-K4 for mharc-grub-devel@gnu.org; Sun, 29 Nov 2009 04:19:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NEfwE-0004fV-OA for grub-devel@gnu.org; Sun, 29 Nov 2009 04:19:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NEfw9-0004Xm-MD for grub-devel@gnu.org; Sun, 29 Nov 2009 04:19:25 -0500 Received: from [199.232.76.173] (port=51126 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEfw9-0004Xj-Iz for grub-devel@gnu.org; Sun, 29 Nov 2009 04:19:21 -0500 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]:39616) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NEfw9-00033c-92 for grub-devel@gnu.org; Sun, 29 Nov 2009 04:19:21 -0500 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1NEfw7-00047D-TX for grub-devel@gnu.org; Sun, 29 Nov 2009 09:19:20 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1NEfw7-0005bd-00; Sun, 29 Nov 2009 09:19:19 +0000 Date: Sun, 29 Nov 2009 09:19:19 +0000 From: Colin Watson To: The development of GNU GRUB Message-ID: <20091129091919.GY6439@riva.ucam.org> References: <4B093833.4020903@scarlet.be> <20091123144428.GA9295@thorin> <4B116A20.5030003@scarlet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B116A20.5030003@scarlet.be> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost02-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: Just a cosmetic question about grub_vprintf()? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 09:19:27 -0000 On Sat, Nov 28, 2009 at 06:21:20PM +0000, rubisher wrote: > Robert Millan wrote: >> On Sun, Nov 22, 2009 at 01:10:11PM +0000, rubisher wrote: >>> But as far as the 1st parameter of grub_vsprintf is a pointer, >>> wouldn't it be better to write: >>> --- kern/misc.c.orig 2009-11-22 13:07:22.000000000 +0000 >>> +++ kern/misc.c 2009-11-22 13:07:51.000000000 +0000 >>> @@ -160,7 +160,7 @@ >>> { >>> int ret; >>> >>> - ret = grub_vsprintf (0, fmt, args); >>> + ret = grub_vsprintf (NULL, fmt, args); >>> return ret; >>> } >> >> Yes. But we have many of those, so we don't go huntin' them. If you'd >> like to help us, a patch that does this change in bulk would be welcome. > > It will be of great pleasure for me, but I didn't foreseen so much (the > most difficult to me are 'opaque pointer') but I hoppe that such 'sparse' > would help me for the most ;<) If you do this, make sure you understand why it makes no difference in standards-compliant C. In particular, this understanding matters when functions with variable-length argument lists are concerned. (See the C FAQ for more details.) -- Colin Watson [cjwatson@ubuntu.com]