Re: Various small fixes to 4.6.2-pre1



On čtvrtek 01 listopad 2007, Oswald Buddenhagen wrote:
> On Thu, Nov 01, 2007 at 04:48:02PM +0100, Vladimir Nadvornik wrote:
> > --- mc-4.6.2-pre1/vfs/smbfs.c
> > -    result = g_strconcat (my_remote, trailing_asterik ? "/*" : "", 0);
> > +    result = g_strconcat (my_remote, trailing_asterik ? "/*" : "", (char
> > *) NULL);
>
> the use of NULL is discouraged, at least in c++. it doesn't add value
> anyway.

(char *) 0
is also OK. However the original is not OK, because gcc gives
this warning:
smbfs.c:569: warning: missing sentinel in function call

The problem is described for example here: 
http://www.linuxonly.nl/docs/sentinel/

Vladimir Nadvornik


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