Skip to content

Commit

Permalink
replace while with for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzuger committed Mar 24, 2021
1 parent dd09afe commit 0e9155f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tlc5947/tlc5947.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,8 @@ static float atof(const char *s){
}

static void tokenize_pattern_str(const char* s, token_t* pat, size_t len){
size_t i = 0;
dprintf("parse start:\r\n");
while(*s && (len > i)){
for(size_t i = 0; *s && (len > i); i++){
switch(*s++){
case '#':
dprintf("RGB COLOR\r\n");
Expand Down Expand Up @@ -864,7 +863,6 @@ static void tokenize_pattern_str(const char* s, token_t* pat, size_t len){
mp_raise_ValueError(MP_ERROR_TEXT("Unknown character in pattern string."));
break;
}
i++;
}
dprintf("parse done\r\n");
}
Expand Down

0 comments on commit 0e9155f

Please sign in to comment.