diff options
author | Max Kellermann <max@duempel.org> | 2016-02-26 13:21:27 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2016-02-26 13:48:38 +0100 |
commit | b1d60b5c85608df13c8032d0582125ad0ab4dd28 (patch) | |
tree | ad81935631da577a71d8b4eb6b70d7dedab64f41 | |
parent | 99a05c56adbd42600341f187f15671b88b61eab5 (diff) |
TagArchive: use InputStreamPtr
-rw-r--r-- | src/TagArchive.cxx | 9 |
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); } |