summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-05-08 07:10:16 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-05-08 07:10:16 +0000
commitaf5c607832b9c6b2a5a9ff34e6550c5cdb5cd8c9 (patch)
tree18f9c1c9422c96d49f2c9650f398286b20456e31
parentbdc3ff0b084ce46cbdcfb14d16e1a915f8092fd7 (diff)
downloadrockbox-af5c607832b9c6b2a5a9ff34e6550c5cdb5cd8c9.tar.gz
rockbox-af5c607832b9c6b2a5a9ff34e6550c5cdb5cd8c9.zip
uninitialised variable and better return code check
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@504 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/id3.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index c83178ad4b..f41be09405 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -176,7 +176,9 @@ setid3v2title(int fd, mp3entry *entry)
/* Check version */
lseek(fd, 0, SEEK_SET);
- read(fd, header, 10);
+ if(10 != read(fd, header, 10))
+ return;
+
version = (unsigned short int)header[3];
/* Read all frames in the tag */
@@ -348,7 +350,7 @@ getid3v1len(int fd)
static int
getsonglength(int fd, mp3entry *entry)
{
- long header;
+ long header=0;
int version;
int layer;
int bitindex;