picked and dropped code a little too quickly...
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 3 Jan 1988 17:00:18 +0000 (09:00 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 3 Jan 1988 17:00:18 +0000 (09:00 -0800)
SCCS-vsn: usr.bin/last/last.c 5.10

usr/src/usr.bin/last/last.c

index ef2960d..15a36c2 100644 (file)
@@ -17,7 +17,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)last.c     5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)last.c     5.10 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -339,7 +339,7 @@ ttyconv(arg)
                        fputs("last: malloc failure.\n", stderr);
                        exit(1);
                }
                        fputs("last: malloc failure.\n", stderr);
                        exit(1);
                }
-               if (!strcmp(optarg, "co"))
+               if (!strcmp(arg, "co"))
                        (void)strcpy(mval, "console");
                else {
                        (void)strcpy(mval, "tty");
                        (void)strcpy(mval, "console");
                else {
                        (void)strcpy(mval, "tty");