diff options
author | YU Jincheng <shana@zju.edu.cn> | 2021-09-29 17:37:26 +0800 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-10-07 15:22:35 +0200 |
commit | 1f925038ab9c6bd8f6b3cd40ed7aab0ef10d898e (patch) | |
tree | a625455a60081738812f469de6a02010f0c5b252 /coreutils | |
parent | 17e6fb06b3d36eae11575b226858e8474e2b46d3 (diff) | |
download | busybox-w32-1f925038ab9c6bd8f6b3cd40ed7aab0ef10d898e.tar.gz busybox-w32-1f925038ab9c6bd8f6b3cd40ed7aab0ef10d898e.tar.bz2 busybox-w32-1f925038ab9c6bd8f6b3cd40ed7aab0ef10d898e.zip |
*: generalize "const trick"
While at it, change all "__asm__" to "asm"
Co-authored-by: canyie <31466456+canyie@users.noreply.github.com>
Signed-off-by: YU Jincheng <shana@zju.edu.cn>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/test.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/coreutils/test.c b/coreutils/test.c index 7c6574334..fc956724b 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -435,7 +435,7 @@ struct test_statics { | |||
435 | }; | 435 | }; |
436 | 436 | ||
437 | /* See test_ptr_hack.c */ | 437 | /* See test_ptr_hack.c */ |
438 | extern struct test_statics *const test_ptr_to_statics; | 438 | extern struct test_statics *BB_GLOBAL_CONST test_ptr_to_statics; |
439 | 439 | ||
440 | #define S (*test_ptr_to_statics) | 440 | #define S (*test_ptr_to_statics) |
441 | #define args (S.args ) | 441 | #define args (S.args ) |
@@ -446,8 +446,7 @@ extern struct test_statics *const test_ptr_to_statics; | |||
446 | #define leaving (S.leaving ) | 446 | #define leaving (S.leaving ) |
447 | 447 | ||
448 | #define INIT_S() do { \ | 448 | #define INIT_S() do { \ |
449 | (*(struct test_statics**)not_const_pp(&test_ptr_to_statics)) = xzalloc(sizeof(S)); \ | 449 | ASSIGN_CONST_PTR(test_ptr_to_statics, xzalloc(sizeof(S))); \ |
450 | barrier(); \ | ||
451 | } while (0) | 450 | } while (0) |
452 | #define DEINIT_S() do { \ | 451 | #define DEINIT_S() do { \ |
453 | free(group_array); \ | 452 | free(group_array); \ |