diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-05-23 10:08:18 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-05-23 11:06:31 +0200 |
commit | 7ee41feba6b834d9e17e634bfbf222c4d8dd1a4f (patch) | |
tree | cae31634fe857b963791bf3697bdae20312acc2e /time/lc-time-cleanup.c | |
parent | bbebe83a2874cd25934046d908824dfc11711a2b (diff) | |
download | glibc-7ee41feba6b834d9e17e634bfbf222c4d8dd1a4f.tar.gz glibc-7ee41feba6b834d9e17e634bfbf222c4d8dd1a4f.tar.xz glibc-7ee41feba6b834d9e17e634bfbf222c4d8dd1a4f.zip |
locale: Remove private union from struct __locale_data
This avoids an alias violation later. This commit also fixes an incorrect double-checked locking idiom in _nl_init_era_entries. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'time/lc-time-cleanup.c')
-rw-r--r-- | time/lc-time-cleanup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/time/lc-time-cleanup.c b/time/lc-time-cleanup.c index f844e04905..bcf6d2fbc9 100644 --- a/time/lc-time-cleanup.c +++ b/time/lc-time-cleanup.c @@ -22,10 +22,10 @@ void _nl_cleanup_time (struct __locale_data *locale) { - struct lc_time_data *const data = locale->private.time; + struct lc_time_data *const data = locale->private; if (data != NULL) { - locale->private.time = NULL; + locale->private = NULL; free (data->eras); free (data->alt_digits); |