From 1e6ec94ebea88cd265b4b48deef4bd0d1f2efc6b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Oct 2013 13:03:55 +0100 Subject: [PATCH] Move buf out of inner loop. Since the buf pointer can be used by the stream across multiple iterations of the loop. --- pxzcat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pxzcat.c b/pxzcat.c index a6becce..4ab8689 100644 --- 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) { -- 1.8.3.1