projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use inline syscalls for powerpc (32-bit)
[musl]
/
src
/
locale
/
uselocale.c
diff --git
a/src/locale/uselocale.c
b/src/locale/uselocale.c
index
b70a0c1
..
0fc5ecb
100644
(file)
--- a/
src/locale/uselocale.c
+++ b/
src/locale/uselocale.c
@@
-8,9
+8,7
@@
locale_t __uselocale(locale_t new)
locale_t old = self->locale;
locale_t global = &libc.global_locale;
locale_t old = self->locale;
locale_t global = &libc.global_locale;
- if (new == LC_GLOBAL_LOCALE) new = global;
-
- self->locale = new;
+ if (new) self->locale = new == LC_GLOBAL_LOCALE ? global : new;
return old == global ? LC_GLOBAL_LOCALE : old;
}
return old == global ? LC_GLOBAL_LOCALE : old;
}