summaryrefslogtreecommitdiffstats
path: root/sbin/geom
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2007-11-18 03:17:56 +0000
committerjb <jb@FreeBSD.org>2007-11-18 03:17:56 +0000
commit19119333dfe9a5dba058312b5690fab5484fc099 (patch)
treec53dd69c64e0bcfabaa074bfddfbecbb405a7e9e /sbin/geom
parent3b7cf667bab519b63e0423ed5101523f39ba668c (diff)
downloadFreeBSD-src-19119333dfe9a5dba058312b5690fab5484fc099.zip
FreeBSD-src-19119333dfe9a5dba058312b5690fab5484fc099.tar.gz
Fix signed/unsigned comparison compiler warning.
Diffstat (limited to 'sbin/geom')
-rw-r--r--sbin/geom/class/virstor/geom_virstor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/geom/class/virstor/geom_virstor.c b/sbin/geom/class/virstor/geom_virstor.c
index 6b29bbe..b1d2cb4 100644
--- a/sbin/geom/class/virstor/geom_virstor.c
+++ b/sbin/geom/class/virstor/geom_virstor.c
@@ -343,7 +343,7 @@ virstor_label(struct gctl_req *req)
"%s: %s.", name, strerror(errno));
return;
}
- if (msize < MAX(md.md_chunk_size*4, map_size))
+ if (msize < (off_t) MAX(md.md_chunk_size*4, map_size))
gctl_error(req, "Device %s is too small", name);
error = g_metadata_clear(name, NULL);
if (error != 0) {
@@ -429,7 +429,7 @@ virstor_label(struct gctl_req *req)
if (verbose)
printf("(%u chunks) ", md.chunk_count);
/* Check to make sure last sector is unused */
- if ((off_t)(md.chunk_count) * md.md_chunk_size > msize-ssize)
+ if ((off_t)(md.chunk_count * md.md_chunk_size) > msize-ssize)
md.chunk_count--;
md.chunk_next = 0;
if (i != 1) {
OpenPOWER on IntegriCloud