summaryrefslogtreecommitdiff
path: root/src/locale
diff options
context:
space:
mode:
Diffstat (limited to 'src/locale')
-rw-r--r--src/locale/setlocale.c7
-rw-r--r--src/locale/uselocale.c10
2 files changed, 2 insertions, 15 deletions
diff --git a/src/locale/setlocale.c b/src/locale/setlocale.c
index 8ea389a3..d797f43f 100644
--- a/src/locale/setlocale.c
+++ b/src/locale/setlocale.c
@@ -55,12 +55,7 @@ char *setlocale(int cat, const char *name)
return buf;
}
- if (name) {
- int adj = libc.global_locale.ctype_utf8;
- __setlocalecat(&libc.global_locale, cat, name);
- adj -= libc.global_locale.ctype_utf8;
- if (adj) a_fetch_add(&libc.bytelocale_cnt_minus_1, adj);
- }
+ if (name) __setlocalecat(&libc.global_locale, cat, name);
switch (cat) {
case LC_CTYPE:
diff --git a/src/locale/uselocale.c b/src/locale/uselocale.c
index 51067957..b70a0c18 100644
--- a/src/locale/uselocale.c
+++ b/src/locale/uselocale.c
@@ -10,15 +10,7 @@ locale_t __uselocale(locale_t new)
if (new == LC_GLOBAL_LOCALE) new = global;
- if (new && new != old) {
- int adj = 0;
- if (new == global) a_dec(&libc.uselocale_cnt);
- else if (!new->ctype_utf8) adj++;
- if (old == global) a_inc(&libc.uselocale_cnt);
- else if (!old->ctype_utf8) adj--;
- a_fetch_add(&libc.bytelocale_cnt_minus_1, adj);
- self->locale = new;
- }
+ self->locale = new;
return old == global ? LC_GLOBAL_LOCALE : old;
}