This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [doc patch] coding style: 0 vs. NULL + [patch] Code cleanup: skip.c


On Tue, 11 Dec 2012 07:06:41 +0100, Jan Kratochvil wrote:
> OK         if (first)
> not great  if (!first)
> OK         if (first == NULL)
> OK         if (first != NULL)
> BAD        if (first == 0)
> BAD        if (first != 0)

BTW c++ -Wzero-as-null-pointer-constant warns only about the last two cases.


Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]