[systemd-commits] src/locale-setup.c
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Sep 20 16:40:40 PDT 2010
src/locale-setup.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 8780d48d86d921a8245febdde7888cd89ad3631b
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Sep 21 01:40:34 2010 +0200
locale: unset locale vars that are not set any longer
diff --git a/src/locale-setup.c b/src/locale-setup.c
index ae75298..8ead9fd 100644
--- 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:
More information about the systemd-commits
mailing list