summaryrefslogtreecommitdiffstats
path: root/usr.bin/finger
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-12-11 23:35:38 +0000
committerdelphij <delphij@FreeBSD.org>2009-12-11 23:35:38 +0000
commitb963db4652a0bf1718825e8e1a9bc93e87b7a80f (patch)
tree1c4d97908b52dc5263d006038b9af6b5ca886ca8 /usr.bin/finger
parentf8bfec1fb23c300d6b8bb021cf4f7fdd21981c3f (diff)
downloadFreeBSD-src-b963db4652a0bf1718825e8e1a9bc93e87b7a80f.zip
FreeBSD-src-b963db4652a0bf1718825e8e1a9bc93e87b7a80f.tar.gz
Remove unneeded header includes from usr.bin/ except contributed code.
Tested with: make universe
Diffstat (limited to 'usr.bin/finger')
-rw-r--r--usr.bin/finger/lprint.c2
-rw-r--r--usr.bin/finger/net.c2
-rw-r--r--usr.bin/finger/util.c2
3 files changed, 3 insertions, 3 deletions
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';
OpenPOWER on IntegriCloud