summaryrefslogtreecommitdiffhomepage
path: root/archival/libarchive/open_transformer.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libarchive/open_transformer.c')
-rw-r--r--archival/libarchive/open_transformer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c
index 9fefd4aad..4a4bf3916 100644
--- a/archival/libarchive/open_transformer.c
+++ b/archival/libarchive/open_transformer.c
@@ -278,8 +278,7 @@ static transformer_state_t *open_transformer(const char *fname, int fail_if_not_
if (ENABLE_FEATURE_SEAMLESS_LZMA) {
/* .lzma has no header/signature, can only detect it by extension */
- char *sfx = strrchr(fname, '.');
- if (sfx && strcmp(sfx+1, "lzma") == 0) {
+ if (is_suffixed_with(fname, ".lzma")) {
xstate = xzalloc(sizeof(*xstate));
xstate->src_fd = fd;
xstate->xformer = unpack_lzma_stream;