summaryrefslogtreecommitdiff
path: root/test/fence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/fence.cpp')
-rw-r--r--test/fence.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/fence.cpp b/test/fence.cpp
index ada650ff..c2828862 100644
--- a/test/fence.cpp
+++ b/test/fence.cpp
@@ -43,7 +43,6 @@ private:
void signalFence();
- std::unique_ptr<Fence> fence_;
EventDispatcher *dispatcher_;
UniqueFD eventFd_;
UniqueFD eventFd2_;
@@ -274,13 +273,14 @@ int FenceTest::run()
int ret;
if (i == expiredRequestId_) {
/* This request will have a fence, and it will expire. */
- fence_ = std::make_unique<Fence>(std::move(eventFd_));
- if (!fence_->isValid()) {
+ std::unique_ptr<Fence> fence =
+ std::make_unique<Fence>(std::move(eventFd_));
+ if (!fence->isValid()) {
cerr << "Fence should be valid" << endl;
return TestFail;
}
- ret = request->addBuffer(stream_, buffer.get(), std::move(fence_));
+ ret = request->addBuffer(stream_, buffer.get(), std::move(fence));
} else {
/* All other requests will have no Fence. */
ret = request->addBuffer(stream_, buffer.get());