Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/rpcinfo Fix usage() to actually not return



details:   https://anonhg.NetBSD.org/src/rev/eeaa0c72aa8b
branches:  trunk
changeset: 765336:eeaa0c72aa8b
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue May 24 12:42:25 2011 +0000

description:
Fix usage() to actually not return

diffstat:

 usr.bin/rpcinfo/rpcinfo.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r f961462c50c6 -r eeaa0c72aa8b usr.bin/rpcinfo/rpcinfo.c
--- a/usr.bin/rpcinfo/rpcinfo.c Tue May 24 12:40:11 2011 +0000
+++ b/usr.bin/rpcinfo/rpcinfo.c Tue May 24 12:42:25 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpcinfo.c,v 1.32 2011/02/10 00:05:52 christos Exp $    */
+/*     $NetBSD: rpcinfo.c,v 1.33 2011/05/24 12:42:25 joerg Exp $       */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -153,7 +153,7 @@
 static void    deletereg(const char *, int, char **);
 static void    print_rmtcallstat(int, const rpcb_stat *);
 static void    print_getaddrstat(int, const rpcb_stat *);
-static void    usage(void)__attribute__((__noreturn__));
+static void    usage(void) __dead;
 static rpcprog_t       getprognum(const char *);
 static rpcvers_t       getvers(const char *);
 static const char *spaces(size_t);
@@ -1499,6 +1499,7 @@
        (void)fprintf(stderr, "\t%s -b prognum versnum\n", getprogname());
        (void)fprintf(stderr, "\t%s -d [-T netid] prognum versnum\n",
            getprogname());
+       exit(0);
 }
 
 static rpcprog_t



Home | Main Index | Thread Index | Old Index