From 11ea12d3ce2d2c7165dfe37ae1a98304a2a2db58 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 12 Mar 2011 23:07:52 +1100 Subject: [PATCH] Forgot to test for TEST_ONLY. --- stream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stream.c b/stream.c index 974fcc9..a6899b2 100644 --- a/stream.c +++ b/stream.c @@ -637,7 +637,7 @@ const i64 one_g = 1000 * 1024 * 1024; ssize_t put_fdout(rzip_control *control, int fd, void *offset_buf, ssize_t ret) { - if (!STDOUT || DECOMPRESS) + if (!STDOUT || DECOMPRESS || TEST_ONLY) return write(fd, offset_buf, (size_t)ret); memcpy(control->tmp_outbuf + control->out_ofs, offset_buf, ret); control->out_ofs += ret; @@ -766,7 +766,7 @@ static int seekto(rzip_control *control, struct stream_info *sinfo, i64 pos) { i64 spos = pos + sinfo->initial_pos; - if (!DECOMPRESS && STDOUT) { + if (!(DECOMPRESS || TEST_ONLY) && STDOUT) { spos -= control->rel_ofs; control->out_ofs = spos; if (unlikely(spos > control->out_len || spos < 0)) { @@ -787,7 +787,7 @@ static i64 get_seek(rzip_control *control, int fd) { i64 ret; - if (!DECOMPRESS && STDOUT) + if (!(DECOMPRESS || TEST_ONLY) && STDOUT) return control->rel_ofs + control->out_ofs; ret = lseek(fd, 0, SEEK_CUR); if (unlikely(ret == -1))