From 24688fcbd1f219bdd16b0047a9b57581a6fb4af6 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 11 Jun 2004 11:41:33 +0000 Subject: Cast the arguments to make_h_number() to uintmax_t before multiplying them... Otherwise the result will be truncated anyway. --- sbin/sunlabel/sunlabel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/sunlabel') diff --git a/sbin/sunlabel/sunlabel.c b/sbin/sunlabel/sunlabel.c index ecf2755..11a73ac 100644 --- a/sbin/sunlabel/sunlabel.c +++ b/sbin/sunlabel/sunlabel.c @@ -805,9 +805,9 @@ print_label(struct sun_disklabel *sl, const char *disk, FILE *out) if (hflag) { fprintf(out, " %c: %10s", 'a' + i, - make_h_number(sl->sl_part[i].sdkp_nsectors * 512)); + make_h_number((uintmax_t)sl->sl_part[i].sdkp_nsectors * 512)); fprintf(out, " %10s", - make_h_number(sl->sl_part[i].sdkp_cyloffset * + make_h_number((uintmax_t)sl->sl_part[i].sdkp_cyloffset * 512 * secpercyl)); } else { fprintf(out, " %c: %10ju %10u", -- cgit v1.1