liblzma: Use memzero() to initialize supported_actions[].

This is cleaner and makes it simpler to add new members
to lzma_action enumeration.
This commit is contained in:
Lasse Collin 2011-04-11 19:28:18 +03:00
parent a7934c446a
commit 0badb0b1bd
1 changed files with 2 additions and 4 deletions

View File

@ -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;