Date: Wed, 8 Sep 2010 12:47:41 -0400 From: Ryan Stone <rysto32@gmail.com> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: mdf@freebsd.org, freebsd-current@freebsd.org Subject: Re: deprecating sprintf(9) Message-ID: <AANLkTin9WoQZxMc8U9MWPk3=OPTY0yzFYMTA68aYno2_@mail.gmail.com> In-Reply-To: <67157.1283963946@critter.freebsd.dk> References: <AANLkTikO1v7YMFKVZkHZDmurcyfq0QbTkPxG=LNBdKSp@mail.gmail.com> <67157.1283963946@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
> #define bprintf(buf, fmt, ...) \
> do { \
> assert(snprintf(buf, sizeof buf, fmt, __VA_ARGS__) \
> < sizeof buf); \
> } while (0)
Anyone using this macro is in for a nasty surprise when they compile
with -DNDEBUG.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTin9WoQZxMc8U9MWPk3=OPTY0yzFYMTA68aYno2_>
