Module Name: src
Committed By: mhitch
Date: Mon May 4 18:09:04 UTC 2009
Modified Files:
src/sbin/disklabel: main.c
Log Message:
fix sign-compare issues in vax-specific code.
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sbin/disklabel/main.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/disklabel/main.c
diff -u src/sbin/disklabel/main.c:1.19 src/sbin/disklabel/main.c:1.20
--- src/sbin/disklabel/main.c:1.19 Sun Jul 20 01:20:22 2008
+++ src/sbin/disklabel/main.c Mon May 4 18:09:04 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.19 2008/07/20 01:20:22 lukem Exp $ */
+/* $NetBSD: main.c,v 1.20 2009/05/04 18:09:04 mhitch Exp $ */
/*
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
static char sccsid[] = "@(#)disklabel.c 8.4 (Berkeley) 5/4/95";
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
#else
-__RCSID("$NetBSD: main.c,v 1.19 2008/07/20 01:20:22 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.20 2009/05/04 18:09:04 mhitch Exp $");
#endif
#endif /* not lint */
@@ -549,7 +549,7 @@
}
alt = lab.d_ncylinders * lab.d_secpercyl - lab.d_nsectors;
- for (i = 1; i < 11 && i < lab.d_nsectors; i += 2) {
+ for (i = 1; i < 11 && (uint32_t)i < lab.d_nsectors; i += 2) {
if (pwrite(f, sec0, 512, (off_t)(alt + i) * 512) < 512)
warn("alternate label %d write", i/2);
}