]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Use IN_SET() in one more place
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 21 Nov 2022 09:28:36 +0000 (10:28 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 21 Nov 2022 09:28:36 +0000 (10:28 +0100)
src/partition/repart.c

index 07efcd2857b8c6f3c68f956e0e9cb48195599e41..b4ef7b8e34b527c7000e71a46014b83002652819 100644 (file)
@@ -1643,9 +1643,7 @@ static int partition_read_definition(Partition *p, const char *path, const char
                                   verity_mode_to_string(p->verity));
 
         /* Verity partitions are read only, let's imply the RO flag hence, unless explicitly configured otherwise. */
-        if ((p->type.designator == PARTITION_ROOT_VERITY ||
-             p->type.designator == PARTITION_USR_VERITY) &&
-            p->read_only < 0)
+        if (IN_SET(p->type.designator, PARTITION_ROOT_VERITY, PARTITION_USR_VERITY) && p->read_only < 0)
                 p->read_only = true;
 
         /* Default to "growfs" on, unless read-only */