summaryrefslogtreecommitdiff
path: root/src/TagArchive.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-02-26 13:21:27 +0100
committerMax Kellermann <max@duempel.org>2016-02-26 13:48:38 +0100
commitb1d60b5c85608df13c8032d0582125ad0ab4dd28 (patch)
treead81935631da577a71d8b4eb6b70d7dedab64f41 /src/TagArchive.cxx
parent99a05c56adbd42600341f187f15671b88b61eab5 (diff)
TagArchive: use InputStreamPtr
Diffstat (limited to 'src/TagArchive.cxx')
-rw-r--r--src/TagArchive.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/TagArchive.cxx b/src/TagArchive.cxx
index 777a7fe5f..1da2d72f2 100644
--- a/src/TagArchive.cxx
+++ b/src/TagArchive.cxx
@@ -35,11 +35,10 @@ tag_archive_scan(Path path, const TagHandler &handler, void *handler_ctx)
Mutex mutex;
Cond cond;
- auto *is = OpenArchiveInputStream(path, mutex, cond, IgnoreError());
- if (is == nullptr)
+ InputStreamPtr is(OpenArchiveInputStream(path, mutex, cond,
+ IgnoreError()));
+ if (!is)
return false;
- bool result = tag_stream_scan(*is, handler, handler_ctx);
- delete is;
- return result;
+ return tag_stream_scan(*is, handler, handler_ctx);
}