aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2018-07-27 16:02:58 +0300
committerLasse Collin <lasse.collin@tukaani.org>2019-07-13 17:17:00 +0300
commit273c33297bb69621045ed19665eaf8338bcf4a50 (patch)
tree556de666071d7656ecbd8b37724e412317bd96cb
parentliblzma: Improve lzma_properties_decode() API documentation. (diff)
downloadxz-273c33297bb69621045ed19665eaf8338bcf4a50.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.
-rw-r--r--src/liblzma/common/index.c4
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);