From 0badb0b1bd649163322783b0bd9e590b4bc7a93d Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Mon, 11 Apr 2011 19:28:18 +0300 Subject: [PATCH] liblzma: Use memzero() to initialize supported_actions[]. This is cleaner and makes it simpler to add new members to lzma_action enumeration. --- src/liblzma/common/common.c | 6 ++---- 1 file 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;