deprecating sprintf(9)

Ryan Stone rysto32 at gmail.com
Wed Sep 8 17:17:13 UTC 2010


> #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.


More information about the freebsd-current mailing list