diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2018-07-27 16:02:58 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2018-07-27 16:02:58 +0300 |
commit | 3cbcaeb07eb7543735befd6f507fdb5fa4363cff (patch) | |
tree | 513e073c6a3efdb38e0d38be9a5c729dc19d2af2 /src/liblzma | |
parent | liblzma: Improve lzma_properties_decode() API documentation. (diff) | |
download | xz-3cbcaeb07eb7543735befd6f507fdb5fa4363cff.tar.xz |
liblzma: Remove an always-true condition from lzma_index_cat().
This should help static analysis tools to see that newg
isn't leaked.
Thanks to Pavel Raiskup.
Diffstat (limited to 'src/liblzma')
-rw-r--r-- | src/liblzma/common/index.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblzma/common/index.c b/src/liblzma/common/index.c index 26e4e519..007e1570 100644 --- a/src/liblzma/common/index.c +++ b/src/liblzma/common/index.c @@ -825,8 +825,8 @@ lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src, s->groups.root = &newg->node; } - if (s->groups.rightmost == &g->node) - s->groups.rightmost = &newg->node; + assert(s->groups.rightmost == &g->node); + s->groups.rightmost = &newg->node; lzma_free(g, allocator); |