From: Jérémie Galarneau Date: Thu, 30 Aug 2018 17:45:40 +0000 (-0400) Subject: Cleanup: improve readability of filter expression condition X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=d42bc3c80d1767802e05761b45b1577099623611 Cleanup: improve readability of filter expression condition In this situation, a logical inequality '!=' is equivalent to the binary xor '^' that was used. However, while it is equivalent, mixing logical ('!') and bitwise operators ('^') makes this code harder to read than it needs to be. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c index 310a7e8e1..3b8acd2a2 100644 --- a/src/bin/lttng-sessiond/agent.c +++ b/src/bin/lttng-sessiond/agent.c @@ -143,7 +143,7 @@ static int ht_match_event(struct cds_lfht_node *node, } /* Filter expression */ - if (!!event->filter_expression ^ !!key->filter_expression) { + if (!!event->filter_expression != !!key->filter_expression) { /* One has a filter expression, the other does not */ goto no_match; }