[collectd] [PATCH 2/2] Add missing return statements, unify pthread_exit usage.

Sebastian Harl sh at tokkee.org
Tue Sep 4 10:12:50 CEST 2012


Hi,

On Tue, Sep 04, 2012 at 09:51:05AM +0200, Benjamin Jacobs wrote:
> On Tue, 4 Sep 2012 09:25:21 +0200 Sebastian Harl <sh at tokkee.org> wrote:
> > On Sun, Sep 02, 2012 at 11:54:35PM +0200, Benjamin Jacobs wrote:
> > > -	pthread_exit (NULL);
> > > -	return NULL;
> > > +	pthread_exit ((void *) 0);
> > > +	return ((void *) 0);
> > 
> > What's the motivation for doing that (in a couple of places)?

> It is to have the same pattern in every plugin. Though I confess it is
> just a matter of taste (supposely NULL always = 0, right ?).

Right.

> Fell free
> to remove those parts, but please keep the added returns wheter it is
> ((void*)0) or NULL. Because it fixes for me the compilation on AIX
> with gcc 4.7.1. If you want, I can send you a patch with only the
> addition of returns.

Yes, thanks for that! Afair, other systems' compilers (e.g. on Solaris)
will complain about that as well.

Another patch won't be necessary.

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120904/a7bb514c/attachment.pgp>


More information about the collectd mailing list