]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: cast before count size
authorKarel Zak <kzak@redhat.com>
Tue, 31 Jul 2012 17:07:37 +0000 (19:07 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 31 Jul 2012 17:07:37 +0000 (19:07 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdisk.c

index fa202183bec443223972741a04c200923bf45b51..3a16c5f22068182c10e737d50df5ab2d73115be0 100644 (file)
@@ -1324,7 +1324,7 @@ void print_partition_size(struct fdisk_context *cxt,
                          int num, sector_t start, sector_t stop, int sysid)
 {
        char *str = size_to_human_string(SIZE_SUFFIX_3LETTER | SIZE_SUFFIX_SPACE,
-                                    (stop - start + 1) * cxt->sector_size);
+                                    (uint64_t)(stop - start + 1) * cxt->sector_size);
        printf(_("Partition %d of type %s and of size %s is set\n"), num, partition_type(sysid), str);
        free(str);
 }