From 445647adc4475c0b8264ce8b6c97d748eec69e7b Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Fri, 19 Jun 2020 01:51:12 +0200 Subject: Simplify eat_whitespace_and_comments --- config.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'config.c') diff --git a/config.c b/config.c index 3a59b77..aece8b1 100644 --- a/config.c +++ b/config.c @@ -22,13 +22,11 @@ eat_whitespace_and_comments(char **pos) while (isspace(**pos)) (*pos)++; - if (**pos == '#') { - while (**pos != '\r' && **pos != '\n' && **pos != '\0') - (*pos)++; - continue; - } - - return; + if (**pos != '#') { + return; + + while (**pos != '\r' && **pos != '\n' && **pos != '\0') + (*pos)++; } } -- cgit v1.2.3