diff mbox

search locale archive again after alias expansion

Message ID orioep1apr.fsf@livre.home
State New
Headers show

Commit Message

Alexandre Oliva Feb. 26, 2015, 5:52 a.m. UTC
On Feb 20, 2015, "Carlos O'Donell" <carlos@redhat.com> wrote:

>> for  ChangeLog
>> 
>> [BZ #15969]
>> * locale/findlocale.c (_nl_find_locale): Retry archive search
>> after alias expansion.
>> * NEWS: Updated.

> OK to checkin.

I did, and then my dtv-fix build failed due to a missing const typecast
in the patch above.  I didn't check whether the prototype of
_nl_load_locale_from_archive changed so as to require a const char **,
or whether this is a result of the warning tightening, but I'm putting
in this amendment for now, while I test a more adequade fix.


	[BZ #15969]
	* locale/findlocale.c (_nl_find_locale): Fix constness error in
	the previous change.

Comments

Andreas Schwab Feb. 26, 2015, 9:38 a.m. UTC | #1
Alexandre Oliva <aoliva@redhat.com> writes:

> diff --git a/locale/findlocale.c b/locale/findlocale.c
> index 360f58b..5e2639b 100644
> --- a/locale/findlocale.c
> +++ b/locale/findlocale.c
> @@ -161,7 +161,8 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
>        loc_name = (char *) _nl_expand_alias (*name);
>        if (loc_name != NULL)
>  	{
> -	  data = _nl_load_locale_from_archive (category, &loc_name);
> +	  data = _nl_load_locale_from_archive (category,
> +					       (const char **) &loc_name);

Can't you make loc_name a pointer to const?

Andreas.
diff mbox

Patch

diff --git a/locale/findlocale.c b/locale/findlocale.c
index 360f58b..5e2639b 100644
--- a/locale/findlocale.c
+++ b/locale/findlocale.c
@@ -161,7 +161,8 @@  _nl_find_locale (const char *locale_path, size_t locale_path_len,
       loc_name = (char *) _nl_expand_alias (*name);
       if (loc_name != NULL)
 	{
-	  data = _nl_load_locale_from_archive (category, &loc_name);
+	  data = _nl_load_locale_from_archive (category,
+					       (const char **) &loc_name);
 	  if (__builtin_expect (data != NULL, 1))
 	    return data;
 	}