From 7750e5b1e8f989513ef982c4c4dca4dbe4fe7a92 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:06 +0200 Subject: audiofile: use break instead of local variable "eof" Similar to previous patch: eliminate one variable by using "break". This also simplifies the code since we can remove one level of indent. [ew: rewritten to match current API] --- src/inputPlugins/audiofile_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/inputPlugins/audiofile_plugin.c b/src/inputPlugins/audiofile_plugin.c index 7f748fc1b..d32a99857 100644 --- a/src/inputPlugins/audiofile_plugin.c +++ b/src/inputPlugins/audiofile_plugin.c @@ -85,10 +85,10 @@ static int audiofile_decode(char *path) fs = (int)afGetVirtualFrameSize(af_fp, AF_DEFAULT_TRACK, 1); { - int ret, eof = 0, current = 0; + int ret, current = 0; char chunk[CHUNK_SIZE]; - while (!eof) { + while (1) { if (dc_seek()) { dc_action_begin(); current = dc.seek_where * @@ -101,7 +101,7 @@ static int audiofile_decode(char *path) afReadFrames(af_fp, AF_DEFAULT_TRACK, chunk, CHUNK_SIZE / fs); if (ret <= 0) - eof = 1; + break; else { current += ret; ob_send(chunk, ret * fs, -- cgit v1.2.3