diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2011-04-11 19:28:18 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2011-04-11 19:28:18 +0300 |
commit | 0badb0b1bd649163322783b0bd9e590b4bc7a93d (patch) | |
tree | 0671e8625ae0d991a04f2163fa5481cfe9b3355c /src/liblzma/common/common.c | |
parent | liblzma: API comment about lzma_allocator with threaded coding. (diff) | |
download | xz-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/liblzma/common/common.c')
-rw-r--r-- | src/liblzma/common/common.c | 6 |
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; |