1
0
Fork 0
forked from len0rd/rockbox

Simplification.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5766 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-02-03 22:58:50 +00:00
parent 72612ea6b8
commit 2580cdfe73

View file

@ -265,11 +265,8 @@ static long cluster2sec(IF_MV2(struct bpb* fat_bpb,) long cluster)
#else
const long zerocluster = 2;
#endif
long max_cluster = (fat_bpb->totalsectors -
fat_bpb->firstdatasector) / fat_bpb->bpb_secperclus + 1;
if (cluster > max_cluster)
if (cluster > (long)(fat_bpb->dataclusters + 1))
{
DEBUGF( "cluster2sec() - Bad cluster number (%ld)\n", cluster);
return -1;