test/{run_input,dump_text_file}: use class ScopeLock
This commit is contained in:
@@ -51,17 +51,14 @@ dump_input_stream(InputStreamPtr &&is)
|
||||
dump_text_file(tis);
|
||||
}
|
||||
|
||||
is->Lock();
|
||||
const ScopeLock protect(is->mutex);
|
||||
|
||||
Error error;
|
||||
if (!is->Check(error)) {
|
||||
LogError(error);
|
||||
is->Unlock();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
is->Unlock();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user