aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-01-03 23:24:16 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-01-03 23:24:16 +0000
commit0bca0ed29c146972c0bb416f86619a5a280c08cb (patch)
tree5814d4c086dc6521900ca42754480de36d3c4b2c /roff.c
parent98c1b1ff061599876c28f029646bead0e9b01616 (diff)
downloadmandoc-0bca0ed29c146972c0bb416f86619a5a280c08cb.tar.gz
mandoc-0bca0ed29c146972c0bb416f86619a5a280c08cb.tar.zst
mandoc-0bca0ed29c146972c0bb416f86619a5a280c08cb.zip
Calling a macro with fewer arguments than it is defined with is OK;
the remaining ones default to the empty string, not to NULL. Regression reported and fix tested by kristaps@.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/roff.c b/roff.c
index 64a8f629..5053bef5 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.119 2011/01/03 22:42:37 schwarze Exp $ */
+/* $Id: roff.c,v 1.120 2011/01/03 23:24:16 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -1209,7 +1209,7 @@ roff_userdef(ROFF_ARGS)
*/
cp = *bufp + pos;
for (i = 0; i < 9; i++)
- arg[i] = '\0' == *cp ? NULL :
+ arg[i] = '\0' == *cp ? "" :
mandoc_getarg(&cp, r->msg, r->data, ln, &pos);
/*