summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-19 01:51:12 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-19 01:51:12 +0200
commit445647adc4475c0b8264ce8b6c97d748eec69e7b (patch)
tree4bea88bb86a79c9533d90e018810e02639d84fda
parentac78dfcea6a9eea7221bc94ef4bd69078718b922 (diff)
Simplify eat_whitespace_and_comments
-rw-r--r--config.c12
1 files changed, 5 insertions, 7 deletions
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)++;
}
}