Module Name:    src
Committed By:   dholland
Date:           Thu Mar 15 03:04:05 UTC 2012

Modified Files:
        src/usr.bin/last: last.c want.c

Log Message:
Tidy up: we no longer need FIRSTVALID for its original purpose, so change
the name of the symbol to something that applies to the remaining use.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/last/last.c
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/last/want.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/last/last.c
diff -u src/usr.bin/last/last.c:1.35 src/usr.bin/last/last.c:1.36
--- src/usr.bin/last/last.c:1.35	Fri Sep 16 15:39:27 2011
+++ src/usr.bin/last/last.c	Thu Mar 15 03:04:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: last.c,v 1.35 2011/09/16 15:39:27 joerg Exp $	*/
+/*	$NetBSD: last.c,v 1.36 2012/03/15 03:04:05 dholland Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19
 #if 0
 static char sccsid[] = "@(#)last.c	8.2 (Berkeley) 4/2/94";
 #endif
-__RCSID("$NetBSD: last.c,v 1.35 2011/09/16 15:39:27 joerg Exp $");
+__RCSID("$NetBSD: last.c,v 1.36 2012/03/15 03:04:05 dholland Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -378,14 +378,14 @@ fmttime(time_t t, int flags)
 #define LINESIZE UT_LINESIZE
 #define HOSTSIZE UT_HOSTSIZE
 #define ut_timefld ut_time
-#define FIRSTVALID 0
+#define HAS_UT_SS 0
 #include "want.c"
 #undef TYPE /*(a)*/
 #undef NAMESIZE
 #undef LINESIZE
 #undef HOSTSIZE
 #undef ut_timefld
-#undef FIRSTVALID
+#undef HAS_UT_SS
 #endif
 
 #ifdef SUPPORT_UTMPX
@@ -400,6 +400,6 @@ fmttime(time_t t, int flags)
 #define LINESIZE UTX_LINESIZE
 #define HOSTSIZE UTX_HOSTSIZE
 #define ut_timefld ut_xtime
-#define FIRSTVALID 1
+#define HAS_UT_SS 1
 #include "want.c"
 #endif

Index: src/usr.bin/last/want.c
diff -u src/usr.bin/last/want.c:1.16 src/usr.bin/last/want.c:1.17
--- src/usr.bin/last/want.c:1.16	Thu Mar 15 03:01:03 2012
+++ src/usr.bin/last/want.c	Thu Mar 15 03:04:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: want.c,v 1.16 2012/03/15 03:01:03 dholland Exp $	*/
+/*	$NetBSD: want.c,v 1.17 2012/03/15 03:04:05 dholland Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -39,7 +39,7 @@ static const char *
 /*ARGSUSED*/
 gethost(struct utmp *ut, const char *host, int numeric)
 {
-#if FIRSTVALID == 0
+#if HAS_UT_SS == 0
 	return numeric ? "" : host;
 #else
 	if (numeric) {

Reply via email to