chiark / gitweb /
Use initalization instead of explicit zeroing
[elogind.git] / src / locale / localed.c
index 60083b7681e89e7bbf69b2d9ce78b26e175f3f0e..23fbde0df13a84916c4994fa677509c61b16f9cd 100644 (file)
@@ -355,7 +355,7 @@ static int write_data_locale(void) {
         int r, p;
         char **l = NULL;
 
-        r = load_env_file("/etc/locale.conf", &l);
+        r = load_env_file("/etc/locale.conf", NULL, &l);
         if (r < 0 && r != -ENOENT)
                 return r;
 
@@ -494,7 +494,7 @@ static int write_data_vconsole(void) {
         int r;
         char **l = NULL;
 
-        r = load_env_file("/etc/vconsole.conf", &l);
+        r = load_env_file("/etc/vconsole.conf", NULL, &l);
         if (r < 0 && r != -ENOENT)
                 return r;
 
@@ -1011,7 +1011,7 @@ static DBusHandlerResult locale_message_handler(
                 dbus_bool_t interactive;
                 DBusMessageIter iter;
                 bool modified = false;
-                bool passed[_PROP_MAX];
+                bool passed[_PROP_MAX] = {};
                 int p;
 
                 if (!dbus_message_iter_init(message, &iter))
@@ -1033,8 +1033,6 @@ static DBusHandlerResult locale_message_handler(
 
                 dbus_message_iter_get_basic(&iter, &interactive);
 
-                zero(passed);
-
                 /* Check whether a variable changed and if so valid */
                 STRV_FOREACH(i, l) {
                         bool valid = false;