From 59ac467dc6429a48522ef7fbe40fcd819563e49a Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 17 Sep 2021 01:13:58 +0200 Subject: 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 --- archival/ar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'archival/ar.c') diff --git a/archival/ar.c b/archival/ar.c index 71f949e..320cbae 100644 --- a/archival/ar.c +++ b/archival/ar.c @@ -196,9 +196,10 @@ static int write_ar_archive(archive_handle_t *handle) static void FAST_FUNC header_verbose_list_ar(const file_header_t *file_header) { - const char *mode = bb_mode_string(file_header->mode); + char mode[12]; char *mtime; + bb_mode_string(mode, file_header->mode); mtime = ctime(&file_header->mtime); mtime[16] = ' '; memmove(&mtime[17], &mtime[20], 4); -- cgit v1.1