From: Pete Zaitcev Subject: Re: [PATCH tabled] server/bucket.c: don't deref NULL upon failed malloc Date: Thu, 23 Sep 2010 08:03:50 -0600 Message-ID: <20100923080350.09e7dffc@lembas.zaitcev.lan> References: <8762xwybn1.fsf@meyering.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <8762xwybn1.fsf@meyering.net> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Jim Meyering Cc: Project Hail 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) > + > tmpl = pfx_list; > while (tmpl) { Dunno about Jeff, but I would definitely put an #undef to it after the loop, just in case. -- Pete