chiark / gitweb /
tree-wide: avoid assignment of r just to use in a comparison
[elogind.git] / src / core / cgroup.c
index 34ff984df5ad79b2b3c2d8dd05fd065d36ded148..a1e66864b42ad1975374e23cba1c525a513d884e 100644 (file)
@@ -309,13 +309,11 @@ void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix) {
 
 static int lookup_block_device(const char *p, dev_t *dev) {
         struct stat st;
-        int r;
 
         assert(p);
         assert(dev);
 
-        r = stat(p, &st);
-        if (r < 0)
+        if (stat(p, &st) < 0)
                 return log_warning_errno(errno, "Couldn't stat device %s: %m", p);
 
         if (S_ISBLK(st.st_mode))