Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2001 18:51:40 -0400
From:      Mike Barcroft <mike@FreeBSD.org>
To:        Alexey Zelkin <phantom@FreeBSD.org>
Cc:        Ruslan Ermilov <ru@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc/stdlib strfmon.c
Message-ID:  <20010914185140.A32495@coffee.q9media.com>
In-Reply-To: <20010906155654.I18362@sunbay.com>; from ru@FreeBSD.org on Thu, Sep 06, 2001 at 03:56:54PM %2B0300
References:  <200109060926.f869QS033887@freefall.freebsd.org> <20010906155654.I18362@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov <ru@FreeBSD.org> writes:
> 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.

Alexey,
Is there a reason you haven't fixed this yet?

Best regards,
Mike Barcroft

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010914185140.A32495>