diff options
Diffstat (limited to 'locale/newlocale.c')
-rw-r--r-- | locale/newlocale.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/locale/newlocale.c b/locale/newlocale.c index 19e65e29f2..4a785d0c0f 100644 --- a/locale/newlocale.c +++ b/locale/newlocale.c @@ -163,10 +163,12 @@ __newlocale (int category_mask, const char *locale, __locale_t base) if (result_ptr == NULL) return NULL; - *result_ptr = result; } else - *(result_ptr = base) = result; + /* We modify the base structure. */ + result_ptr = base; + + *result_ptr = result; /* Update the special members. */ update: |