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:
parent
72612ea6b8
commit
2580cdfe73
1 changed files with 2 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue