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/shared/condition.c | |
| parent | 37e744e8661c3edd8b8efa723a3d3c71f73ef542 (diff) | |
| download | systemd-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/shared/condition.c')
| -rw-r--r-- | src/shared/condition.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/condition.c b/src/shared/condition.c index a41a782664..18ab1f89f9 100644 --- a/src/shared/condition.c +++ b/src/shared/condition.c @@ -103,7 +103,7 @@ static int condition_test_kernel_command_line(Condition *c) { if (r < 0) return r; - equal = !!strchr(c->parameter, '='); + equal = strchr(c->parameter, '='); for (p = line;;) { _cleanup_free_ char *word = NULL; |
