[PATCH] adjust for const-correctness
Jim Meyering
meyering at redhat.com
Tue Jun 24 13:46:21 UTC 2008
* libparted/arch/linux.c (_blkpg_add_partition): Make the "part"
parameter "const".
(_disk_sync_part_table): Make local "part" const.
---
libparted/arch/linux.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 29be37d..3b8838a 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2144,7 +2144,7 @@ _blkpg_part_command (PedDevice* dev, struct blkpg_partition* part, int op)
}
static int
-_blkpg_add_partition (PedDisk* disk, PedPartition* part)
+_blkpg_add_partition (PedDisk* disk, const PedPartition *part)
{
struct blkpg_partition linux_part;
const char* vol_name;
@@ -2223,7 +2223,7 @@ _disk_sync_part_table (PedDisk* disk)
}
for (i = 1; i <= last; i++) {
- PedPartition* part;
+ const PedPartition *part;
part = ped_disk_get_partition (disk, i);
if (part) {
--
1.5.6.58.g8c87e
More information about the parted-devel
mailing list