From: florian Date: Tue, 30 Aug 2016 12:10:10 +0000 (+0000) Subject: usage() is __dead. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c5178e988d6342165421b0c8ae0fb5f6192c3096;p=openbsd usage() is __dead. While here remove one useless call to usage() that's covered by the very next line. --- diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index b897c6b7dc6..80b76398e38 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.139 2016/03/03 18:30:48 florian Exp $ */ +/* $OpenBSD: ping.c,v 1.140 2016/08/30 12:10:10 florian Exp $ */ /* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */ /* @@ -183,7 +183,7 @@ void pr_iph(struct ip *); #ifndef SMALL int map_tos(char *, int *); #endif /* SMALL */ -void usage(void); +__dead void usage(void); int main(int argc, char *argv[]) @@ -1445,7 +1445,7 @@ map_tos(char *key, int *val) } #endif /* SMALL */ -void +__dead void usage(void) { (void)fprintf(stderr, diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c index 4f5b5edb155..f8681350cac 100644 --- a/sbin/ping6/ping6.c +++ b/sbin/ping6/ping6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping6.c,v 1.147 2016/08/30 11:15:16 florian Exp $ */ +/* $OpenBSD: ping6.c,v 1.148 2016/08/30 12:10:10 florian Exp $ */ /* $KAME: ping6.c,v 1.163 2002/10/25 02:19:06 itojun Exp $ */ /* @@ -214,7 +214,7 @@ void pr_ip6opt(void *); void pr_rthdr(void *); void pr_retip(struct ip6_hdr *, u_char *); void summary(int); -void usage(void); +__dead void usage(void); int main(int argc, char *argv[]) @@ -355,18 +355,12 @@ main(int argc, char *argv[]) break; default: usage(); - /*NOTREACHED*/ } } argc -= optind; argv += optind; - if (argc < 1) { - usage(); - /*NOTREACHED*/ - } - if (argc != 1) usage(); @@ -1564,7 +1558,7 @@ fill(char *bp, char *patp) } } -void +__dead void usage(void) { (void)fprintf(stderr,