From 065a9ed10f7a8600e867879b3e9c683df283c7b0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 7 Mar 2016 13:57:07 +0100 Subject: [PATCH] archive/iso9660: add local variable "filename" --- src/archive/plugins/Iso9660ArchivePlugin.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/archive/plugins/Iso9660ArchivePlugin.cxx b/src/archive/plugins/Iso9660ArchivePlugin.cxx index c149d0d7e..6c71f9ba0 100644 --- a/src/archive/plugins/Iso9660ArchivePlugin.cxx +++ b/src/archive/plugins/Iso9660ArchivePlugin.cxx @@ -97,12 +97,13 @@ Iso9660ArchiveFile::Visit(const char *psz_path, ArchiveVisitor &visitor) _CDIO_LIST_FOREACH (entnode, entlist) { auto *statbuf = (iso9660_stat_t *) _cdio_list_node_data(entnode); + const char *filename = statbuf->filename; strcpy(pathname, psz_path); - strcat(pathname, statbuf->filename); + strcat(pathname, filename); if (iso9660_stat_s::_STAT_DIR == statbuf->type ) { - if (strcmp(statbuf->filename, ".") && strcmp(statbuf->filename, "..")) { + if (strcmp(filename, ".") && strcmp(filename, "..")) { strcat(pathname, "/"); Visit(pathname, visitor); }