diff options
author | Gleydson Soares <gsoares@cvs.openbsd.org> | 2016-02-01 22:27:26 +0000 |
---|---|---|
committer | Gleydson Soares <gsoares@cvs.openbsd.org> | 2016-02-01 22:27:26 +0000 |
commit | 8357c56428d3605a2fe360b28564389e310e518b (patch) | |
tree | e855b2c1fa4ef1c80467f5abd93893ed1605fb7a /bin | |
parent | 57c1869fb0b53a6aa75e5ba247bcc621c1576403 (diff) |
- make usage() static and __dead
- while here switch main to return instead of exit(3)
OK tedu@
Diffstat (limited to 'bin')
-rw-r--r-- | bin/domainname/domainname.c | 8 | ||||
-rw-r--r-- | bin/hostname/hostname.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/bin/domainname/domainname.c b/bin/domainname/domainname.c index b4cc6db4ff0..008e7e45ee4 100644 --- a/bin/domainname/domainname.c +++ b/bin/domainname/domainname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: domainname.c,v 1.9 2015/01/16 06:39:31 deraadt Exp $ */ +/* $OpenBSD: domainname.c,v 1.10 2016/02/01 22:26:39 gsoares Exp $ */ /* $NetBSD: domainname.c,v 1.7 1995/03/21 09:04:22 cgd Exp $ */ /* @@ -39,7 +39,7 @@ extern char *__progname; -void usage(void); +static void __dead usage(void); int main(int argc, char *argv[]) @@ -66,10 +66,10 @@ main(int argc, char *argv[]) err(1, "getdomainname"); (void)printf("%s\n", domainname); } - exit(0); + return(0); } -void +static void __dead usage(void) { (void)fprintf(stderr, "usage: %s [name-of-domain]\n", __progname); diff --git a/bin/hostname/hostname.c b/bin/hostname/hostname.c index e9c6454fb36..f4a742c0738 100644 --- a/bin/hostname/hostname.c +++ b/bin/hostname/hostname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostname.c,v 1.9 2015/01/16 06:39:32 deraadt Exp $ */ +/* $OpenBSD: hostname.c,v 1.10 2016/02/01 22:27:25 gsoares Exp $ */ /* $NetBSD: hostname.c,v 1.10 1995/09/07 06:28:40 jtc Exp $ */ /* @@ -39,7 +39,7 @@ extern char *__progname; -void usage(void); +static void __dead usage(void); int main(int argc, char *argv[]) @@ -72,10 +72,10 @@ main(int argc, char *argv[]) *p = '\0'; (void)printf("%s\n", hostname); } - exit(0); + return(0); } -void +static void __dead usage(void) { (void)fprintf(stderr, "usage: %s [-s] [name-of-host]\n", __progname); |