chiark / gitweb /
core: busname_supported() should cache what it detects
[elogind.git] / src / core / busname.c
index ca9ceb8c3c32d0249af24b8e5c0c603095a44610..1d77292f9b9d98ec40ee36ed353a9e47bc4439c9 100644 (file)
@@ -205,7 +205,7 @@ static int busname_verify(BusName *n) {
                 return -EINVAL;
         }
 
-        e = strappenda(n->name, ".busname");
+        e = strjoina(n->name, ".busname");
         if (!unit_has_name(UNIT(n), e)) {
                 log_unit_error(UNIT(n)->id, "%s's Name= setting doesn't match unit name. Refusing.", UNIT(n)->id);
                 return -EINVAL;
@@ -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)