Skip to content
Myr

Remove if (f->valid_bits < 0) return 0; on line 1603

Before adoption: this commit came in with the history the project adopted, so no landing records it.

I propose to remove this line because f->valid_bits will never be less than zero since, in the while loop, you're adding 8 to it. Therefore, it will always evaluate to false. This is to help remove redundant code.

authored by wph612 · committed by GitHub · parent f54acd4 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:stb_vorbis.c+1 added-1 removed
1598 unmodified lines
1599 f->acc += z << f->valid_bits;1600 f->valid_bits += 8;1601 }1602 }1603 if (f->valid_bits < 0) return 0;16031604 z = f->acc & ((1 << n)-1);1605 f->acc >>= n;1606 f->valid_bits -= n;1607 return z;
3948 unmodified lines