cryptsetup: use PATH_IN_SET() instead of STR_IN_SET() when comparing paths
authorLennart Poettering <lennart@poettering.net>
Fri, 5 Oct 2018 20:39:02 +0000 (22:39 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 5 Oct 2018 20:39:02 +0000 (22:39 +0200)
It's formally more correct.

src/cryptsetup/cryptsetup-generator.c

index 6c4aabe..cada032 100644 (file)
@@ -192,7 +192,7 @@ static int create_disk(
                         netdev ? "remote-cryptsetup.target" : "cryptsetup.target");
 
         if (password) {
-                if (STR_IN_SET(password, "/dev/urandom", "/dev/random", "/dev/hw_random"))
+                if (PATH_IN_SET(password, "/dev/urandom", "/dev/random", "/dev/hw_random"))
                         fputs("After=systemd-random-seed.service\n", f);
                 else if (!STR_IN_SET(password, "-", "none")) {
                         _cleanup_free_ char *uu;