diff options
author | David Härdeman <david@hardeman.nu> | 2020-06-19 01:51:12 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-06-19 01:51:12 +0200 |
commit | 445647adc4475c0b8264ce8b6c97d748eec69e7b (patch) | |
tree | 4bea88bb86a79c9533d90e018810e02639d84fda | |
parent | ac78dfcea6a9eea7221bc94ef4bd69078718b922 (diff) |
Simplify eat_whitespace_and_comments
-rw-r--r-- | config.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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)++; } } |