author | erik <erik> | 2007-01-24 19:50:48 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-24 19:50:48 (UTC) |
commit | 035bbc5bf689839c8d8e7be37f347b0dd900fccf (patch) (unidiff) | |
tree | cd668db7b1fedbf6fa2d54fb312a90e6f157e82a /noncore/apps/opie-reader/decompress.cpp | |
parent | a017bf21dd89159052f2f7a3fbc043a24956c08c (diff) | |
download | opie-035bbc5bf689839c8d8e7be37f347b0dd900fccf.zip opie-035bbc5bf689839c8d8e7be37f347b0dd900fccf.tar.gz opie-035bbc5bf689839c8d8e7be37f347b0dd900fccf.tar.bz2 |
Eac one the files in this commit had an instance where a code path is
never traversed because of conditionals operating on values that
never change.
Diffstat (limited to 'noncore/apps/opie-reader/decompress.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/decompress.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/noncore/apps/opie-reader/decompress.cpp b/noncore/apps/opie-reader/decompress.cpp index 9bfec49..6034e01 100644 --- a/noncore/apps/opie-reader/decompress.cpp +++ b/noncore/apps/opie-reader/decompress.cpp | |||
@@ -9,28 +9,21 @@ size_t UnZip(UInt8* compressedbuffer, size_t reclen, UInt8* tgtbuffer, size_t bs | |||
9 | memset(&zstream,sizeof(zstream),0); | 9 | memset(&zstream,sizeof(zstream),0); |
10 | zstream.next_in = compressedbuffer; | 10 | zstream.next_in = compressedbuffer; |
11 | zstream.next_out = tgtbuffer; | 11 | zstream.next_out = tgtbuffer; |
12 | zstream.avail_out = bsize; | 12 | zstream.avail_out = bsize; |
13 | zstream.avail_in = reclen; | 13 | zstream.avail_in = reclen; |
14 | 14 | ||
15 | int keylen = 0; | ||
16 | |||
17 | zstream.zalloc = Z_NULL; | 15 | zstream.zalloc = Z_NULL; |
18 | zstream.zfree = Z_NULL; | 16 | zstream.zfree = Z_NULL; |
19 | zstream.opaque = Z_NULL; | 17 | zstream.opaque = Z_NULL; |
20 | 18 | ||
21 | // printf("Initialising\n"); | 19 | // printf("Initialising\n"); |
22 | 20 | ||
23 | inflateInit(&zstream); | 21 | inflateInit(&zstream); |
24 | int err = 0; | 22 | int err = 0; |
25 | do { | 23 | do { |
26 | if ( zstream.avail_in == 0 && 0 < keylen ) { | ||
27 | zstream.next_in = compressedbuffer + keylen; | ||
28 | zstream.avail_in = reclen - keylen; | ||
29 | keylen = 0; | ||
30 | } | ||
31 | zstream.next_out = tgtbuffer; | 24 | zstream.next_out = tgtbuffer; |
32 | zstream.avail_out = bsize; | 25 | zstream.avail_out = bsize; |
33 | 26 | ||
34 | err = inflate( &zstream, Z_SYNC_FLUSH ); | 27 | err = inflate( &zstream, Z_SYNC_FLUSH ); |
35 | 28 | ||
36 | ////qDebug("err:%d - %u", err, zstream.avail_in); | 29 | ////qDebug("err:%d - %u", err, zstream.avail_in); |