From 560c21250b3213abb36777cfec61332a1681889d Mon Sep 17 00:00:00 2001 From: lottaviano Date: Tue, 1 Sep 2009 13:20:57 +0000 Subject: [PATCH] Fix warnings and cleanup code. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2842 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/fs/fat.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/bertos/fs/fat.c b/bertos/fs/fat.c index 1cee1ae8..77590c56 100644 --- a/bertos/fs/fat.c +++ b/bertos/fs/fat.c @@ -72,14 +72,12 @@ static kfile_off_t fatfile_seek(struct KFile *_fd, kfile_off_t offset, KSeekMode * don't clip at end-of-file when in write mode */ FatFile *fd = FATFILE_CAST(_fd); - DWORD lseek_offset; + DWORD lseek_offset = 0; switch (whence) { case KSM_SEEK_SET: if (offset > 0) lseek_offset = (DWORD) offset; - else - lseek_offset = 0; break; case KSM_SEEK_CUR: if (offset > 0) @@ -88,8 +86,6 @@ static kfile_off_t fatfile_seek(struct KFile *_fd, kfile_off_t offset, KSeekMode { if (fd->fat_file.fptr > (DWORD) (-offset)) lseek_offset = fd->fat_file.fptr - (DWORD)(-offset); - else - lseek_offset = 0; } break; case KSM_SEEK_END: @@ -99,8 +95,6 @@ static kfile_off_t fatfile_seek(struct KFile *_fd, kfile_off_t offset, KSeekMode { if (fd->fat_file.fsize > (DWORD) (-offset)) lseek_offset = fd->fat_file.fsize + (DWORD) offset; - else - lseek_offset = 0; } break; } -- 2.25.1