Module Name: src
Committed By: lukem
Date: Sat Apr 11 06:52:59 UTC 2009
Modified Files:
src/sbin/scan_ffs: scan_ffs.c
Log Message:
fix sign-compare issues
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sbin/scan_ffs/scan_ffs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/scan_ffs/scan_ffs.c
diff -u src/sbin/scan_ffs/scan_ffs.c:1.20 src/sbin/scan_ffs/scan_ffs.c:1.21
--- src/sbin/scan_ffs/scan_ffs.c:1.20 Sat Dec 15 19:44:47 2007
+++ src/sbin/scan_ffs/scan_ffs.c Sat Apr 11 06:52:59 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: scan_ffs.c,v 1.20 2007/12/15 19:44:47 perry Exp $ */
+/* $NetBSD: scan_ffs.c,v 1.21 2009/04/11 06:52:59 lukem Exp $ */
/*
* Copyright (c) 2005-2007 Juan Romero Pardines
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: scan_ffs.c,v 1.20 2007/12/15 19:44:47 perry Exp $");
+__RCSID("$NetBSD: scan_ffs.c,v 1.21 2009/04/11 06:52:59 lukem Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -273,7 +273,7 @@
* Really enough for now.
*/
for (i = 1; i < 16; i <<= 1)
- if ((BLK_CNT - lastblk) == (i * SBLOCKSIZE / 512)) {
+ if ((BLK_CNT - lastblk) == (daddr_t)(i * SBLOCKSIZE / 512)) {
if (flags & LABELS)
ffs_printpart(sbi, LABELS, i, n);
else
@@ -348,7 +348,7 @@
*/
case FIRST_SBLOCK_ADDRESS:
/* copy partition offset */
- if (sbi->lfs_off != lastblk)
+ if ((daddr_t)sbi->lfs_off != lastblk)
sbi->lfs_off = BLK_CNT - (LFS_LABELPAD / 512);
break;
case SECOND_SBLOCK_ADDRESS: