Skip to content

Commit

Permalink
L #-: Remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmontero committed Apr 30, 2024
1 parent b72b507 commit 884d9dc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/dm/DispatchManagerActions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2870,19 +2870,17 @@ int DispatchManager::backup_cancel(int vid,
int DispatchManager::restore(int vid, int img_id, int inc_id, int disk_id,
const RequestAttributes& ra, std::string& error_str)
{
ostringstream oss;

auto vm = vmpool->get(vid);

if ( vm == nullptr )
{
error_str ="Could not restore VM, it does not exist";
error_str = "Could not restore VM, it does not exist";
return -1;
}

if (vm->get_state() != VirtualMachine::POWEROFF)
{
error_str ="Could not restore VM, it must be in poweroff";
error_str = "Could not restore VM, it must be in poweroff";
return -1;
}

Expand Down

0 comments on commit 884d9dc

Please sign in to comment.