From: Colin Watson <cjwatson@ubuntu.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] Introduce xasprintf
Date: Wed, 2 Sep 2009 02:54:37 +0100 [thread overview]
Message-ID: <20090902015437.GA22283@riva.ucam.org> (raw)
In-Reply-To: <20090902014939.GM13423@riva.ucam.org>
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 <cjwatson@ubuntu.com>
* 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 [cjwatson@ubuntu.com]
next prev parent reply other threads:[~2009-09-02 1:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 1:49 [PATCH] Introduce xasprintf Colin Watson
2009-09-02 1:54 ` Colin Watson [this message]
2009-09-04 16:47 ` Neal H. Walfield
2009-12-07 16:48 ` Colin Watson
2009-12-09 21:33 ` Robert Millan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090902015437.GA22283@riva.ucam.org \
--to=cjwatson@ubuntu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.