chiark / gitweb /
core: busname_supported() should cache what it detects
authorJohannes Hölzl <johannes.hoelzl@gmx.de>
Tue, 3 Feb 2015 17:53:31 +0000 (18:53 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 3 Feb 2015 17:53:31 +0000 (18:53 +0100)
Add the missing "static" to actually make this a cache.

src/core/busname.c

index bc3a2bc..1d77292 100644 (file)
@@ -975,7 +975,7 @@ static int busname_get_timeout(Unit *u, uint64_t *timeout) {
 }
 
 static bool busname_supported(Manager *m) {
-        int supported = -1;
+        static int supported = -1;
         assert(m);
 
         if (supported < 0)