Compare size_t vs off_t by casting both to uintmax_t

This commit is contained in:
lukem 2009-04-18 06:28:19 +00:00
parent 217d969936
commit 35a4cbea60
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: crontab.c,v 1.32 2009/04/11 12:55:29 lukem Exp $ */
/* $NetBSD: crontab.c,v 1.33 2009/04/18 06:28:19 lukem Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@ -22,7 +22,7 @@
#if 0
static char rcsid[] = "Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp";
#else
__RCSID("$NetBSD: crontab.c,v 1.32 2009/04/11 12:55:29 lukem Exp $");
__RCSID("$NetBSD: crontab.c,v 1.33 2009/04/18 06:28:19 lukem Exp $");
#endif
#endif
@ -554,7 +554,7 @@ replace_cmd(void) {
warn("error stat'ing crontab input");
goto out;
}
if (statbuf.st_size > (off_t)maxtabsize) {
if ((uintmax_t)statbuf.st_size > (uintmax_t)maxtabsize) {
warnx("%ld bytes is larger than the maximum size of %ld bytes",
(long) statbuf.st_size, (long) maxtabsize);
val = -1;
@ -568,7 +568,7 @@ replace_cmd(void) {
fprintf(tmp, "# DO NOT EDIT THIS FILE - edit the master and reinstall.\n");
fprintf(tmp, "# (%s installed on %-24.24s)\n", Filename, ctime(&now));
fprintf(tmp, "# (Cron version -- %s)\n",
"$NetBSD: crontab.c,v 1.32 2009/04/11 12:55:29 lukem Exp $");
"$NetBSD: crontab.c,v 1.33 2009/04/18 06:28:19 lukem Exp $");
/* copy the crontab to the tmp
*/