aboutsummaryrefslogtreecommitdiff
path: root/util-linux/fdisk_osf.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-10-04 16:45:04 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-10-04 16:45:04 +0200
commitd8e4ce05039a89c2e0b41f008d74a83db45f2287 (patch)
tree147536311a6c19a12b331b02dd6b2819b48fae23 /util-linux/fdisk_osf.c
parent65741d004ee91c5a710559ae4f1664f25009255e (diff)
downloadbusybox-d8e4ce05039a89c2e0b41f008d74a83db45f2287.tar.gz
fdisk: avoid overflow in "mega/gigabytes" calculation, code shrink
function old new delta list_disk_geometry 175 145 -30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/fdisk_osf.c')
-rw-r--r--util-linux/fdisk_osf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c
index 1328c1fcd..92180b2bc 100644
--- a/util-linux/fdisk_osf.c
+++ b/util-linux/fdisk_osf.c
@@ -470,7 +470,7 @@ xbsd_new_part(void)
end = xbsd_dlabel.d_secperunit - 1;
#endif
- snprintf(mesg, sizeof(mesg), "First %s", str_units(SINGULAR));
+ snprintf(mesg, sizeof(mesg), "First %s", str_units());
begin = read_int(bsd_cround(begin), bsd_cround(begin), bsd_cround(end),
0, mesg);
@@ -478,7 +478,7 @@ xbsd_new_part(void)
begin = (begin - 1) * xbsd_dlabel.d_secpercyl;
snprintf(mesg, sizeof(mesg), "Last %s or +size or +sizeM or +sizeK",
- str_units(SINGULAR));
+ str_units());
end = read_int(bsd_cround(begin), bsd_cround(end), bsd_cround(end),
bsd_cround(begin), mesg);