diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-04 21:24:24 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-04 21:24:24 (GMT) |
commit | 1184bd932192b479916abb46dc4625a608eb7574 (patch) | |
tree | cbe85da12a5ffd6a600c412dbe0defc496019f21 /Source/CPack/cmCPackTGZGenerator.cxx | |
parent | 5358809a5c1010739923b3bec22a63ba4fe2f657 (diff) | |
download | CMake-1184bd932192b479916abb46dc4625a608eb7574.zip CMake-1184bd932192b479916abb46dc4625a608eb7574.tar.gz CMake-1184bd932192b479916abb46dc4625a608eb7574.tar.bz2 |
ENH: remove assert
Diffstat (limited to 'Source/CPack/cmCPackTGZGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackTGZGenerator.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackTGZGenerator.cxx b/Source/CPack/cmCPackTGZGenerator.cxx index edbb483..d9bed2b 100644 --- a/Source/CPack/cmCPackTGZGenerator.cxx +++ b/Source/CPack/cmCPackTGZGenerator.cxx @@ -123,7 +123,10 @@ ssize_t cmCPackTGZ_Data_Write(void *client_data, void *buff, size_t n) mydata->m_ZLibStream.avail_out = cmCPackTGZ_Data_BlockSize; mydata->m_ZLibStream.next_out = reinterpret_cast<Bytef*>(mydata->m_CompressedBuffer); int ret = deflate(&mydata->m_ZLibStream, (n?Z_NO_FLUSH:Z_FINISH)); /* no bad return value */ - assert(ret != Z_STREAM_ERROR); /* state not clobbered */ + if(ret == Z_STREAM_ERROR) + { + return 0; + } size_t compressedSize = cmCPackTGZ_Data_BlockSize - mydata->m_ZLibStream.avail_out; |