Deference + increment pointer on single line
This commit is contained in:
parent
1f0c95508e
commit
2cdc238a73
1 changed files with 1 additions and 2 deletions
|
@ -55,10 +55,9 @@ static int
|
|||
has_consecutive_chars(const char *str, char c, int n)
|
||||
{
|
||||
for (int i = 0; i < n; i++) {
|
||||
if (*str != c) {
|
||||
if (*str++ != c) {
|
||||
return 0;
|
||||
}
|
||||
str++;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue