diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2002-09-04 23:29:10 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2002-09-04 23:29:10 +0000 |
commit | b4339b74aded4c38ebcfe3a2a9b37b900abb8874 (patch) | |
tree | fb230419005f211ecea1e667385bde9886dbf0d8 /usr.bin/logger | |
parent | 228b93ce829543fee06561687a63c17a7e821dfd (diff) | |
download | FreeBSD-src-b4339b74aded4c38ebcfe3a2a9b37b900abb8874.zip FreeBSD-src-b4339b74aded4c38ebcfe3a2a9b37b900abb8874.tar.gz |
ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.
Reviewed by: md5
Diffstat (limited to 'usr.bin/logger')
-rw-r--r-- | usr.bin/logger/logger.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/usr.bin/logger/logger.c b/usr.bin/logger/logger.c index 25692af..3832752 100644 --- a/usr.bin/logger/logger.c +++ b/usr.bin/logger/logger.c @@ -85,9 +85,7 @@ int send_to_all = 0; /* send message to all IPv4/IPv6 addresses */ * log. */ int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, logflags, pri; char *tag, *host, buf[1024]; @@ -142,7 +140,7 @@ main(argc, argv) /* log input line if appropriate */ if (argc > 0) { - register char *p, *endp; + char *p, *endp; size_t len; for (p = buf, endp = buf + sizeof(buf) - 2; *argv;) { @@ -240,8 +238,7 @@ logmessage(int pri, char *host, char *buf) * Decode a symbolic name to a numeric value */ int -pencode(s) - register char *s; +pencode(char *s) { char *save; int fac, lev; @@ -265,11 +262,9 @@ pencode(s) } int -decode(name, codetab) - char *name; - CODE *codetab; +decode(char *name, CODE *codetab) { - register CODE *c; + CODE *c; if (isdigit(*name)) return (atoi(name)); @@ -282,7 +277,7 @@ decode(name, codetab) } static void -usage() +usage(void) { (void)fprintf(stderr, "usage: %s\n", "logger [-46Ais] [-f file] [-h host] [-p pri] [-t tag] [message ...]" |