Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYU Jincheng <shana@zju.edu.cn>2021-10-09 21:19:51 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2021-10-09 23:30:45 +0300
commit5156b245536ce0f07165793f07c63fd9fa5dd3b7 (patch)
tree3b73b7ea8ed1830d9cc13cbce1da6918926553e2 /libbb/lineedit.c
parent04ad683bf99333c2a6c6fd6549faa67978ad9a98 (diff)
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 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 3c87abcf9..9960448ec 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -214,7 +214,7 @@ extern struct lineedit_statics *BB_GLOBAL_CONST lineedit_ptr_to_statics;
#define delbuf (S.delbuf )
#define INIT_S() do { \
- ASSIGN_CONST_PTR(lineedit_ptr_to_statics, xzalloc(sizeof(S))); \
+ XZALLOC_CONST_PTR(&lineedit_ptr_to_statics, sizeof(S)); \
} while (0)
static void deinit_S(void)