chiark / gitweb /
job: change red [ABORT] status to yellow [DEPEND]
[elogind.git] / src / core / dbus-manager.c
index 2e6bc3dfec885a02a9323c3ce3024d2b64be6677..6ad198436ad89af5b9074eafd8d595728ab2e0f4 100644 (file)
@@ -310,13 +310,14 @@ static int bus_manager_append_tainted(DBusMessageIter *i, const char *property,
                 free(p);
 
         if (access("/proc/cgroups", F_OK) < 0)
-                stpcpy(e, "cgroups-missing:");
+                e = stpcpy(e, "cgroups-missing:");
 
         if (hwclock_is_localtime() > 0)
-                stpcpy(e, "local-hwclock:");
+                e = stpcpy(e, "local-hwclock:");
 
-        if (endswith(buf, ":"))
-                buf[strlen(buf)-1] = 0;
+        /* remove the last ':' */
+        if (e != buf)
+                e[-1] = 0;
 
         t = buf;