diff options
author | mp <mp@FreeBSD.org> | 2002-07-24 16:23:10 +0000 |
---|---|---|
committer | mp <mp@FreeBSD.org> | 2002-07-24 16:23:10 +0000 |
commit | f2c2aa29b7d05c53575ab7ce4dc5870fd33a1310 (patch) | |
tree | 22260a5dd95c2612c939ecc9dc8166877f07d1d1 /contrib/tcsh/tc.who.c | |
parent | e8a1e84ed0d35851468ed9942dd757f1874d0907 (diff) | |
download | FreeBSD-src-f2c2aa29b7d05c53575ab7ce4dc5870fd33a1310.zip FreeBSD-src-f2c2aa29b7d05c53575ab7ce4dc5870fd33a1310.tar.gz |
Import of tcsh-6.12.00
Diffstat (limited to 'contrib/tcsh/tc.who.c')
-rw-r--r-- | contrib/tcsh/tc.who.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/contrib/tcsh/tc.who.c b/contrib/tcsh/tc.who.c index 325db77..ede7602 100644 --- a/contrib/tcsh/tc.who.c +++ b/contrib/tcsh/tc.who.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tc.who.c,v 3.32 2000/11/12 02:18:07 christos Exp $ */ +/* $Header: /src/pub/tcsh/tc.who.c,v 3.35 2002/07/01 21:12:04 christos Exp $ */ /* * tc.who.c: Watch logins and logouts... */ @@ -14,11 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -36,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: tc.who.c,v 3.32 2000/11/12 02:18:07 christos Exp $") +RCSID("$Id: tc.who.c,v 3.35 2002/07/01 21:12:04 christos Exp $") #include "tc.h" @@ -197,7 +193,7 @@ watch_login(force) #endif v = adrof(STRwatch); - if (v == NULL && !force) { + if ((v == NULL || v->vec == NULL) && !force) { #ifdef BSDSIGS (void) sigsetmask(omask); #else @@ -500,7 +496,7 @@ print_who(wp) struct varent *vp = adrof(STRwho); Char buf[BUFSIZE]; - if (vp && vp->vec[0]) + if (vp && vp->vec && vp->vec[0]) cp = vp->vec[0]; tprintf(FMT_WHO, buf, cp, BUFSIZE, NULL, wp->who_time, (ptr_t) wp); |