aboutsummaryrefslogtreecommitdiffstats
path: root/vsnprintf.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-16 11:56:18 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-16 11:56:18 +0000
commit4f1894a0b697ddd1912093ea2cbfc17e15bf5af6 (patch)
tree98147d8b3e81c59f06286f2b5f34144f613bc2e4 /vsnprintf.c
parent49cf75e675c2498489df553b702a9b45a8555a8a (diff)
downloadruby-4f1894a0b697ddd1912093ea2cbfc17e15bf5af6.tar.gz
* vsnprintf.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vsnprintf.c')
-rw-r--r--vsnprintf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vsnprintf.c b/vsnprintf.c
index 648904f795..7c4d4a9749 100644
--- a/vsnprintf.c
+++ b/vsnprintf.c
@@ -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)) \