summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorYU Jincheng <shana@zju.edu.cn>2021-10-10 02:19:51 +0800
committerDenys Vlasenko <vda.linux@googlemail.com>2021-10-09 22:30:45 +0200
commit5156b245536ce0f07165793f07c63fd9fa5dd3b7 (patch)
tree3b73b7ea8ed1830d9cc13cbce1da6918926553e2 /coreutils
parent04ad683bf99333c2a6c6fd6549faa67978ad9a98 (diff)
downloadbusybox-5156b245536ce0f07165793f07c63fd9fa5dd3b7.tar.gz
Make const ptr assign as function call in clang
- This can act as memory barrier in clang to avoid read before assign of a const ptr Signed-off-by: LoveSy <shana@zju.edu.cn> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/test.c b/coreutils/test.c
index fc956724b..a914c7490 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -446,7 +446,7 @@ extern struct test_statics *BB_GLOBAL_CONST test_ptr_to_statics;
#define leaving (S.leaving )
#define INIT_S() do { \
- ASSIGN_CONST_PTR(test_ptr_to_statics, xzalloc(sizeof(S))); \
+ XZALLOC_CONST_PTR(&test_ptr_to_statics, sizeof(S)); \
} while (0)
#define DEINIT_S() do { \
free(group_array); \