Run clang-format on the whole tree
[lttng-tools.git] / src / common / filter / filter-visitor-ir-check-binary-comparator.cpp
index 2699abde8b5379d52f81673d1d0b12ba1affc0e3..1384ff551fc8b37482a33d7e39230c5d226ade7a 100644 (file)
@@ -9,20 +9,19 @@
  *
  */
 
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <inttypes.h>
+#include "filter-ast.hpp"
+#include "filter-ir.hpp"
+#include "filter-parser.hpp"
 
 #include <common/compat/errno.hpp>
 
-#include "filter-ast.hpp"
-#include "filter-parser.hpp"
-#include "filter-ir.hpp"
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
-static
-int check_bin_comparator(struct ir_op *node)
+static int check_bin_comparator(struct ir_op *node)
 {
        switch (node->op) {
        case IR_OP_UNKNOWN:
@@ -40,12 +39,11 @@ int check_bin_comparator(struct ir_op *node)
        {
                int ret;
 
-               if (node->u.binary.left->data_type == IR_DATA_STRING
-                               || node->u.binary.right->data_type
-                                       == IR_DATA_STRING) {
-                       if (node->u.binary.type != AST_OP_EQ
-                                       && node->u.binary.type != AST_OP_NE) {
-                               fprintf(stderr, "[error] Only '==' and '!=' comparators are allowed for strings\n");
+               if (node->u.binary.left->data_type == IR_DATA_STRING ||
+                   node->u.binary.right->data_type == IR_DATA_STRING) {
+                       if (node->u.binary.type != AST_OP_EQ && node->u.binary.type != AST_OP_NE) {
+                               fprintf(stderr,
+                                       "[error] Only '==' and '!=' comparators are allowed for strings\n");
                                return -EINVAL;
                        }
                }
This page took 0.023599 seconds and 4 git commands to generate.