Skip to content

Commit

Permalink
Move code
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Sep 7, 2023
1 parent 5511760 commit e5c8014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/piscsi/piscsi_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ void PiscsiResponse::GetDevice(const Device& device, PbDevice& pb_device, const
pb_device.set_allocated_properties(GetDeviceProperties(device).release());

auto status = make_unique<PbDeviceStatus>();
pb_device.set_allocated_status(status.release());
status->set_protected_(device.IsProtected());
status->set_stopped(device.IsStopped());
status->set_removed(device.IsRemoved());
status->set_locked(device.IsLocked());
pb_device.set_allocated_status(status.release());

if (device.SupportsParams()) { //NOSONAR The allocated memory is managed by protobuf
for (const auto& [key, value] : device.GetParams()) {
Expand Down

0 comments on commit e5c8014

Please sign in to comment.