X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flocale%2Flocaled.c;h=e160c046a47924b9ad89425a342c454f4a1b6933;hb=8b179a830a789746cce0be6671e2de235e3b0ea9;hp=60083b7681e89e7bbf69b2d9ce78b26e175f3f0e;hpb=c6a818c82035da91e7987920510f0dda61d8781a;p=elogind.git diff --git a/src/locale/localed.c b/src/locale/localed.c index 60083b768..e160c046a 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -118,21 +118,7 @@ static const char * const names[_PROP_MAX] = { [PROP_LC_IDENTIFICATION] = "LC_IDENTIFICATION" }; -static char *data[_PROP_MAX] = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL -}; +static char *data[_PROP_MAX] = {}; typedef struct State { char *x11_layout, *x11_model, *x11_variant, *x11_options; @@ -355,7 +341,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 +480,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 +997,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 +1019,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;