summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/id3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index 92327ed92b..11ae683ee3 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -308,7 +308,7 @@ static int read_unsynched(int fd, void *buf, int len)
while(remaining) {
rp = wp;
rc = read(fd, rp, remaining);
- if(rc < 0)
+ if(rc <= 0)
return rc;
i = unsynchronize(wp, remaining, &global_ff_found);
@@ -329,7 +329,7 @@ static int skip_unsynched(int fd, int len)
while(remaining) {
rlen = MIN(sizeof(buf), (unsigned int)remaining);
rc = read(fd, buf, rlen);
- if(rc < 0)
+ if(rc <= 0)
return rc;
remaining -= unsynchronize(buf, rlen, &global_ff_found);