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

2010-09-23 Thread Jeff Garzik
On 09/23/2010 10:03 AM, Pete Zaitcev wrote: On Thu, 23 Sep 2010 12:53:06 +0200 Jim Meyering wrote: I factored out the append_const definition to avoid having to wrap the long lines with the increased indentation. p = s; +#define append_const(buf, c) \ + do { memcpy(buf, c, sizeof(

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

2010-09-23 Thread Pete Zaitcev
On Thu, 23 Sep 2010 12:53:06 +0200 Jim Meyering wrote: > I factored out the append_const definition to avoid > having to wrap the long lines with the increased indentation. > p = s; > > +#define append_const(buf, c) \ > + do { memcpy(buf, c, sizeof(c)-1); (buf) += sizeof(c)-1; } while (0