changed infinite loops from while to for

This commit is contained in:
Robin Jones 2017-10-09 20:27:04 +01:00
parent 06d266e425
commit 8f063ee72a
2 changed files with 4 additions and 4 deletions

View File

@ -4712,7 +4712,7 @@ int main(void)
dfs_close(fp);
//system main-loop with controller inputs-scan
while (1)
for ( ;; )
{
if (sound_on)
sndUpdate();
@ -4766,7 +4766,7 @@ int main(void)
else
{
printf("Filesystem failed to start!\n");
while (1)
for ( ;; )
; //never leave!
}
}

View File

@ -159,7 +159,7 @@ static int MP3_SkipHdr(char* fd)
mp3_seek(fd, offset, SEEK_SET);
//now seek for a sync
while(1) {
for ( ;;) {
offset = mp3_seek(fd, 0, SEEK_CUR);
size = mp3_read(fd, buf, sizeof(buf));
@ -333,7 +333,7 @@ static void MP3_GetInfo(long long *samples, int *rate) {
mad_stream_buffer (&stream, localBuffer, red);
while (1) {
for ( ;; ) {
if (mad_header_decode(&header, &stream) == -1) {
if (stream.buffer == NULL || stream.error == MAD_ERROR_BUFLEN) {
break;