Browse Source

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>
Mike Frysinger 12 years ago
parent
commit
6f42e7e2cf
1 changed files with 3 additions and 5 deletions
  1. 3 5
      utils/getconf.c

+ 3 - 5
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