diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-12-08 20:58:49 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-12-09 10:17:53 +0200 |
commit | 644f73966002589c36d779fa33b9524a451f56e0 (patch) | |
tree | 58b5f8b90e48771dd211a39a8aeba231d6483475 /core/io/compression.cpp | |
parent | 90bdba576af2d5f0a8ecdbef065d6ef0075bc2f2 (diff) | |
download | redot-engine-644f73966002589c36d779fa33b9524a451f56e0.tar.gz |
Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
Diffstat (limited to 'core/io/compression.cpp')
-rw-r--r-- | core/io/compression.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/compression.cpp b/core/io/compression.cpp index cd8793bb0a..8e613cb3ce 100644 --- a/core/io/compression.cpp +++ b/core/io/compression.cpp @@ -257,13 +257,13 @@ int Compression::decompress_dynamic(Vector<uint8_t> *p_dst_vect, int p_max_dst_s } while (ret != Z_STREAM_END); // If all done successfully, resize the output if it's larger than the actual output - if (ret == Z_STREAM_END && (unsigned long)p_dst_vect->size() > strm.total_out) { + if ((unsigned long)p_dst_vect->size() > strm.total_out) { p_dst_vect->resize(strm.total_out); } // clean up and return (void)inflateEnd(&strm); - return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR; + return Z_OK; } int Compression::zlib_level = Z_DEFAULT_COMPRESSION; |