diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2014-07-13 20:21:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-29 12:44:36 (GMT) |
commit | 7a92eddbcb2b2e6419062538e346908f0e502586 (patch) | |
tree | b1985ad4a8904211f12cb07742a9d776fa28152f /Utilities/cmliblzma/liblzma/simple/simple_decoder.c | |
parent | b2a07ca49c66665f5b51b592f44ecc4f66c7556b (diff) | |
download | CMake-7a92eddbcb2b2e6419062538e346908f0e502586.zip CMake-7a92eddbcb2b2e6419062538e346908f0e502586.tar.gz CMake-7a92eddbcb2b2e6419062538e346908f0e502586.tar.bz2 |
liblzma: Port from C99 to C89/90
Remove use of designated initializers and declarations of variables
after statements. Leave "//" comments as-is for now.
Diffstat (limited to 'Utilities/cmliblzma/liblzma/simple/simple_decoder.c')
-rw-r--r-- | Utilities/cmliblzma/liblzma/simple/simple_decoder.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Utilities/cmliblzma/liblzma/simple/simple_decoder.c b/Utilities/cmliblzma/liblzma/simple/simple_decoder.c index 0beccd3..034e158 100644 --- a/Utilities/cmliblzma/liblzma/simple/simple_decoder.c +++ b/Utilities/cmliblzma/liblzma/simple/simple_decoder.c @@ -17,14 +17,15 @@ extern lzma_ret lzma_simple_props_decode(void **options, lzma_allocator *allocator, const uint8_t *props, size_t props_size) { + lzma_options_bcj *opt; + if (props_size == 0) return LZMA_OK; if (props_size != 4) return LZMA_OPTIONS_ERROR; - lzma_options_bcj *opt = lzma_alloc( - sizeof(lzma_options_bcj), allocator); + opt = lzma_alloc(sizeof(lzma_options_bcj), allocator); if (opt == NULL) return LZMA_MEM_ERROR; |