From 9b181bf263b9d7c71b347542d945fe2467a495c6 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 9 Oct 2024 08:22:14 +0100 Subject: test: code shrink supplementary groups Since we don't use is_in_supplementary_groups() there's no need for the cached_groupinfo structure to include the members required for its support or for them to be initialised. Saves 32 bytes. --- include/libbb.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/libbb.h') diff --git a/include/libbb.h b/include/libbb.h index ed8892562..bc1453e12 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1268,8 +1268,12 @@ gid_t *bb_getgroups(int *ngroups, gid_t *group_array) FAST_FUNC; struct cached_groupinfo { uid_t euid; gid_t egid; +#if !ENABLE_PLATFORM_MINGW32 + // If these are ever restored on Windows it will be necessary to alter + // globals_misc_size()/globals_misc_copy() in ash. int ngroups; gid_t *supplementary_array; +#endif }; uid_t FAST_FUNC get_cached_euid(uid_t *euid); gid_t FAST_FUNC get_cached_egid(gid_t *egid); -- cgit v1.2.3-55-g6feb