[git commit branch/0.9.33] getconf: include a newline in error messages

Mike Frysinger vapier at gentoo.org
Mon Apr 23 03:36:24 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=6effdb6dd46fc939346b4f21500620a3e800db3a
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0.9.33

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 at gentoo.org>
---
 utils/getconf.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/utils/getconf.c b/utils/getconf.c
index 5ff98e6..0b2a5aa 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


More information about the uClibc-cvs mailing list