diff options
author | Denys Vlasenko | 2021-09-17 01:13:58 +0200 |
---|---|---|
committer | Denys Vlasenko | 2021-09-17 01:18:31 +0200 |
commit | 59ac467dc6429a48522ef7fbe40fcd819563e49a (patch) | |
tree | 4b6af971b0ffc516294ff35ba7b5c1e99c6eadae /archival/libarchive | |
parent | 4958c18134eb7ad169cdaf22a9ad957ad4f4858c (diff) | |
download | busybox-59ac467dc6429a48522ef7fbe40fcd819563e49a.zip busybox-59ac467dc6429a48522ef7fbe40fcd819563e49a.tar.gz |
libbb: eliminate a static data array in bb_mode_string()
function old new delta
print_stat 861 869 +8
header_verbose_list_ar 73 77 +4
display_single 975 979 +4
header_verbose_list 237 239 +2
bb_mode_string 124 115 -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/1 up/down: 18/-9) Total: 9 bytes
text data bss dec hex filename
1043136 559 5052 1048747 1000ab busybox_old
1043153 559 5020 1048732 10009c busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive')
-rw-r--r-- | archival/libarchive/header_verbose_list.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/archival/libarchive/header_verbose_list.c b/archival/libarchive/header_verbose_list.c index be5140f..a575a08 100644 --- a/archival/libarchive/header_verbose_list.c +++ b/archival/libarchive/header_verbose_list.c @@ -9,6 +9,7 @@ void FAST_FUNC header_verbose_list(const file_header_t *file_header) { struct tm tm_time; struct tm *ptm = &tm_time; //localtime(&file_header->mtime); + char modestr[12]; #if ENABLE_FEATURE_TAR_UNAME_GNAME char uid[sizeof(int)*3 + 2]; @@ -29,7 +30,7 @@ void FAST_FUNC header_verbose_list(const file_header_t *file_header) group = utoa(file_header->gid); } printf("%s %s/%s %9"OFF_FMT"u %4u-%02u-%02u %02u:%02u:%02u %s", - bb_mode_string(file_header->mode), + bb_mode_string(modestr, file_header->mode), user, group, file_header->size, @@ -46,7 +47,7 @@ void FAST_FUNC header_verbose_list(const file_header_t *file_header) localtime_r(&file_header->mtime, ptm); printf("%s %u/%u %9"OFF_FMT"u %4u-%02u-%02u %02u:%02u:%02u %s", - bb_mode_string(file_header->mode), + bb_mode_string(modestr, file_header->mode), (unsigned)file_header->uid, (unsigned)file_header->gid, file_header->size, |