Module Name:    src
Committed By:   lukem
Date:           Sun Apr 12 13:08:31 UTC 2009

Modified Files:
        src/usr.bin/lastcomm: Makefile lastcomm.c

Log Message:
fix sign-compare issue


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/lastcomm/Makefile
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/lastcomm/lastcomm.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/lastcomm/Makefile
diff -u src/usr.bin/lastcomm/Makefile:1.6 src/usr.bin/lastcomm/Makefile:1.7
--- src/usr.bin/lastcomm/Makefile:1.6	Mon Mar 28 23:33:22 2005
+++ src/usr.bin/lastcomm/Makefile	Sun Apr 12 13:08:31 2009
@@ -1,7 +1,6 @@
-#	$NetBSD: Makefile,v 1.6 2005/03/28 23:33:22 christos Exp $
+#	$NetBSD: Makefile,v 1.7 2009/04/12 13:08:31 lukem Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/6/93
 
-WARNS=3
 PROG=	lastcomm
 DPADD=	${LIBMATH}
 LDADD=	-lm

Index: src/usr.bin/lastcomm/lastcomm.c
diff -u src/usr.bin/lastcomm/lastcomm.c:1.20 src/usr.bin/lastcomm/lastcomm.c:1.21
--- src/usr.bin/lastcomm/lastcomm.c:1.20	Mon Jul 21 14:19:23 2008
+++ src/usr.bin/lastcomm/lastcomm.c	Sun Apr 12 13:08:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: lastcomm.c,v 1.20 2008/07/21 14:19:23 lukem Exp $	*/
+/*	$NetBSD: lastcomm.c,v 1.21 2009/04/12 13:08:31 lukem Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)lastcomm.c	8.2 (Berkeley) 4/29/95";
 #endif
-__RCSID("$NetBSD: lastcomm.c,v 1.20 2008/07/21 14:19:23 lukem Exp $");
+__RCSID("$NetBSD: lastcomm.c,v 1.21 2009/04/12 13:08:31 lukem Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -107,7 +107,7 @@
 	size = sb.st_size - sb.st_size % sizeof(struct acct);
 
 	/* Check if any records to display. */
-	if (size < sizeof(struct acct))
+	if (size < (off_t)sizeof(struct acct))
 		exit(0);
 
 	/*

Reply via email to