From 0ea0f91492be5169a15d8bfb3184fba7a1a7006e Mon Sep 17 00:00:00 2001 From: dwmalone Date: Mon, 1 Apr 2002 11:06:00 +0000 Subject: [PATCH] 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. --- usr.bin/logger/logger.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.bin/logger/logger.c b/usr.bin/logger/logger.c index f610c92b9639..fc81b76cdfeb 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 +__FBSDID("$FreeBSD$"); + #include #include #include @@ -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); }