diff options
author | YU Jincheng | 2021-10-10 02:19:51 +0800 |
---|---|---|
committer | Denys Vlasenko | 2021-10-09 22:30:45 +0200 |
commit | 5156b245536ce0f07165793f07c63fd9fa5dd3b7 (patch) | |
tree | 3b73b7ea8ed1830d9cc13cbce1da6918926553e2 /coreutils | |
parent | 04ad683bf99333c2a6c6fd6549faa67978ad9a98 (diff) | |
download | busybox-5156b245536ce0f07165793f07c63fd9fa5dd3b7.zip busybox-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/test.c b/coreutils/test.c index fc95672..a914c74 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); \ |