From 5d6e4e9a5875d79173e9d2c867567dc26354240e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 21 Aug 2017 23:19:29 +0300 Subject: Change useless if conditions. --- src/fs/virtfs/fsdirrwops.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/fs/virtfs/fsdirrwops.cpp') diff --git a/src/fs/virtfs/fsdirrwops.cpp b/src/fs/virtfs/fsdirrwops.cpp index 009eb5377..47497a9d3 100644 --- a/src/fs/virtfs/fsdirrwops.cpp +++ b/src/fs/virtfs/fsdirrwops.cpp @@ -177,9 +177,9 @@ namespace FsDir const int64_t rc = cnt / size; #endif // USE_FILE_FOPEN +#ifndef USE_FILE_FOPEN if (rc != static_cast(maxnum)) { -#ifndef USE_FILE_FOPEN const int64_t pos = lseek(fd, 0, SEEK_CUR); struct stat statbuf; if (fstat(fd, &statbuf) == -1) @@ -187,8 +187,8 @@ namespace FsDir reportAlways("FsDir::fileLength error."); return CAST_S32(rc); } -#endif // USE_FILE_FOPEN } +#endif // USE_FILE_FOPEN return CAST_S32(rc); } @@ -213,9 +213,9 @@ namespace FsDir const int64_t rc = cnt / size; #endif // USE_FILE_FOPEN +#ifndef USE_FILE_FOPEN if (rc != static_cast(maxnum)) { -#ifndef USE_FILE_FOPEN const int64_t pos = lseek(fd, 0, SEEK_CUR); struct stat statbuf; if (fstat(fd, &statbuf) == -1) @@ -223,8 +223,9 @@ namespace FsDir reportAlways("FsDir::fileLength error."); return CAST_S32(rc); } -#endif // USE_FILE_FOPEN } +#endif // USE_FILE_FOPEN + return CAST_S32(rc); } -- cgit v1.2.3-70-g09d2