diff options
author | Joerg Wunsch <joerg@FreeBSD.org> | 2004-06-11 11:41:33 +0000 |
---|---|---|
committer | Joerg Wunsch <joerg@FreeBSD.org> | 2004-06-11 11:41:33 +0000 |
commit | 1c9fe2e4b28d0d6824ddce4f15bb9f957fd0d37c (patch) | |
tree | 89e1094d2dc29a992831399fa110df55063f23b9 /sbin/sunlabel | |
parent | 1930e303cfa1b9fe2c50fdad0d1ba6143311a53c (diff) | |
download | src-1c9fe2e4b28d0d6824ddce4f15bb9f957fd0d37c.tar.gz src-1c9fe2e4b28d0d6824ddce4f15bb9f957fd0d37c.zip |
Cast the arguments to make_h_number() to uintmax_t before multiplying
them... Otherwise the result will be truncated anyway.
Notes
Notes:
svn path=/head/; revision=130345
Diffstat (limited to 'sbin/sunlabel')
-rw-r--r-- | sbin/sunlabel/sunlabel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/sunlabel/sunlabel.c b/sbin/sunlabel/sunlabel.c index ecf2755486cd..11a73ace410d 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", |