summaryrefslogtreecommitdiff
path: root/src/timedate/timedatectl.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-11 16:02:03 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-13 10:52:40 +0200
commit5d904a6aaaceae7fe2f11d6b848b0dd45e3fd1c4 (patch)
treeb030bb7f74e44a28676f91d05faae95ed0c80a94 /src/timedate/timedatectl.c
parent37e744e8661c3edd8b8efa723a3d3c71f73ef542 (diff)
downloadsystemd-5d904a6aaaceae7fe2f11d6b848b0dd45e3fd1c4.tar.gz
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/timedate/timedatectl.c')
-rw-r--r--src/timedate/timedatectl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index e52a64a9c5..f412082265 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -477,7 +477,7 @@ static int map_ntp_message(sd_bus *bus, const char *member, sd_bus_message *m, s
memcpy(p->reference.str, d, sz);
- p->spike = !!b;
+ p->spike = b;
return 0;
}