summaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-21 23:19:29 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-21 23:19:29 +0300
commit5d6e4e9a5875d79173e9d2c867567dc26354240e (patch)
treec4970334ea3700e955562755c18b51746c744c60 /src/fs
parent42f47e483da19079a937c4801ca94bd62d8dc970 (diff)
downloadmanaplus-5d6e4e9a5875d79173e9d2c867567dc26354240e.tar.gz
manaplus-5d6e4e9a5875d79173e9d2c867567dc26354240e.tar.bz2
manaplus-5d6e4e9a5875d79173e9d2c867567dc26354240e.tar.xz
manaplus-5d6e4e9a5875d79173e9d2c867567dc26354240e.zip
Change useless if conditions.
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/virtfs/fsdirrwops.cpp9
1 files changed, 5 insertions, 4 deletions
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<int64_t>(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<int64_t>(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);
}