summaryrefslogtreecommitdiffstats
path: root/usr.bin/finger/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/finger/net.c')
-rw-r--r--usr.bin/finger/net.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/finger/net.c b/usr.bin/finger/net.c
index 4f04c04..1173847 100644
--- a/usr.bin/finger/net.c
+++ b/usr.bin/finger/net.c
@@ -35,7 +35,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)net.c 8.3 (Berkeley) 1/2/94";
+static char sccsid[] = "@(#)net.c 8.4 (Berkeley) 4/28/95";
#endif /* not lint */
#include <sys/types.h>
@@ -144,9 +144,8 @@ netfinger(name)
* it isn't a space, we can simply set the 7th bit. Every ASCII
* character with bit 7 set is printable.
*/
- if (fp = fdopen(s, "r")) {
- int lastc = '\n';
-
+ lastc = 0;
+ if ((fp = fdopen(s, "r")) != NULL) {
while ((c = getc(fp)) != EOF) {
if (c == 0x0d) {
if (lastc == '\r') /* ^M^M - skip dupes */
OpenPOWER on IntegriCloud