Messages in this thread | | | Date | Mon, 9 Dec 2013 21:08:21 -0500 | From | Steven Rostedt <> | Subject | Re: [PATCH 04/14] tools lib traceevent: Get rid of malloc_or_die() allocate_arg() |
| |
On Tue, 10 Dec 2013 10:21:48 +0900 Namhyung Kim <namhyung@kernel.org> wrote:
> > > > Also, I prefer if (!arg) over if (arg == NULL), but I'm not going to > > fight over that ;-) > > Yeah, it's about preference. I can do it your way from now on if you > want while as you can see it's more error-prone - but no, I didn't do it > intentionally because of that. ;-)
I'm not really that picky. When I code, I use the (!arg) version. I haven't had an inverse bug due to it in a long time. But I've fixed others that have done it, so I understand the rational for it.
What I refuse to accept is the "if (NULL == arg)" notation. That just makes it hard to read, and compilers are smart enough today to detect the "if (arg = NULL)" bugs.
-- Steve
| |