Cosmetic changes; fix more indentation (just added/deleted white spaces).

This commit is contained in:
enami 1998-02-28 13:29:03 +00:00
parent 01e1d15a0e
commit 86053c56a1
1 changed files with 38 additions and 39 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rshd.c,v 1.12 1998/01/08 03:30:49 lukem Exp $ */
/* $NetBSD: rshd.c,v 1.13 1998/02/28 13:29:03 enami Exp $ */
/*-
* Copyright (c) 1988, 1989, 1992, 1993, 1994
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1992, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94";
#else
__RCSID("$NetBSD: rshd.c,v 1.12 1998/01/08 03:30:49 lukem Exp $");
__RCSID("$NetBSD: rshd.c,v 1.13 1998/02/28 13:29:03 enami Exp $");
#endif
#endif /* not lint */
@ -220,8 +220,7 @@ doit(fromp)
fromp->sin_port < IPPORT_RESERVED/2) {
syslog(LOG_NOTICE|LOG_AUTH,
"Connection from %s on illegal port %u",
inet_ntoa(fromp->sin_addr),
fromp->sin_port);
inet_ntoa(fromp->sin_addr), fromp->sin_port);
exit(1);
}
@ -229,13 +228,14 @@ doit(fromp)
port = 0;
for (;;) {
char c;
if ((cc = read(STDIN_FILENO, &c, 1)) != 1) {
if (cc < 0)
syslog(LOG_NOTICE, "read: %m");
shutdown(0, 1+1);
exit(1);
}
if (c== 0)
if (c == 0)
break;
port = port * 10 + c - '0';
}
@ -312,8 +312,7 @@ doit(fromp)
sizeof(hostnamebuf) - 1);
} else
errorhost = hostname = strncpy(hostnamebuf,
inet_ntoa(fromp->sin_addr),
sizeof(hostnamebuf) - 1);
inet_ntoa(fromp->sin_addr), sizeof(hostnamebuf) - 1);
hostnamebuf[sizeof(hostnamebuf) - 1] = '\0';
@ -406,6 +405,7 @@ fail:
break;
if (FD_ISSET(s, &ready)) {
int ret;
ret = read(s, &sig, 1);
if (ret <= 0)
FD_CLR(s, &readfrom);
@ -419,8 +419,7 @@ fail:
shutdown(s, 1+1);
FD_CLR(pv[0], &readfrom);
} else {
(void)
write(s, buf, cc);
(void) write(s, buf, cc);
}
}