From d42bc3c80d1767802e05761b45b1577099623611 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 30 Aug 2018 13:45:40 -0400 Subject: [PATCH] Cleanup: improve readability of filter expression condition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bin/lttng-sessiond/agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1