diff options
author | imp <imp@FreeBSD.org> | 2002-02-02 06:48:10 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-02-02 06:48:10 +0000 |
commit | 50014e35418ca00d25ea852fc4f94acf80be4df3 (patch) | |
tree | f26db6e85c29b2244f601bdb366caa7f26a96c24 /bin/hostname | |
parent | 3fc8df52e3856eeac730574d5ae122806dd1e1ef (diff) | |
download | FreeBSD-src-50014e35418ca00d25ea852fc4f94acf80be4df3.zip FreeBSD-src-50014e35418ca00d25ea852fc4f94acf80be4df3.tar.gz |
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
Diffstat (limited to 'bin/hostname')
-rw-r--r-- | bin/hostname/hostname.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/bin/hostname/hostname.c b/bin/hostname/hostname.c index 4fc5099..23171d6 100644 --- a/bin/hostname/hostname.c +++ b/bin/hostname/hostname.c @@ -53,13 +53,10 @@ static const char rcsid[] = #include <string.h> #include <unistd.h> -int main __P((int, char *[])); -void usage __P((void)); +void usage(void); int -main(argc,argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, sflag; char *p, hostname[MAXHOSTNAMELEN]; @@ -94,7 +91,7 @@ main(argc,argv) } void -usage() +usage(void) { (void)fprintf(stderr, "usage: hostname [-s] [name-of-host]\n"); |