]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sfdisk: Fix format specifiers for size_t
authorThierry Reding <thierry.reding@avionic-design.de>
Wed, 19 Sep 2012 09:48:46 +0000 (11:48 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 21 Sep 2012 10:14:04 +0000 (12:14 +0200)
The proper specifier for size_t is %zu. %lu will work fine on 64-bit
architectures but not on 32-bit.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
fdisks/sfdisk.c

index 2027202ad429e989f42036bf777e09739ea9172e..da5c60612ae3d340c6d3adeb29415ff4ac46f7d2 100644 (file)
@@ -1426,7 +1426,7 @@ extended_partition(char *dev, int fd, struct part_desc *ep, struct disk_desc *z)
        cp = s->data + 0x1be;
 
        if (pno + 4 >= ARRAY_SIZE(z->partitions)) {
-           warnx(_("too many partitions - ignoring those past nr (%ld)\n"),
+           warnx(_("too many partitions - ignoring those past nr (%zu)\n"),
                    pno - 1);
            break;
        }
@@ -1504,7 +1504,7 @@ bsd_partition(char *dev, int fd, struct part_desc *ep, struct disk_desc *z) {
     while (bp - bp0 < BSD_MAXPARTITIONS && bp - bp0 < l->d_npartitions) {
        if (pno + 1 >= ARRAY_SIZE(z->partitions)) {
            warnx(_("too many partitions - ignoring those "
-                     "past nr (%ld)\n"), pno - 1);
+                     "past nr (%zu)\n"), pno - 1);
            break;
        }
        if (bp->p_fstype != BSD_FS_UNUSED) {