We usually set a variable first, then constant.
if (r < 0)
return 0;
- if (streq("infinity", p))
+ if (streq(p, "infinity"))
num = CGROUP_LIMIT_MAX;
else {
r = parse_size(p, 1000, &num);
/* 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)
ASSERT_OK(sd_netlink_message_enter_container(m, IFLA_LINKINFO));
ASSERT_OK(sd_netlink_message_read_string(m, IFLA_INFO_KIND, &string_data));
- ASSERT_STREQ("vlan", string_data);
+ ASSERT_STREQ(string_data, "vlan");
ASSERT_OK(sd_netlink_message_enter_container(m, IFLA_INFO_DATA));
ASSERT_OK(sd_netlink_message_read_u16(m, IFLA_VLAN_ID, &u16_data));
ASSERT_OK(sd_netlink_message_exit_container(m));
ASSERT_OK(sd_netlink_message_read_string(m, IFLA_INFO_KIND, &string_data));
- ASSERT_STREQ("vlan", string_data);
+ ASSERT_STREQ(string_data, "vlan");
ASSERT_OK(sd_netlink_message_exit_container(m));
ASSERT_FAIL(sd_netlink_message_read_u32(m, IFLA_LINKINFO, &u32_data));
r = chase(p, NULL, CHASE_STEP, &result, NULL);
assert_se(r == 0);
- ASSERT_STREQ("/usr", result);
+ ASSERT_STREQ(result, "/usr");
result = mfree(result);
r = chase("/usr", NULL, CHASE_STEP, &result, NULL);
assert_se(r > 0);
- ASSERT_STREQ("/usr", result);
+ ASSERT_STREQ(result, "/usr");
result = mfree(result);
/* Make sure that symlinks in the "root" path are not resolved, but those below are */