1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vsnprintf.c: parenthesize macro arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2011-01-16 11:56:18 +00:00
parent 49cf75e675
commit 4f1894a0b6
2 changed files with 8 additions and 4 deletions

View file

@ -597,10 +597,10 @@ BSD_vfprintf(FILE *fp, const char *fmt0, va_list ap)
#define PAD(howmany, with) { \
if ((n = (howmany)) > 0) { \
while (n > PADSIZE) { \
PRINT(with, PADSIZE); \
PRINT((with), PADSIZE); \
n -= PADSIZE; \
} \
PRINT(with, n); \
PRINT((with), n); \
} \
}
#if SIZEOF_LONG > SIZEOF_INT
@ -611,10 +611,10 @@ BSD_vfprintf(FILE *fp, const char *fmt0, va_list ap)
errno = ENOMEM; \
goto error; \
} \
if (ln > 0) PAD((int)ln, with); \
if (ln > 0) PAD((int)ln, (with)); \
}
#else
#define PAD_L(howmany, with) PAD(howmany, with)
#define PAD_L(howmany, with) PAD((howmany), (with))
#endif
#define FLUSH() { \
if (uio.uio_resid && BSD__sprint(fp, &uio)) \