chiark / gitweb /
util: detect systemd-nspawn without relying on ns cgroup tree
[elogind.git] / src / detect-virt.c
index 57f0176668d0b07d15ce26d3f944cd5d2422fcf3..324f182c7e5cae3fd36355b4a93d664892b7c5f3 100644 (file)
@@ -34,7 +34,8 @@ int main(int argc, char *argv[]) {
          * to detect whether we are being run in a virtualized
          * environment or not */
 
-        if ((r = detect_virtualization(&id)) < 0) {
+        r = detect_virtualization(&id);
+        if (r < 0) {
                 log_error("Failed to check for virtualization: %s", strerror(-r));
                 return EXIT_FAILURE;
         }