From: Davidlohr Bueso <dave@gnu.org>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH] mount: use common libs
Date: Wed, 14 Sep 2011 14:06:28 -0300 [thread overview]
Message-ID: <1316019988.2605.3.camel@offbook> (raw)
In-Reply-To: <20110914144539.GA1829@nb.net.home>
On Wed, 2011-09-14 at 16:45 +0200, Karel Zak wrote:
> On Tue, Sep 13, 2011 at 12:07:35PM -0300, Davidlohr Bueso wrote:
> > --- a/mount/devname.c
> > +++ b/mount/devname.c
> > @@ -2,6 +2,7 @@
> >
> > #include "devname.h"
> > #include "sundries.h" /* for xstrdup */
> > +#include "xalloc.h"
>
> It would be better to include xalloc.h in sunders.h only.
>
> > -static void
> > -die_if_null(void *t) {
> > - if (t == NULL)
> > - die(EX_SYSERR, _("not enough memory"));
> ^^^^^^^^
> > -}
The reason I kept this silly function was because gcc complains about
freeing const char * variables, which is quite correct. What do you
think about un consitifying them and getting rid of die_if_null()?
-Davidlohr
>
> it means that you have to use:
>
> #define XALLOC_EXIT_CODE EX_SYSERR
> #include "xalloc.h"
>
> to keep it backwardly compatible.
>
> Karel
>
next prev parent reply other threads:[~2011-09-14 17:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-13 15:07 [PATCH] mount: use common libs Davidlohr Bueso
2011-09-14 14:45 ` Karel Zak
2011-09-14 17:06 ` Davidlohr Bueso [this message]
2011-09-14 18:07 ` Davidlohr Bueso
2011-09-27 10:51 ` Karel Zak
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=1316019988.2605.3.camel@offbook \
--to=dave@gnu.org \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.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.