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

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

 



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


[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux