Fix: remove underscores from CTF IR field names at the source
[babeltrace.git] / plugins / text / pretty / print.c
index 7234b8a485bbe4d94e4bbc3e37e6c5b3dd1a5535..6972ed5d9b5c42fbce929cd3f0ccfb834ea79ca0 100644 (file)
 #define COLOR_EVENT_NAME       BT_COMMON_COLOR_BOLD BT_COMMON_COLOR_FG_MAGENTA
 #define COLOR_TIMESTAMP                BT_COMMON_COLOR_BOLD BT_COMMON_COLOR_FG_YELLOW
 
-static inline
-const char *rem_(const char *str)
-{
-       if (str[0] == '_')
-               return &str[1];
-       else
-               return str;
-}
-
 struct timestamp {
        int64_t real_timestamp; /* Relative to UNIX epoch. */
        uint64_t clock_value;   /* In cycles. */
@@ -939,7 +930,7 @@ enum bt_component_status print_struct_field(struct pretty_component *pretty,
                g_string_append(pretty->string, " ");
        }
        if (print_names) {
-               print_field_name_equal(pretty, rem_(field_name));
+               print_field_name_equal(pretty, field_name);
        }
        ret = print_field(pretty, field, print_names, NULL, 0);
        *nr_printed_fields += 1;
@@ -1261,7 +1252,7 @@ enum bt_component_status print_variant(struct pretty_component *pretty,
                        ret = BT_COMPONENT_STATUS_ERROR;
                        goto end;
                }
-               print_field_name_equal(pretty, rem_(tag_choice));
+               print_field_name_equal(pretty, tag_choice);
                bt_put(tag_field);
                bt_put(iter);
        }
This page took 0.025298 seconds and 4 git commands to generate.