From bbebe83a2874cd25934046d908824dfc11711a2b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 23 May 2022 10:08:18 +0200 Subject: locale: Remove cleanup function pointer from struct __localedata We can call the cleanup functions directly from _nl_unload_locale if we pass the category to it. Reviewed-by: Adhemerval Zanella --- time/alt_digit.c | 2 -- time/era.c | 1 - time/lc-time-cleanup.c | 1 - 3 files changed, 4 deletions(-) (limited to 'time') diff --git a/time/alt_digit.c b/time/alt_digit.c index ae22b3f927..7ed9b6b0a5 100644 --- a/time/alt_digit.c +++ b/time/alt_digit.c @@ -41,7 +41,6 @@ _nl_init_alt_digit (struct __locale_data *current) if (current->private.time == NULL) return; memset (current->private.time, 0, sizeof *current->private.time); - current->private.cleanup = &_nl_cleanup_time; } data = current->private.time; @@ -110,7 +109,6 @@ _nl_get_walt_digit (unsigned int number, struct __locale_data *current) if (current->private.time == NULL) goto out; memset (current->private.time, 0, sizeof *current->private.time); - current->private.cleanup = &_nl_cleanup_time; } data = current->private.time; diff --git a/time/era.c b/time/era.c index 43528ad0d2..d4b538c7b0 100644 --- a/time/era.c +++ b/time/era.c @@ -53,7 +53,6 @@ _nl_init_era_entries (struct __locale_data *current) if (current->private.time == NULL) goto out; memset (current->private.time, 0, sizeof *current->private.time); - current->private.cleanup = &_nl_cleanup_time; } data = current->private.time; diff --git a/time/lc-time-cleanup.c b/time/lc-time-cleanup.c index 2734e25815..f844e04905 100644 --- a/time/lc-time-cleanup.c +++ b/time/lc-time-cleanup.c @@ -26,7 +26,6 @@ _nl_cleanup_time (struct __locale_data *locale) if (data != NULL) { locale->private.time = NULL; - locale->private.cleanup = NULL; free (data->eras); free (data->alt_digits); -- cgit 1.4.1