summaryrefslogtreecommitdiff
path: root/src/utils/zlib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/zlib.cpp')
-rw-r--r--src/utils/zlib.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils/zlib.cpp b/src/utils/zlib.cpp
index 8e2a1795..a6d47b47 100644
--- a/src/utils/zlib.cpp
+++ b/src/utils/zlib.cpp
@@ -152,15 +152,14 @@ void *loadCompressedFile(const std::string &filename, int &filesize)
unsigned char *inflated;
unsigned int inflatedSize;
- if (inflated && filename.find(".gz", filename.length() - 3)
- != std::string::npos)
+ if (filename.find(".gz", filename.length() - 3) != std::string::npos)
{
// Inflate the gzipped map data
inflatedSize =
inflateMemory((unsigned char*) buffer, filesize, inflated);
free(buffer);
- if (inflated == NULL)
+ if (!inflated)
{
logger->log("Could not decompress file: %s",
filename.c_str());