summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-04-22 23:34:31 -0400
committerMike Frysinger <vapier@gentoo.org>2012-04-22 23:36:42 -0400
commit6f42e7e2cf9de444f2ef4c28f7754d84e8f966e3 (patch)
tree2584bd8b784d44fa6e1b659beb9461f59bc593de /utils
parent0c3247e4c1b710046228b9ab031199f74754a0f0 (diff)
getconf: include a newline in error messages
The normal error() func implicitly appends a newline, so make sure we do the same. Otherwise getconf outputs an error message like so: prompt$ getconf -h Unrecognized variable `-h'prompt$ Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'utils')
-rw-r--r--utils/getconf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/getconf.c b/utils/getconf.c
index 5ff98e6fc..0b2a5aa28 100644
--- a/utils/getconf.c
+++ b/utils/getconf.c
@@ -24,11 +24,9 @@
#define PACKAGE "getconf regression test"
#define VERSION ""
-#ifndef _
-# define _
-#endif
-#define error(status, errnum,...) \
- {fprintf(stderr, __VA_ARGS__); exit(status);}
+#define _(x) x
+#define error(status, errnum, fmt, ...) \
+ {fprintf(stderr, fmt "\n", ## __VA_ARGS__); exit(status);}
struct conf