Re: [PATCH] mount: use common libs

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

 



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
> 


--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux