[BACK]Return to who.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / who

Diff for /src/usr.bin/who/who.c between version 1.2 and 1.3

version 1.2, 1996/06/26 05:43:00 version 1.3, 1997/01/17 07:13:50
Line 148 
Line 148 
         /* search through the utmp and find an entry for this tty */          /* search through the utmp and find an entry for this tty */
         if (p = ttyname(0)) {          if (p = ttyname(0)) {
                 /* strip any directory component */                  /* strip any directory component */
                 if (t = rindex(p, '/'))                  if (t = strrchr(p, '/'))
                         p = t + 1;                          p = t + 1;
                 while (fread((char *)&usr, sizeof(usr), 1, ufp) == 1)                  while (fread((char *)&usr, sizeof(usr), 1, ufp) == 1)
                         if (usr.ut_name && !strcmp(usr.ut_line, p)) {                          if (usr.ut_name && !strcmp(usr.ut_line, p)) {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3