Fix signed/unsigned comparison compiler warning.
This commit is contained in:
parent
780e069c49
commit
ea07ab3fd9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173721
@ -343,7 +343,7 @@ virstor_label(struct gctl_req *req)
|
|||||||
"%s: %s.", name, strerror(errno));
|
"%s: %s.", name, strerror(errno));
|
||||||
return;
|
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);
|
gctl_error(req, "Device %s is too small", name);
|
||||||
error = g_metadata_clear(name, NULL);
|
error = g_metadata_clear(name, NULL);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
@ -429,7 +429,7 @@ virstor_label(struct gctl_req *req)
|
|||||||
if (verbose)
|
if (verbose)
|
||||||
printf("(%u chunks) ", md.chunk_count);
|
printf("(%u chunks) ", md.chunk_count);
|
||||||
/* Check to make sure last sector is unused */
|
/* 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_count--;
|
||||||
md.chunk_next = 0;
|
md.chunk_next = 0;
|
||||||
if (i != 1) {
|
if (i != 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user