git.annexia.org
/
pxzcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8365e96
)
Move buf out of inner loop.
author
Richard W.M. Jones
<rjones@redhat.com>
Tue, 22 Oct 2013 12:03:55 +0000
(13:03 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Tue, 22 Oct 2013 12:03:55 +0000
(13:03 +0100)
Since the buf pointer can be used by the stream across multiple
iterations of the loop.
pxzcat.c
patch
|
blob
|
history
diff --git
a/pxzcat.c
b/pxzcat.c
index
a6becce
..
4ab8689
100644
(file)
--- a/
pxzcat.c
+++ b/
pxzcat.c
@@
-462,6
+462,7
@@
worker_thread (void *vp)
lzma_filter filters[LZMA_FILTERS_MAX + 1];
lzma_ret r;
lzma_stream strm = LZMA_STREAM_INIT;
+ uint8_t buf[BUFFER_SIZE];
char outbuf[BUFFER_SIZE];
size_t i;
lzma_bool iter_finished;
@@
-564,7
+565,6
@@
worker_thread (void *vp)
strm.avail_out = sizeof outbuf;
for (;;) {
- uint8_t buf[BUFFER_SIZE];
lzma_action action = LZMA_RUN;
if (strm.avail_in == 0) {