diff --git a/src/probes/oops_parser.c b/src/probes/oops_parser.c index 0ca7d4c..7e02828 100644 --- a/src/probes/oops_parser.c +++ b/src/probes/oops_parser.c @@ -184,7 +184,7 @@ char *skip_timestamp(char *line) return start; } -char *skip_spaces(char *line) +char *skip_space(char *line) { char *start = line; @@ -194,6 +194,16 @@ char *skip_spaces(char *line) return start; } +char *skip_spaces(char *line) +{ + char *start = line; + + while (*start && isspace(*start)) { + start++; + } + return start; +} + bool starts_with(const char *line, const char *line_end, const char *substr) { size_t substrlen = strlen(substr); @@ -346,7 +356,7 @@ void parse_single_line(char *line, size_t size) line_end = line + size; start = skip_log_level(line); start = skip_timestamp(start); - start = skip_spaces(start); + start = skip_space(start); struct oops_pattern *pattern; if (oops_msg.length == 0) {