Re: [PATCH tabled] server/server.c don't deref NULL on failed malloc

Pete Zaitcev <[email protected]> Thu, 23 Sep 2010 08:07:10 -0600
Newsgroups org.kernel.vger.hail-devel
Message-ID <[email protected]>
On Thu, 23 Sep 2010 13:03:15 +0200
Jim Meyering <[email protected]> wrote:

> Just noticed that sometimes tabled uses this idiom:
>   if (!(key = malloc(klen + 1)))
> and sometimes this:
>   if ((key = malloc(klen + 1)) == NULL)
> This time I used "... == NULL".

Er... The bang is Jeff's, which I try to follow always, but perhaps
one or two slipped due to opposing habit. IIRC pathtokey() was mine.
In fact tabled does not use assignments in conditions, dunno why
but it's a tradition.

-- Pete