From: Mathieu Desnoyers Date: Tue, 5 Apr 2016 13:26:51 +0000 (-0400) Subject: Fix: Remove dead code from filter interpreter X-Git-Tag: v2.7.3~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=04e3aeb98ddb224ff896a4a6cd7323b808f76cbf;p=lttng-modules.git Fix: Remove dead code from filter interpreter Detected by Coverity: ** CID 1353794: Control flow issues (DEADCODE) /lttng-filter-interpreter.c: 123 in stack_strcmp() Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c index 7c80c35c..42397aa3 100644 --- a/lttng-filter-interpreter.c +++ b/lttng-filter-interpreter.c @@ -119,21 +119,16 @@ int stack_strcmp(struct estack *stack, int top, const char *cmp_type) } } if (unlikely(char_ax == '\0')) { - if (char_bx == '\0') { - diff = 0; - break; - } else { - if (estack_bx(stack, top)->u.s.literal) { - ret = parse_char(estack_bx(stack, top), - &char_bx, &offset_bx); - if (ret == -1) { - diff = 0; - break; - } + if (estack_bx(stack, top)->u.s.literal) { + ret = parse_char(estack_bx(stack, top), + &char_bx, &offset_bx); + if (ret == -1) { + diff = 0; + break; } - diff = 1; - break; } + diff = 1; + break; } if (estack_bx(stack, top)->u.s.literal) { ret = parse_char(estack_bx(stack, top),