chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97e3d13
)
locale: unset locale vars that are not set any longer
author
Lennart Poettering
<lennart@poettering.net>
Mon, 20 Sep 2010 23:40:34 +0000
(
01:40
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 20 Sep 2010 23:40:34 +0000
(
01:40
+0200)
src/locale-setup.c
patch
|
blob
|
history
diff --git
a/src/locale-setup.c
b/src/locale-setup.c
index ae7529801b9510dd7c7c18add984d3aa08d505a0..8ead9fdd9d27891835188dfd3dee491e2eac4648 100644
(file)
--- a/
src/locale-setup.c
+++ b/
src/locale-setup.c
@@
-166,15
+166,15
@@
int locale_setup(void) {
for (i = 0; i < _VARIABLE_MAX; i++) {
- if (!variables[i])
- continue;
-
- if (setenv(variable_names[i], variables[i], 1) < 0) {
- r = -errno;
- goto finish;
- }
-
+ if (variables[i]) {
+ if (setenv(variable_names[i], variables[i], 1) < 0) {
+ r = -errno;
+ goto finish;
+ }
+ } else
+ unsetenv(variable_names[i]);
}
+
r = 0;
finish: