Skip to content

Commit 7bc9852

Browse files
committed
Move seperate checking for NULL into the loop
1 parent f63ca72 commit 7bc9852

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/util.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88

99
static inline void ignore_extra(const char chr, char** string_ptr) {
1010
assert(string_ptr != NULL);
11-
if(*string_ptr == NULL) return;
1211

13-
while(**string_ptr == chr) {
12+
while(*string_ptr != NULL && **string_ptr == chr) {
1413
*string_ptr += 1;
1514
}
1615
}

0 commit comments

Comments
 (0)