tree-wide: swap arguments for streq()

We usually set a variable first, then constant.
This commit is contained in:
Yu Watanabe
2025-11-16 14:01:56 +09:00
parent 33b2dc77bd
commit a112c7646b
4 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -75,13 +75,13 @@ static const char *integrity_algorithm_select(const void *key_file_buf) {
/* To keep a bit of sanity for end users, the subset of integrity
algorithms we support will match what is used in integritysetup */
if (arg_integrity_algorithm) {
if (streq("hmac-sha256", arg_integrity_algorithm))
if (streq(arg_integrity_algorithm, "hmac-sha256"))
return DM_HMAC_256;
if (streq("hmac-sha512", arg_integrity_algorithm))
if (streq(arg_integrity_algorithm, "hmac-sha512"))
return DM_HMAC_512;
if (streq("phmac-sha256", arg_integrity_algorithm))
if (streq(arg_integrity_algorithm, "phmac-sha256"))
return DM_PHMAC_256;
if (streq("phmac-sha512", arg_integrity_algorithm))
if (streq(arg_integrity_algorithm, "phmac-sha512"))
return DM_PHMAC_512;
return arg_integrity_algorithm;
} else if (key_file_buf)