From 7ee41feba6b834d9e17e634bfbf222c4d8dd1a4f Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 23 May 2022 10:08:18 +0200 Subject: 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 --- time/lc-time-cleanup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'time/lc-time-cleanup.c') 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); -- cgit 1.4.1