From e44c0254f7ba3d52fea70e9f003a646a831ab573 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 7 Mar 2016 13:15:07 +0100 Subject: [PATCH] archive/iso9660: make variables more local --- src/archive/plugins/Iso9660ArchivePlugin.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/archive/plugins/Iso9660ArchivePlugin.cxx b/src/archive/plugins/Iso9660ArchivePlugin.cxx index ba415d3c5..c149d0d7e 100644 --- a/src/archive/plugins/Iso9660ArchivePlugin.cxx +++ b/src/archive/plugins/Iso9660ArchivePlugin.cxx @@ -86,18 +86,17 @@ static constexpr Domain iso9660_domain("iso9660"); inline void Iso9660ArchiveFile::Visit(const char *psz_path, ArchiveVisitor &visitor) { - CdioList_t *entlist; - CdioListNode_t *entnode; - iso9660_stat_t *statbuf; char pathname[4096]; - entlist = iso9660_ifs_readdir (iso, psz_path); + auto *entlist = iso9660_ifs_readdir (iso, psz_path); if (!entlist) { return; } /* Iterate over the list of nodes that iso9660_ifs_readdir gives */ + CdioListNode_t *entnode; _CDIO_LIST_FOREACH (entnode, entlist) { - statbuf = (iso9660_stat_t *) _cdio_list_node_data (entnode); + auto *statbuf = (iso9660_stat_t *) + _cdio_list_node_data(entnode); strcpy(pathname, psz_path); strcat(pathname, statbuf->filename);