]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shutdown: don't compare pointers with 0
authorLennart Poettering <lennart@poettering.net>
Tue, 22 Sep 2020 09:21:19 +0000 (11:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 23 Sep 2020 16:33:48 +0000 (18:33 +0200)
src/shutdown/umount.c

index 307944c65751333aa110a7ddb197a2148f709ccf..4354485728363585211c42d66e74ce9c7b4453d8 100644 (file)
@@ -474,11 +474,11 @@ static int delete_dm(dev_t devnum) {
 }
 
 static int delete_md(MountPoint *m) {
-
         _cleanup_close_ int fd = -1;
 
+        assert(m);
         assert(major(m->devnum) != 0);
-        assert(m->path != 0);
+        assert(m->path);
 
         fd = open(m->path, O_RDONLY|O_CLOEXEC|O_EXCL);
         if (fd < 0)