Remove unnecessary close_device_and_disk()

1) lp_disk is not used and assigned NULL so doesn't need closing.
2) lp_device is already ped_device_open()ed and ped_device_close()d
within the above while loop.  lp_device will be set to NULL when the
while loop ends so this doesn't need closing either.  Hence
close_device_and_disk() is always passed with two NULL pointers and is a
no operation so can be removed.
This commit is contained in:
Matthias Gehre 2012-10-30 10:39:30 +01:00 committed by Mike Fleetwood
parent 500f1bcd9b
commit 7dd46df954
1 changed files with 0 additions and 2 deletions

View File

@ -240,8 +240,6 @@ void GParted_Core::set_devices( std::vector<Device> & devices )
} }
lp_device = ped_device_get_next( lp_device ) ; lp_device = ped_device_get_next( lp_device ) ;
} }
PedDisk* lp_disk = NULL ;
close_device_and_disk( lp_device, lp_disk ) ;
std::sort( device_paths .begin(), device_paths .end() ) ; std::sort( device_paths .begin(), device_paths .end() ) ;
} }