[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131209210821.793758c6@gandalf.local.home>
Date: Mon, 9 Dec 2013 21:08:21 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
Namhyung Kim <namhyung.kim@....com>
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@...nel.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists