From owner-cvs-all Thu Sep 6 5:57:30 2001 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 3866A37B405; Thu, 6 Sep 2001 05:57:00 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f86Cusw29929; Thu, 6 Sep 2001 15:56:54 +0300 (EEST) (envelope-from ru) Date: Thu, 6 Sep 2001 15:56:54 +0300 From: Ruslan Ermilov To: Alexey Zelkin Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/stdlib strfmon.c Message-ID: <20010906155654.I18362@sunbay.com> References: <200109060926.f869QS033887@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109060926.f869QS033887@freefall.freebsd.org>; from phantom@FreeBSD.ORG on Thu, Sep 06, 2001 at 02:26:28AM -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Sep 06, 2001 at 02:26:28AM -0700, Alexey Zelkin wrote: > phantom 2001/09/06 02:26:28 PDT > > Modified files: > lib/libc/stdlib strfmon.c > Log: > correctly wrap macros with { } > > Revision Changes Path > 1.2 +4 -3 src/lib/libc/stdlib/strfmon.c > Nope, this is incorrect. You didn't read the whole thread. The correct fix it is to wrap macros in ``{ } while(0)'': #define PRINT(CH) do { \ if (dst >= s + maxsize) \ goto e2big_error; \ *dst++ = CH; \ } while(0) See style(9) for more details. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message