diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-03-24 09:59:50 -0400 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-03-25 19:55:33 +0100 |
commit | 9d4af4f63e298ebf312765a794e39bcca5ad601b (patch) | |
tree | bef811fd0024db00ad2e541a32ff065c7d61b887 | |
parent | 726c4d452fe00595bf1ce7c49f5084b5de2eb9e6 (diff) | |
download | drakx-9d4af4f63e298ebf312765a794e39bcca5ad601b.tar drakx-9d4af4f63e298ebf312765a794e39bcca5ad601b.tar.gz drakx-9d4af4f63e298ebf312765a794e39bcca5ad601b.tar.bz2 drakx-9d4af4f63e298ebf312765a794e39bcca5ad601b.tar.xz drakx-9d4af4f63e298ebf312765a794e39bcca5ad601b.zip |
simplify (needed for next commit)
-rwxr-xr-x | perl-install/c/stuff.xs.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index e6bcfa0db..73597cbd7 100755 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -598,8 +598,9 @@ get_disk_partitions(char * device_path) if(dev) { PedDisk* disk = ped_disk_new(dev); PedPartition *part = NULL; - if(disk) - part = ped_disk_next_partition(disk, NULL); + if(!disk) + return; + part = ped_disk_next_partition(disk, NULL); while(part) { if(part->num != -1) { char desc[4196]; @@ -628,8 +629,7 @@ get_disk_partitions(char * device_path) } part = ped_disk_next_partition(disk, part); } - if(disk) - ped_disk_destroy(disk); + ped_disk_destroy(disk); } int |