aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2011-04-11 19:28:18 +0300
committerLasse Collin <lasse.collin@tukaani.org>2011-04-11 19:28:18 +0300
commit0badb0b1bd649163322783b0bd9e590b4bc7a93d (patch)
tree0671e8625ae0d991a04f2163fa5481cfe9b3355c /src
parentliblzma: API comment about lzma_allocator with threaded coding. (diff)
downloadxz-0badb0b1bd649163322783b0bd9e590b4bc7a93d.tar.xz
liblzma: Use memzero() to initialize supported_actions[].
This is cleaner and makes it simpler to add new members to lzma_action enumeration.
Diffstat (limited to 'src')
-rw-r--r--src/liblzma/common/common.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/liblzma/common/common.c b/src/liblzma/common/common.c
index 0408e153..3005cca9 100644
--- a/src/liblzma/common/common.c
+++ b/src/liblzma/common/common.c
@@ -156,10 +156,8 @@ lzma_strm_init(lzma_stream *strm)
strm->internal->next = LZMA_NEXT_CODER_INIT;
}
- strm->internal->supported_actions[LZMA_RUN] = false;
- strm->internal->supported_actions[LZMA_SYNC_FLUSH] = false;
- strm->internal->supported_actions[LZMA_FULL_FLUSH] = false;
- strm->internal->supported_actions[LZMA_FINISH] = false;
+ memzero(strm->internal->supported_actions,
+ sizeof(strm->internal->supported_actions));
strm->internal->sequence = ISEQ_RUN;
strm->internal->allow_buf_error = false;