From de18a7061c9bdff73d66502c55d6a3ea671fc6d9 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 5 Sep 2019 22:16:58 +0200 Subject: locale: Avoid zero-length array in _nl_category_names [BZ #24962] The union wrapper is unnecessary because C allows to read any object as a sequence of chars. Reviewed-by: Carlos O'Donell --- intl/dcigettext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'intl') diff --git a/intl/dcigettext.c b/intl/dcigettext.c index 4df93e2a8e..11f3749457 100644 --- a/intl/dcigettext.c +++ b/intl/dcigettext.c @@ -360,8 +360,7 @@ static const char *guess_category_value (int category, #ifdef _LIBC # include "../locale/localeinfo.h" -# define category_to_name(category) \ - _nl_category_names.str + _nl_category_name_idxs[category] +# define category_to_name(category) _nl_category_names_get (category) #else static const char *category_to_name (int category); #endif -- cgit 1.4.1