summaryrefslogtreecommitdiffstats
path: root/usr.bin/logger/logger.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-04-01 11:06:00 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-04-01 11:06:00 +0000
commit0ea0f91492be5169a15d8bfb3184fba7a1a7006e (patch)
tree7706d7f19dc8a805e560029088a2f47583dae432 /usr.bin/logger/logger.c
parent3be1449ad7bdb0b6ef622ee315da6a56b33e665f (diff)
downloadFreeBSD-src-0ea0f91492be5169a15d8bfb3184fba7a1a7006e.zip
FreeBSD-src-0ea0f91492be5169a15d8bfb3184fba7a1a7006e.tar.gz
1) Use FBSDID for vendor string.
2) Change an int for a size_t, as that's what it is mainly used for. 3) Add some braces to keep gcc happy.
Diffstat (limited to 'usr.bin/logger/logger.c')
-rw-r--r--usr.bin/logger/logger.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/logger/logger.c b/usr.bin/logger/logger.c
index f610c92..fc81b76 100644
--- a/usr.bin/logger/logger.c
+++ b/usr.bin/logger/logger.c
@@ -41,10 +41,11 @@ static const char copyright[] =
#if 0
static char sccsid[] = "@(#)logger.c 8.1 (Berkeley) 6/6/93";
#endif
-static const char rcsid[] =
- "$FreeBSD$";
#endif /* not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -143,7 +144,7 @@ main(argc, argv)
/* log input line if appropriate */
if (argc > 0) {
register char *p, *endp;
- int len;
+ size_t len;
for (p = buf, endp = buf + sizeof(buf) - 2; *argv;) {
len = strlen(*argv);
@@ -226,11 +227,12 @@ logmessage(int pri, char *host, char *buf)
if (lsent == len && !send_to_all)
break;
}
- if (lsent != len)
+ if (lsent != len) {
if (lsent == -1)
warn ("sendto");
else
warnx ("sendto: short send - %d bytes", lsent);
+ }
free(line);
}
OpenPOWER on IntegriCloud