This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [doc patch] coding style: 0 vs. NULL + [patch] Code cleanup: skip.c
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Matt Rice <ratmice at gmail dot com>
- Date: Tue, 11 Dec 2012 05:53:43 +0400
- Subject: Re: [doc patch] coding style: 0 vs. NULL + [patch] Code cleanup: skip.c
- References: <20121210184220.GA29321@host2.jankratochvil.net>
> But GDB (IMO fortunately) already uses everywhere properly NULL vs. 0.
[...]
> I have added a new rule for the coding style for it.
So, just to be certain, this also includes testing for NULL, right?
Code like...
first = strstr (big, small);
if (first)
... should be written instead:
if (first != NULL)
?
--
Joel