summaryrefslogtreecommitdiff
path: root/src/locale/newlocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/locale/newlocale.c')
-rw-r--r--src/locale/newlocale.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/locale/newlocale.c b/src/locale/newlocale.c
index 39501d0c..4e0cbd34 100644
--- a/src/locale/newlocale.c
+++ b/src/locale/newlocale.c
@@ -8,17 +8,16 @@ locale_t __newlocale(int mask, const char *name, locale_t loc)
int i;
if (!loc) {
- loc = calloc(1, sizeof *loc + LOCALE_NAME_MAX + 1);
+ loc = malloc(sizeof *loc);
if (!loc) return 0;
- loc->messages_name = (void *)(loc+1);
for (i=0; i<LC_ALL; i++)
if (!(mask & (1<<i)))
- __setlocalecat(loc, i, "");
+ loc->cat[i] = __get_locale(i, "");
}
for (i=0; i<LC_ALL; i++)
if (mask & (1<<i))
- __setlocalecat(loc, i, name);
+ loc->cat[i] = __get_locale(i, name);
return loc;
}