[PATCH] Ignore tilde in ut_line

From: sin <sin_AT_2f30.org>
Date: Mon, 5 Aug 2013 16:12:01 +0100

---
 who.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/who.c b/who.c
index aee4f76..92c7124 100644
--- a/who.c
+++ b/who.c
_AT_@ -33,7 +33,8 @@ main(int argc, char **argv)
 		eprintf("fopen:");
 	}
 	while(fread(&usr, sizeof(usr), 1, ufp) == 1) {
-		if (!*usr.ut_name || !*usr.ut_line)
+		if (!*usr.ut_name || !*usr.ut_line ||
+		    usr.ut_line[0] == '~')
 			continue;
 		if (mflag && strcmp(usr.ut_line,
 				    strrchr(ttyname(0), '/') + 1))
_AT_@ -51,4 +52,3 @@ usage(void)
 {
 	eprintf("usage: who\n");
 }
-
-- 
1.8.2.3
--8t9RHnE3ZwKMSgU+--
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 05 2013 - 18:36:03 CEST