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 --- include/libbb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 6727c22b2..b0312e5d4 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -442,7 +442,7 @@ void *xmmap_anon(size_t size) FAST_FUNC; //TODO: supply a pointer to char[11] buffer (avoid statics)? -extern const char *bb_mode_string(mode_t mode) FAST_FUNC; +extern char *bb_mode_string(char buf[12], mode_t mode) FAST_FUNC; extern int is_directory(const char *name, int followLinks) FAST_FUNC; enum { /* cp.c, mv.c, install.c depend on these values. CAREFUL when changing them! */ FILEUTILS_PRESERVE_STATUS = 1 << 0, /* -p */ -- cgit v1.2.3