diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-11 16:02:03 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-13 10:52:40 +0200 |
commit | 5d904a6aaaceae7fe2f11d6b848b0dd45e3fd1c4 (patch) | |
tree | b030bb7f74e44a28676f91d05faae95ed0c80a94 /src/network | |
parent | test-alloc-util: add a "test" for bool casts (diff) | |
download | systemd-5d904a6aaaceae7fe2f11d6b848b0dd45e3fd1c4.tar.xz systemd-5d904a6aaaceae7fe2f11d6b848b0dd45e3fd1c4.zip |
tree-wide: drop !! casts to booleans
They are not needed, because anything that is non-zero is converted
to true.
C11:
> 6.3.1.2: When any scalar value is converted to _Bool, the result is 0 if the
> value compares equal to 0; otherwise, the result is 1.
https://stackoverflow.com/questions/31551888/casting-int-to-bool-in-c-c
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-dhcp6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c index e9db977036..3f8346fee8 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -406,7 +406,7 @@ int dhcp6_request_address(Link *link, int ir) { if (r < 0) return r; else - running = !!r; + running = r; if (running) { r = sd_dhcp6_client_get_information_request(link->dhcp6_client, &inf_req); |