From 21594a4e2ab41d421df9da78505c954ff283f6a3 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Sat, 27 Apr 2002 22:45:23 +0000 Subject: Slight simplification git-svn-id: svn://svn.rockbox.org/rockbox/trunk@277 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/fat.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index dc933be599..936299e122 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -966,12 +966,9 @@ int fat_getnext(struct bpb *bpb, /* current or cached sector? */ if ( sectoridx >= SECTOR_SIZE ) { if ( sectoridx >= SECTOR_SIZE*2 ) { - if ( index >= SECTOR_SIZE ) { - if ( index >= SECTOR_SIZE*2 ) - ptr = ent->cached_buf; - else - ptr = lastsector; - } + if ( ( index >= SECTOR_SIZE ) && + ( index < SECTOR_SIZE*2 )) + ptr = lastsector; else ptr = lastsector2; } -- cgit v1.2.3