summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/regress/modpipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/regress/modpipe.c')
-rwxr-xr-xcrypto/openssh/regress/modpipe.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/crypto/openssh/regress/modpipe.c b/crypto/openssh/regress/modpipe.c
index e854f9e..5f4824b 100755
--- a/crypto/openssh/regress/modpipe.c
+++ b/crypto/openssh/regress/modpipe.c
@@ -25,36 +25,11 @@
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
+#ifdef HAVE_ERR_H
+# include <err.h>
+#endif
#include "openbsd-compat/getopt_long.c"
-static void err(int, const char *, ...) __attribute__((format(printf, 2, 3)));
-static void errx(int, const char *, ...) __attribute__((format(printf, 2, 3)));
-
-static void
-err(int r, const char *fmt, ...)
-{
- va_list args;
-
- va_start(args, fmt);
- fprintf(stderr, "%s: ", strerror(errno));
- vfprintf(stderr, fmt, args);
- fputc('\n', stderr);
- va_end(args);
- exit(r);
-}
-
-static void
-errx(int r, const char *fmt, ...)
-{
- va_list args;
-
- va_start(args, fmt);
- vfprintf(stderr, fmt, args);
- fputc('\n', stderr);
- va_end(args);
- exit(r);
-}
-
static void
usage(void)
{
OpenPOWER on IntegriCloud