summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-10-17 21:44:59 +0200
committerDave Reisner <dreisner@archlinux.org>2012-10-17 21:44:59 +0200
commitf75cb30bf97f623417cc7ee4b1bcc5c36cdbeb20 (patch)
treecbc0ec9e6d9235ef1fd69ccfc0e2ae2d292bffe1
parenttimedatectl: properly initialize struct before decoding bus messages (diff)
downloadsystemd-f75cb30bf97f623417cc7ee4b1bcc5c36cdbeb20.tar.xz
systemd-f75cb30bf97f623417cc7ee4b1bcc5c36cdbeb20.zip
timedatectl: ensure n_zones is initialized
-rw-r--r--src/timedate/timedatectl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index e94a847bf1..2b5822b54e 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -358,7 +358,7 @@ static int zone_compare(const void *_a, const void *_b) {
static int list_timezones(DBusConnection *bus, char **args, unsigned n) {
_cleanup_fclose_ FILE *f = NULL;
_cleanup_strv_free_ char **zones = NULL;
- size_t n_zones;
+ size_t n_zones = 0;
char **i;
assert(args);