grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Introduce xasprintf


From: Colin Watson
Subject: Re: [PATCH] Introduce xasprintf
Date: Wed, 2 Sep 2009 02:54:37 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Sep 02, 2009 at 02:49:39AM +0100, Colin Watson wrote:
> I came across the idea of an xasprintf function in Gnulib a while back.
> Using this both fixes the above class of warnings by always checking the
> return value of asprintf, and also provides an IMO more intuitive
> interface to formatting an allocated string. Do people like the
> following patch? The warnings are minor so there's no problem with this
> being post-1.97.

Sorry, I forgot to supply a ChangeLog entry for this.

2009-09-02  Colin Watson  <address@hidden>

        * configure.ac: Check for vasprintf.
        * util/misc.c (asprintf): Move allocation from here ...
        (vasprintf): ... to here.  New function.
        (xasprintf): New function.
        * include/grub/util/misc.h (vasprintf, xasprintf): Add
        prototypes.
        * util/getroot.c (grub_util_get_grub_dev): Use xasprintf.
        * util/grub-mkfont.c (write_font): Likewise.
        * util/grub-probe.c (probe): Likewise.

-- 
Colin Watson                                       address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]