aboutsummaryrefslogtreecommitdiff
path: root/libmpio
diff options
context:
space:
mode:
Diffstat (limited to 'libmpio')
-rw-r--r--libmpio/src/directory.c12
-rw-r--r--libmpio/src/ecc.c6
-rw-r--r--libmpio/src/id3.c4
3 files changed, 10 insertions, 12 deletions
diff --git a/libmpio/src/directory.c b/libmpio/src/directory.c
index bc23646..3fc7496 100644
--- a/libmpio/src/directory.c
+++ b/libmpio/src/directory.c
@@ -1,5 +1,5 @@
/*
- * $Id: directory.c,v 1.3 2003/04/27 12:08:21 germeier Exp $
+ * $Id: directory.c,v 1.4 2003/06/12 08:32:32 germeier Exp $
*
* libmpio - a library for accessing Digit@lways MPIO players
* Copyright (C) 2002, 2003 Markus Germeier
@@ -929,7 +929,7 @@ mpio_dentry_get_time(mpio_t *m, mpio_mem_t mem, BYTE *p)
mpio_fatentry_t *
mpio_dentry_get_startcluster(mpio_t *m, mpio_mem_t mem, BYTE *p)
{
- int s, ret;
+ int s;
DWORD cluster;
BYTE i_index;
mpio_dir_slot_t *dentry;
@@ -950,12 +950,10 @@ mpio_dentry_get_startcluster(mpio_t *m, mpio_mem_t mem, BYTE *p)
if (mem == MPIO_INTERNAL_MEM)
{
i_index=dentry->start[0];
- ret = mpio_fat_internal_find_startsector(m, cluster);
+ cluster = mpio_fat_internal_find_startsector(m, cluster);
+ if (cluster < 0)
+ return NULL;
}
- if (ret < 0)
- return NULL;
-
- cluster = ret;
new = mpio_fatentry_new(m, mem, cluster, FTYPE_MUSIC);
diff --git a/libmpio/src/ecc.c b/libmpio/src/ecc.c
index 58aaa1e..0b315b4 100644
--- a/libmpio/src/ecc.c
+++ b/libmpio/src/ecc.c
@@ -1,5 +1,5 @@
/*
- * $Id: ecc.c,v 1.5 2003/04/30 21:23:04 germeier Exp $
+ * $Id: ecc.c,v 1.6 2003/06/12 08:32:33 germeier Exp $
*
* libmpio - a library for accessing Digit@lways MPIO players
* Copyright (C) 2002, 2003 Markus Germeier
@@ -165,7 +165,7 @@ mpio_ecc_256_check(BYTE *data, BYTE *ecc)
}
if (v) {
- debugn(0, "correctable error detected ... fixing the bit\n");
+ debugn(2, "correctable error detected ... fixing the bit\n");
line =
GET_BIT(check[1], 7) * 128 +
GET_BIT(check[1], 5) * 64 +
@@ -184,7 +184,7 @@ mpio_ecc_256_check(BYTE *data, BYTE *ecc)
data[line] ^= ( 1 << col);
debugn(3, "fixed byte is: %02x\n", data[line]);
} else {
- debugn(0, "uncorrectable error detected. Sorry, you lose!\n");
+ debugn(2, "uncorrectable error detected. Sorry, you lose!\n");
return 1;
}
}
diff --git a/libmpio/src/id3.c b/libmpio/src/id3.c
index 92054f5..d523709 100644
--- a/libmpio/src/id3.c
+++ b/libmpio/src/id3.c
@@ -1,5 +1,5 @@
/*
- * $Id: id3.c,v 1.3 2003/04/27 12:08:21 germeier Exp $
+ * $Id: id3.c,v 1.4 2003/06/12 08:32:33 germeier Exp $
*
* libmpio - a library for accessing Digit@lways MPIO players
* Copyright (C) 2003 Markus Germeier
@@ -153,7 +153,7 @@ mpio_id3_do(mpio_t *m, BYTE *src, BYTE *tmp)
tag_list = mp_get_tag_list_from_fd(fd);
if (!tag_list)
{
- debug("no tag list found!\n");
+ debugn(2, "no tag list found!\n");
return 0;
}