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:
parent
49cf75e675
commit
4f1894a0b6
2 changed files with 8 additions and 4 deletions
|
@ -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)) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue