don't print garbage host on guess
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Tue, 27 Jun 1989 12:28:35 +0000 (04:28 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Tue, 27 Jun 1989 12:28:35 +0000 (04:28 -0800)
SCCS-vsn: usr.bin/who/who.c 5.9

usr/src/usr.bin/who/who.c

index 2f9e3e1..075f5ca 100644 (file)
@@ -1,17 +1,17 @@
 /*
 /*
- * Copyright (c) 1980 Regents of the University of California.
+ * Copyright (c) 1980, 1989 Regents of the University of California.
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  */
 
 #ifndef lint
 char copyright[] =
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  */
 
 #ifndef lint
 char copyright[] =
-"@(#) Copyright (c) 1980 Regents of the University of California.\n\
+"@(#) Copyright (c) 1980, 1989 Regents of the University of California.\n\
  All rights reserved.\n";
 #endif not lint
 
 #ifndef lint
  All rights reserved.\n";
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)who.c      5.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)who.c      5.9 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -98,5 +98,6 @@ guess()
        pw = getpwuid(getuid());
        strncpy(utmp.ut_name, pw ? pw->pw_name : "?", NMAX);
        time(&utmp.ut_time);
        pw = getpwuid(getuid());
        strncpy(utmp.ut_name, pw ? pw->pw_name : "?", NMAX);
        time(&utmp.ut_time);
+       utmp.ut_host[0] = '\0';
        putline();
 }
        putline();
 }