aboutsummaryrefslogtreecommitdiff
path: root/linux/lib/xz
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-05-25 18:17:33 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-05-25 18:17:33 +0300
commita052d9261c1c8bda7f975c43415ac1f6164751aa (patch)
treed06f0c0aad587cd927c6945cb361ac54b22012e9 /linux/lib/xz
parentdac1ce8661108cc6db2a53ed68c1fbdd14dc0382 (diff)
downloadxz-embedded-a052d9261c1c8bda7f975c43415ac1f6164751aa.tar.gz
Use memzero()s to initialize a few more variables and shorten
the code slightly in xz_dec_stream.c.
Diffstat (limited to 'linux/lib/xz')
-rw-r--r--linux/lib/xz/xz_dec_stream.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/linux/lib/xz/xz_dec_stream.c b/linux/lib/xz/xz_dec_stream.c
index 6e9f708..69c7c3b 100644
--- a/linux/lib/xz/xz_dec_stream.c
+++ b/linux/lib/xz/xz_dec_stream.c
@@ -740,14 +740,8 @@ void XZ_FUNC xz_dec_reset(struct xz_dec *s)
s->allow_buf_error = false;
s->pos = 0;
s->crc32 = 0;
-
- s->block.count = 0;
- memzero(&s->block.hash, sizeof(s->block.hash));
-
- s->index.sequence = SEQ_INDEX_COUNT;
- s->index.size = 0;
- memzero(&s->index.hash, sizeof(s->index.hash));
-
+ memzero(&s->block, sizeof(s->block));
+ memzero(&s->index, sizeof(s->index));
s->temp.pos = 0;
s->temp.size = STREAM_HEADER_SIZE;
}