]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: fix compiler warning [-Wpointer-sign]
authorKarel Zak <kzak@redhat.com>
Wed, 6 Jun 2012 08:53:20 +0000 (10:53 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 6 Jun 2012 08:53:20 +0000 (10:53 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk/utils.c

index 94b8bd84efa6974d76d17c069db44dcf60b5abaf..4d838412c8971b8c83daf409ac8b0c370925fbe1 100644 (file)
@@ -33,7 +33,7 @@ int fdisk_debug_mask;
 
 static unsigned long __get_sector_size(int fd)
 {
-       unsigned int sect_sz;
+       int sect_sz;
 
        if (!blkdev_get_sector_size(fd, &sect_sz))
                return (unsigned long) sect_sz;
@@ -74,8 +74,10 @@ static int __discover_topology(struct fdisk_context *cxt)
 #endif
 
        /* no blkid or error, use default values */
-       if (!cxt->min_io_size)      cxt->min_io_size = DEFAULT_SECTOR_SIZE;
-       if (!cxt->io_size)          cxt->io_size = DEFAULT_SECTOR_SIZE;
+       if (!cxt->min_io_size)
+               cxt->min_io_size = DEFAULT_SECTOR_SIZE;
+       if (!cxt->io_size)
+               cxt->io_size = DEFAULT_SECTOR_SIZE;
 
        cxt->sector_size = __get_sector_size(cxt->dev_fd);
        if (!cxt->phy_sector_size) /* could not discover physical size */