fix sign-compare issue

This commit is contained in:
lukem 2009-04-12 13:08:31 +00:00
parent fff2866fd3
commit a4290d9694
2 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
#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 @@ main(int argc, char *argv[])
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);
/*