Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/vndcompress Move err1 & errx1 to the end of vnduncom...
details: https://anonhg.NetBSD.org/src/rev/d750f051d5f8
branches: trunk
changeset: 326212:d750f051d5f8
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jan 22 06:17:34 2014 +0000
description:
Move err1 & errx1 to the end of vnduncompress.c; add __printflike.
diffstat:
usr.bin/vndcompress/vnduncompress.c | 45 +++++++++++++++++++-----------------
1 files changed, 24 insertions(+), 21 deletions(-)
diffs (70 lines):
diff -r 54dbd9a7f3f0 -r d750f051d5f8 usr.bin/vndcompress/vnduncompress.c
--- a/usr.bin/vndcompress/vnduncompress.c Wed Jan 22 06:17:25 2014 +0000
+++ b/usr.bin/vndcompress/vnduncompress.c Wed Jan 22 06:17:34 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnduncompress.c,v 1.8 2014/01/22 06:15:57 riastradh Exp $ */
+/* $NetBSD: vnduncompress.c,v 1.9 2014/01/22 06:17:34 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: vnduncompress.c,v 1.8 2014/01/22 06:15:57 riastradh Exp $");
+__RCSID("$NetBSD: vnduncompress.c,v 1.9 2014/01/22 06:17:34 riastradh Exp $");
#include <sys/endian.h>
@@ -50,25 +50,8 @@
#include "offtab.h"
#include "utils.h"
-static void __dead
-err1(const char *fmt, ...)
-{
- va_list va;
-
- va_start(va, fmt);
- verr(1, fmt, va);
- va_end(va);
-}
-
-static void __dead
-errx1(const char *fmt, ...)
-{
- va_list va;
-
- va_start(va, fmt);
- verrx(1, fmt, va);
- va_end(va);
-}
+static void err1(const char *, ...) __printflike(1,2) __dead;
+static void errx1(const char *, ...) __printflike(1,2) __dead;
int
vnduncompress(int argc, char **argv, const struct options *O __unused)
@@ -246,3 +229,23 @@
return 0;
}
+
+static void __printflike(1,2) __dead
+err1(const char *fmt, ...)
+{
+ va_list va;
+
+ va_start(va, fmt);
+ verr(1, fmt, va);
+ va_end(va);
+}
+
+static void __printflike(1,2) __dead
+errx1(const char *fmt, ...)
+{
+ va_list va;
+
+ va_start(va, fmt);
+ verrx(1, fmt, va);
+ va_end(va);
+}
Home |
Main Index |
Thread Index |
Old Index