diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/appletlib.c | 3 | ||||
-rw-r--r-- | libbb/lineedit.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 5c5d7eb..bf26c99 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -247,8 +247,7 @@ void lbb_prepare(const char *applet IF_FEATURE_INDIVIDUAL(, char **argv)) { #ifdef bb_cached_errno_ptr - (*(int **)not_const_pp(&bb_errno)) = get_perrno(); - barrier(); + ASSIGN_CONST_PTR(bb_errno, get_perrno()); #endif applet_name = applet; diff --git a/libbb/lineedit.c b/libbb/lineedit.c index a7a3ee1..3c87abc 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -192,7 +192,7 @@ struct lineedit_statics { }; /* See lineedit_ptr_hack.c */ -extern struct lineedit_statics *const lineedit_ptr_to_statics; +extern struct lineedit_statics *BB_GLOBAL_CONST lineedit_ptr_to_statics; #define S (*lineedit_ptr_to_statics) #define state (S.state ) @@ -214,8 +214,7 @@ extern struct lineedit_statics *const lineedit_ptr_to_statics; #define delbuf (S.delbuf ) #define INIT_S() do { \ - (*(struct lineedit_statics**)not_const_pp(&lineedit_ptr_to_statics)) = xzalloc(sizeof(S)); \ - barrier(); \ + ASSIGN_CONST_PTR(lineedit_ptr_to_statics, xzalloc(sizeof(S))); \ } while (0) static void deinit_S(void) |