Merge pull request #19437 from trociny/wip-mock-valgrind

test/rbd_mirror: "use of uninitialised value" valgrind warning

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2017-12-12 10:09:15 -05:00 committed by GitHub
commit 548bc8bad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -692,14 +692,14 @@ public:
EXPECT_CALL(mock_image_sync_throttler, start_op(sync_id, _))
.WillOnce(Invoke([on_call, on_start_ctx] (const std::string &,
Context *ctx) {
if (on_call != nullptr) {
on_call->complete(0);
}
if (on_start_ctx != nullptr) {
*on_start_ctx = ctx;
} else {
ctx->complete(0);
}
if (on_call != nullptr) {
on_call->complete(0);
}
}));
}