Change the return type of freelocale(3) to void.

Our version of this function currently returns an integer indicating
failure or success, whereas POSIX specifies that this function has no
return value. It returns void. Patch up the header, sources and man page
to use the right type. While there, use the opportunity to simplify the
body of this function.

Theoretically speaking, this change breaks the ABI of this function.
That said, I have yet to find any code that makes use of freelocale()'s
return value. I couldn't find any of it in the base system, nor did an
exp-run reveal any breakage caused by this change.

PR:		211394 (exp-run)
This commit is contained in:
Ed Schouten
2016-07-29 17:18:47 +00:00
parent 6bd57d14ed
commit 718fe473dd
3 changed files with 15 additions and 26 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ typedef struct _xlocale *locale_t;
#endif
locale_t duplocale(locale_t base);
int freelocale(locale_t loc);
void freelocale(locale_t loc);
locale_t newlocale(int mask, const char *locale, locale_t base);
const char *querylocale(int mask, locale_t loc);
locale_t uselocale(locale_t loc);