[gparted] Remove unnecessary close_device_and_disk()
- From: Mike Fleetwood <mfleetwo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Remove unnecessary close_device_and_disk()
- Date: Sun, 11 Nov 2012 11:49:45 +0000 (UTC)
commit 7dd46df954cd8e380b671bad31d010f54aef70d6
Author: Matthias Gehre <M Gehre gmx de>
Date: Tue Oct 30 10:39:30 2012 +0100
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.
src/GParted_Core.cc | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index ad70248..fedc2e4 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -240,8 +240,6 @@ void GParted_Core::set_devices( std::vector<Device> & devices )
}
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() ) ;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]