[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

On Thu, 23 Sep 2010 13:03:15 +0200
Jim Meyering <jim@xxxxxxxxxxxx> 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
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux