]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cryptsetup: use PATH_IN_SET() instead of STR_IN_SET() when comparing paths 10293/head
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 6c4aabe57db305ce960f02c5b356bc9ef60845ef..cada032bb9846b84d6e079f9dbb6ac335a75f9bc 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;