summaryrefslogtreecommitdiff
path: root/test/run_input.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-05-02 23:35:43 +0200
committerMax Kellermann <max@duempel.org>2016-05-02 23:35:43 +0200
commit69ed35ed71fc68b35e2e2e97902a3105d7d8443e (patch)
tree33587ad28089c4ef20cd63683eeddbdb9d8afafc /test/run_input.cxx
parent280d35a053d22e3791bade1215802effb268f8c0 (diff)
test/{run_input,dump_text_file}: use class ScopeLock
Diffstat (limited to 'test/run_input.cxx')
-rw-r--r--test/run_input.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/run_input.cxx b/test/run_input.cxx
index 4433611f8..757895124 100644
--- a/test/run_input.cxx
+++ b/test/run_input.cxx
@@ -49,7 +49,7 @@ tag_save(FILE *file, const Tag &tag)
static int
dump_input_stream(InputStream *is)
{
- is->Lock();
+ const ScopeLock protect(is->mutex);
/* print meta data */
@@ -84,12 +84,9 @@ dump_input_stream(InputStream *is)
Error error;
if (!is->Check(error)) {
LogError(error);
- is->Unlock();
return EXIT_FAILURE;
}
- is->Unlock();
-
return 0;
}