1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

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

View file

@ -156,10 +156,8 @@ lzma_strm_init(lzma_stream *strm)
strm->internal->next = LZMA_NEXT_CODER_INIT; strm->internal->next = LZMA_NEXT_CODER_INIT;
} }
strm->internal->supported_actions[LZMA_RUN] = false; memzero(strm->internal->supported_actions,
strm->internal->supported_actions[LZMA_SYNC_FLUSH] = false; sizeof(strm->internal->supported_actions));
strm->internal->supported_actions[LZMA_FULL_FLUSH] = false;
strm->internal->supported_actions[LZMA_FINISH] = false;
strm->internal->sequence = ISEQ_RUN; strm->internal->sequence = ISEQ_RUN;
strm->internal->allow_buf_error = false; strm->internal->allow_buf_error = false;