Fix: Remove dead code from filter interpreter
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 5 Apr 2016 13:26:51 +0000 (09:26 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 5 Apr 2016 13:27:49 +0000 (09:27 -0400)
Detected by Coverity:
** CID 1353794:  Control flow issues  (DEADCODE)
/lttng-filter-interpreter.c: 123 in stack_strcmp()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-filter-interpreter.c

index 7c80c35cdc07b68ab20491a9d8ad19007734db53..42397aa3f2e997bce853dc566c7f009d2bdde612 100644 (file)
@@ -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),
This page took 0.029401 seconds and 4 git commands to generate.