summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rbcodec/metadata/flac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbcodec/metadata/flac.c b/lib/rbcodec/metadata/flac.c
index df25bb9b4d..af39c1346b 100644
--- a/lib/rbcodec/metadata/flac.c
+++ b/lib/rbcodec/metadata/flac.c
@@ -59,7 +59,7 @@ bool get_flac_metadata(int fd, struct mp3entry* id3)
59 unsigned long i; 59 unsigned long i;
60 int type; 60 int type;
61 61
62 if (read(fd, buf, 4) < 0) 62 if (read(fd, buf, 4) != 4)
63 { 63 {
64 return rc; 64 return rc;
65 } 65 }
@@ -73,7 +73,7 @@ bool get_flac_metadata(int fd, struct mp3entry* id3)
73 { 73 {
74 unsigned long totalsamples; 74 unsigned long totalsamples;
75 75
76 if (i >= sizeof(id3->path) || read(fd, buf, i) < 0) 76 if (i >= sizeof(id3->path) || read(fd, buf, i) != i)
77 { 77 {
78 return rc; 78 return rc;
79 } 79 }