From 8f063ee72a3735ed85d9048268946c4f0901e1d0 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Mon, 9 Oct 2017 20:27:04 +0100 Subject: [PATCH] changed infinite loops from while to for --- src/main.c | 4 ++-- src/mp3.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index ca1d6a3..4e20709 100644 --- a/src/main.c +++ b/src/main.c @@ -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! } } diff --git a/src/mp3.c b/src/mp3.c index 97a9864..e177ad4 100644 --- a/src/mp3.c +++ b/src/mp3.c @@ -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;