From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NQds9-0003HD-KX for mharc-grub-devel@gnu.org; Fri, 01 Jan 2010 04:32:41 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQds6-0003GL-2U for grub-devel@gnu.org; Fri, 01 Jan 2010 04:32:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQds0-0003Fl-2w for grub-devel@gnu.org; Fri, 01 Jan 2010 04:32:36 -0500 Received: from [199.232.76.173] (port=51358 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQdrz-0003Fi-Su for grub-devel@gnu.org; Fri, 01 Jan 2010 04:32:31 -0500 Received: from smarthost03.mail.zen.net.uk ([212.23.3.142]:34525) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NQdrz-00048z-I1 for grub-devel@gnu.org; Fri, 01 Jan 2010 04:32:31 -0500 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost03.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1NQdrv-0008E9-Uz for grub-devel@gnu.org; Fri, 01 Jan 2010 09:32:28 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1NQdrs-0004qp-00; Fri, 01 Jan 2010 09:32:25 +0000 Date: Fri, 1 Jan 2010 09:32:24 +0000 From: Colin Watson To: The development of GNU GRUB Message-ID: <20100101093222.GU5847@riva.ucam.org> References: <4B39CC24.9060607@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4B39CC24.9060607@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost03-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] switch from sprintf to asprintf and snprintf 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: Fri, 01 Jan 2010 09:32:38 -0000 On Tue, Dec 29, 2009 at 10:30:12AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > +char *EXPORT_FUNC(grub_asprintf) (const char *fmt, ...) > + __attribute__ ((format (printf, 1, 2))); It's very confusing that you've made grub_asprintf have a dramatically different interface from asprintf. Perhaps you could call this grub_xasprintf instead? (Although I notice that it doesn't die when malloc fails, but merely returns NULL.) > +char *EXPORT_FUNC(grub_avsprintf) (const char *fmt, va_list args); The conventional spelling is vasprintf, not avsprintf. -- Colin Watson [cjwatson@ubuntu.com]