tree-wide: drop () around the first argument of a ternary op

https://github.com/systemd/systemd/pull/24933#discussion_r991242789
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-10-11 16:59:00 +02:00
parent b413d4fd3e
commit 0b6a47957b
8 changed files with 16 additions and 17 deletions
+2 -3
View File
@@ -194,8 +194,7 @@ int in_addr_prefix_intersect(
assert(a);
assert(b);
/* Checks whether there are any addresses that are in both
* networks */
/* Checks whether there are any addresses that are in both networks */
m = MIN(aprefixlen, bprefixlen);
@@ -203,7 +202,7 @@ int in_addr_prefix_intersect(
uint32_t x, nm;
x = be32toh(a->in.s_addr ^ b->in.s_addr);
nm = (m == 0) ? 0 : 0xFFFFFFFFUL << (32 - m);
nm = m == 0 ? 0 : 0xFFFFFFFFUL << (32 - m);
return (x & nm) == 0;
}
+1 -1
View File
@@ -815,7 +815,7 @@ int wait_for_terminate_with_timeout(pid_t pid, usec_t timeout) {
if (status.si_pid == pid) {
/* This is the correct child. */
if (status.si_code == CLD_EXITED)
return (status.si_status == 0) ? 0 : -EPROTO;
return status.si_status == 0 ? 0 : -EPROTO;
else
return -EPROTO;
}