summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko2013-09-06 12:53:14 +0200
committerDenys Vlasenko2013-09-06 12:53:14 +0200
commita407cf74cc43c3cc26168e259cee469a4787a76c (patch)
tree2306029e1ea7b957825b55e3728d23c886da58dd /util-linux
parentd6ae4fb446daedfe3073d67be655942e9fa7eb18 (diff)
downloadbusybox-a407cf74cc43c3cc26168e259cee469a4787a76c.zip
busybox-a407cf74cc43c3cc26168e259cee469a4787a76c.tar.gz
Make smart_ulltoa return pointer to end (allows for code shink in callers)
function old new delta smart_ulltoa5 405 408 +3 smart_ulltoa4 273 276 +3 list_table 1113 1114 +1 scale 36 34 -2 put_lu 55 53 -2 ulltoa6_and_space 19 14 -5 powertop_main 1470 1461 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fdisk_gpt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/util-linux/fdisk_gpt.c b/util-linux/fdisk_gpt.c
index f45f68a..5786d5f 100644
--- a/util-linux/fdisk_gpt.c
+++ b/util-linux/fdisk_gpt.c
@@ -93,9 +93,7 @@ gpt_list_table(int xtra UNUSED_PARAM)
int i;
char numstr6[6];
- numstr6[5] = '\0';
-
- smart_ulltoa5(total_number_of_sectors * sector_size, numstr6, " KMGTPEZY");
+ smart_ulltoa5(total_number_of_sectors * sector_size, numstr6, " KMGTPEZY")[0] = '\0';
printf("Disk %s: %llu sectors, %s\n", disk_device,
(unsigned long long)total_number_of_sectors,
numstr6);
@@ -113,7 +111,7 @@ gpt_list_table(int xtra UNUSED_PARAM)
gpt_partition *p = gpt_part(i);
if (p->lba_start) {
smart_ulltoa5((1 + SWAP_LE64(p->lba_end) - SWAP_LE64(p->lba_start)) * sector_size,
- numstr6, " KMGTPEZY");
+ numstr6, " KMGTPEZY")[0] = '\0';
printf("%4u %15llu %15llu %11s %04x ",
i + 1,
(unsigned long long)SWAP_LE64(p->lba_start),