Module Name: src Committed By: tls Date: Sun Aug 10 06:59:16 UTC 2014
Modified Files: src/usr.bin/who [tls-earlyentropy]: who.c Log Message: Rebase. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.23.36.1 src/usr.bin/who/who.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/who/who.c diff -u src/usr.bin/who/who.c:1.23 src/usr.bin/who/who.c:1.23.36.1 --- src/usr.bin/who/who.c:1.23 Thu Jul 24 15:35:41 2008 +++ src/usr.bin/who/who.c Sun Aug 10 06:59:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: who.c,v 1.23 2008/07/24 15:35:41 christos Exp $ */ +/* $NetBSD: who.c,v 1.23.36.1 2014/08/10 06:59:16 tls Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)who.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: who.c,v 1.23 2008/07/24 15:35:41 christos Exp $"); +__RCSID("$NetBSD: who.c,v 1.23.36.1 2014/08/10 06:59:16 tls Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -285,6 +285,7 @@ print(const char *name, const char *line time_t idle; const char *types = NULL; size_t i; + char *tstr; state = '?'; idle = 0; @@ -312,7 +313,8 @@ print(const char *name, const char *line (void)printf("%c ", state); (void)printf("%-*.*s ", maxline, maxline, line); - (void)printf("%.12s ", ctime(&t) + 4); + tstr = ctime(&t); + (void)printf("%.12s ", tstr ? tstr + 4 : "?"); if (show_idle) { if (idle < 60)