From: Richard W.M. Jones Date: Tue, 22 Oct 2013 12:03:55 +0000 (+0100) Subject: Move buf out of inner loop. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=1e6ec94ebea88cd265b4b48deef4bd0d1f2efc6b;p=pxzcat.git Move buf out of inner loop. Since the buf pointer can be used by the stream across multiple iterations of the loop. --- 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) {