Build finger(1) with WARNS=6.
This commit is contained in:
parent
cdd36f96b2
commit
c5d693c5d0
@ -5,6 +5,4 @@ PROG= finger
|
|||||||
SRCS= finger.c lprint.c net.c sprint.c util.c
|
SRCS= finger.c lprint.c net.c sprint.c util.c
|
||||||
MAN= finger.1 finger.conf.5
|
MAN= finger.1 finger.conf.5
|
||||||
|
|
||||||
WARNS?= 2
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
@ -306,7 +306,7 @@ show_text(const char *directory, const char *file_name, const char *header)
|
|||||||
return(0);
|
return(0);
|
||||||
|
|
||||||
/* If short enough, and no newlines, show it on a single line.*/
|
/* 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 <= (off_t)(LINE_LEN - strlen(header) - 5)) {
|
||||||
nr = read(fd, tbuf, sizeof(tbuf));
|
nr = read(fd, tbuf, sizeof(tbuf));
|
||||||
if (nr <= 0) {
|
if (nr <= 0) {
|
||||||
(void)close(fd);
|
(void)close(fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user