From 69aa8cf88e57deb4caf8278378f8df35a66f7d3b Mon Sep 17 00:00:00 2001 From: Sergei Shtepa Date: Mon, 5 Feb 2024 15:40:09 +0100 Subject: [PATCH] use method Id() instead m_id.Get() --- lib/blksnap/Snapshot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/blksnap/Snapshot.cpp b/lib/blksnap/Snapshot.cpp index 40a0271..819c693 100644 --- a/lib/blksnap/Snapshot.cpp +++ b/lib/blksnap/Snapshot.cpp @@ -128,7 +128,7 @@ void CSnapshot::Take() { struct blksnap_uuid param; - uuid_copy(param.b, m_id.Get()); + uuid_copy(param.b, Id()); if (::ioctl(m_ctl->Get(), IOCTL_BLKSNAP_SNAPSHOT_TAKE, ¶m)) throw std::system_error(errno, std::generic_category(), "Failed to take snapshot."); @@ -138,7 +138,7 @@ void CSnapshot::Destroy() { struct blksnap_uuid param; - uuid_copy(param.b, m_id.Get()); + uuid_copy(param.b, Id()); if (::ioctl(m_ctl->Get(), IOCTL_BLKSNAP_SNAPSHOT_DESTROY, ¶m)) throw std::system_error(errno, std::generic_category(), "Failed to destroy snapshot."); @@ -146,9 +146,9 @@ void CSnapshot::Destroy() bool CSnapshot::WaitEvent(unsigned int timeoutMs, SBlksnapEvent& ev) { - struct blksnap_snapshot_event param; + struct blksnap_snapshot_event param = {0}; - uuid_copy(param.id.b, m_id.Get()); + uuid_copy(param.id.b, Id()); param.timeout_ms = timeoutMs; if (::ioctl(m_ctl->Get(), IOCTL_BLKSNAP_SNAPSHOT_WAIT_EVENT, ¶m))