From b963db4652a0bf1718825e8e1a9bc93e87b7a80f Mon Sep 17 00:00:00 2001 From: delphij Date: Fri, 11 Dec 2009 23:35:38 +0000 Subject: Remove unneeded header includes from usr.bin/ except contributed code. Tested with: make universe --- usr.bin/finger/lprint.c | 2 +- usr.bin/finger/net.c | 2 +- usr.bin/finger/util.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin/finger') diff --git a/usr.bin/finger/lprint.c b/usr.bin/finger/lprint.c index 848bbee..d656693 100644 --- a/usr.bin/finger/lprint.c +++ b/usr.bin/finger/lprint.c @@ -310,7 +310,7 @@ show_text(const char *directory, const char *file_name, const char *header) return(0); /* If short enough, and no newlines, show it on a single line.*/ - if (sb.st_size <= LINE_LEN - strlen(header) - 5) { + if (sb.st_size <= (int)(LINE_LEN - strlen(header) - 5)) { nr = read(fd, tbuf, sizeof(tbuf)); if (nr <= 0) { (void)close(fd); diff --git a/usr.bin/finger/net.c b/usr.bin/finger/net.c index 5260a2d..703ff60 100644 --- a/usr.bin/finger/net.c +++ b/usr.bin/finger/net.c @@ -230,7 +230,7 @@ trying(const struct addrinfo *ai) printf("Trying %s...\n", buf); } -void +static void cleanup(int sig __unused) { #define ERRSTR "Timed out.\n" diff --git a/usr.bin/finger/util.c b/usr.bin/finger/util.c index a84c711..3eabd34 100644 --- a/usr.bin/finger/util.c +++ b/usr.bin/finger/util.c @@ -120,7 +120,7 @@ enter_lastlog(PERSON *pn) } if (fd == -1 || lseek(fd, (long)pn->uid * sizeof(ll), SEEK_SET) != - (long)pn->uid * sizeof(ll) || + (off_t)(pn->uid * sizeof(ll)) || read(fd, (char *)&ll, sizeof(ll)) != sizeof(ll)) { /* as if never logged in */ ll.ll_line[0] = ll.ll_host[0] = '\0'; -- cgit v1.1