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

Diff for /src/usr.bin/last/last.c between version 1.41 and 1.42

version 1.41, 2014/04/17 14:49:11 version 1.42, 2014/04/22 12:36:36
Line 414 
Line 414 
   
         if (check) {          if (check) {
                 /*                  /*
                  * when ftp logs in over a network, the entry in                   * some entries, such as ftp and uucp, will
                  * the utmp file is the name plus its process id.                   * include process name plus id; exclude entries
                    * that start with 'console' and 'tty' from
                    * having the process id stripped.
                  */                   */
                 if (!strncmp(bp->ut_line, "ftp", sizeof("ftp") - 1))                  if ((strncmp(bp->ut_line, "console", strlen("console")) != 0) &&
                         bp->ut_line[3] = '\0';                      (strncmp(bp->ut_line, "tty", strlen("tty")) != 0)) {
                           char *s;
                           for (s = bp->ut_line;
                                *s != '\0' && !isdigit((unsigned char)*s); s++)
                                   ;
                           *s = '\0';
                   }
         }          }
   
         if (snaptime)           /* if snaptime is set, return NO */          if (snaptime)           /* if snaptime is set, return NO */

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42