浏览代码

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 年之前
父节点
当前提交
6f42e7e2cf
共有 1 个文件被更改,包括 3 次插入5 次删除
  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