From fe61af54987401bd7db299387e06d9af1078d1d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 12 Feb 2020 15:24:08 +0100 Subject: sam: move parse_number code, no functional change --- sam.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sam.c b/sam.c index 11d245b..8d3ab1f 100644 --- a/sam.c +++ b/sam.c @@ -584,6 +584,15 @@ static char *parse_delimited(const char **s, int type) { return chunk; } +static int parse_number(const char **s) { + char *end = NULL; + int number = strtoull(*s, &end, 10); + if (end == *s) + return 0; + *s = end; + return number; +} + static char *parse_text(const char **s) { skip_spaces(s); if (**s != '\n') { @@ -658,15 +667,6 @@ static Regex *parse_regex(Vis *vis, const char **s) { return regex; } -static int parse_number(const char **s) { - char *end = NULL; - int number = strtoull(*s, &end, 10); - if (end == *s) - return 0; - *s = end; - return number; -} - static enum SamError parse_count(const char **s, Count *count) { count->mod = **s == '%'; -- cgit v1.2.3