diff options
author | Evegeny Vereshchagin <evvers@ya.ru> | 2018-06-26 02:32:44 +0000 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-06-28 13:17:29 +0900 |
commit | 283c2653877f2b958045ad99493869fe1a88be95 (patch) | |
tree | 00d24f3ee6c55a2a80afc5960c605405d22c3ce7 /src/libsystemd/sd-bus/bus-internal.h | |
parent | 874b5ad2488d75c6bbc4388ef0fd07e6a1baf4d0 (diff) | |
download | systemd-283c2653877f2b958045ad99493869fe1a88be95.tar.gz |
sd-bus: stop using the result of an assignment as an operand of &&
This makes OBJECT_PATH_FOREACH_PREFIX consistent with PATH_FOREACH_PREFIX
and also fixes 7 alerts reported by LGTM at
https://lgtm.com/projects/g/systemd/systemd/snapshot/ac0a08700344a5690803df8dd80e8bb5013184a5/files/src/libsystemd/sd-bus/bus-objects.c?sort=name&dir=ASC&mode=heatmap&showExcluded=true#V1383
Diffstat (limited to 'src/libsystemd/sd-bus/bus-internal.h')
-rw-r--r-- | src/libsystemd/sd-bus/bus-internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h index 2087ef8eeb..4c07d55b61 100644 --- a/src/libsystemd/sd-bus/bus-internal.h +++ b/src/libsystemd/sd-bus/bus-internal.h @@ -384,7 +384,7 @@ void bus_close_io_fds(sd_bus *b); #define OBJECT_PATH_FOREACH_PREFIX(prefix, path) \ for (char *_slash = ({ strcpy((prefix), (path)); streq((prefix), "/") ? NULL : strrchr((prefix), '/'); }) ; \ - _slash && !(_slash[(_slash) == (prefix)] = 0); \ + _slash && ((_slash[(_slash) == (prefix)] = 0), true); \ _slash = streq((prefix), "/") ? NULL : strrchr((prefix), '/')) /* If we are invoking callbacks of a bus object, ensure unreffing the |