1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

network: a couple of tweaks suggested by Coccinelle

This commit is contained in:
Frantisek Sumsal 2021-12-17 20:16:18 +01:00 committed by Yu Watanabe
parent 14dd873b88
commit c0a2e0cc24
2 changed files with 4 additions and 5 deletions

View File

@ -139,7 +139,7 @@ int config_parse_ipoib_pkey(
rvalue);
return 0;
}
if (u == 0 || u == 0x8000) {
if (IN_SET(u, 0, 0x8000)) {
log_syntax(unit, LOG_WARNING, filename, line, 0,
"IPoIB pkey cannot be 0 nor 0x8000, ignoring assignment: %s",
rvalue);

View File

@ -358,10 +358,9 @@ int config_parse_address_generation_type(
addr = addr_alloc;
}
} else if (*addr == ',') {
comma = addr;
addr = NULL;
} else if (*addr == '\0') {
} else if (*addr == ',')
comma = TAKE_PTR(addr);
else if (*addr == '\0') {
comma = NULL;
addr = NULL;
} else {