Deference + increment pointer on single line

This commit is contained in:
0x1eef 2023-09-22 16:57:59 -03:00
parent 1f0c95508e
commit 2cdc238a73

View file

@ -55,10 +55,9 @@ static int
has_consecutive_chars(const char *str, char c, int n) has_consecutive_chars(const char *str, char c, int n)
{ {
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
if (*str != c) { if (*str++ != c) {
return 0; return 0;
} }
str++;
} }
return 1; return 1;
} }