chiark / gitweb /
dbus-scope: initialize variable before accessing
authorDave Reisner <dreisner@archlinux.org>
Tue, 2 Jul 2013 14:44:02 +0000 (10:44 -0400)
committerDave Reisner <dreisner@archlinux.org>
Tue, 2 Jul 2013 14:44:02 +0000 (10:44 -0400)
src/core/dbus-scope.c

index 0205cff..771820c 100644 (file)
@@ -93,7 +93,7 @@ static int bus_scope_set_transient_property(
 
         if (streq(name, "PIDs")) {
                 DBusMessageIter sub;
-                unsigned n;
+                unsigned n = 0;
 
                 if (dbus_message_iter_get_arg_type(i) != DBUS_TYPE_ARRAY ||
                     dbus_message_iter_get_element_type(i) != DBUS_TYPE_UINT32)