diff options
author | Jim Meyering <meyering@redhat.com> | 2009-10-01 12:03:07 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-10-01 12:04:23 +0200 |
commit | 5748ee73326ada39f68c9d684e2964aaeac20253 (patch) | |
tree | 313ccbd79aa949d68779fa8c2178e168c65e9c99 /libparted/fs/hfs | |
parent | 55460a74e80e8c47d4440885992cc176bfbd0638 (diff) | |
download | parted-5748ee73326ada39f68c9d684e2964aaeac20253.tar.gz |
build: avoid a shadowing warning
* libparted/fs/hfs/advfs_plus.c (hfsplus_get_empty_end): Rename local,
"link" to avoid shadowing the syscall.
* libparted/fs/hfs/advfs.c (hfs_get_empty_end): Likewise.
Diffstat (limited to 'libparted/fs/hfs')
-rw-r--r-- | libparted/fs/hfs/advfs.c | 12 | ||||
-rw-r--r-- | libparted/fs/hfs/advfs_plus.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/libparted/fs/hfs/advfs.c b/libparted/fs/hfs/advfs.c index b214fdc..bf4595f 100644 --- a/libparted/fs/hfs/advfs.c +++ b/libparted/fs/hfs/advfs.c @@ -268,19 +268,19 @@ hfs_get_empty_end (const PedFileSystem *fs) HfsPrivateFSData* priv_data = (HfsPrivateFSData*) fs->type_specific; HfsMasterDirectoryBlock* mdb = priv_data->mdb; - HfsPrivateLinkExtent* link; unsigned int block, last_bad, end_free_blocks; /* find the next block to the last bad block of the volume */ if (!hfs_read_bad_blocks (fs)) return 0; + HfsPrivateLinkExtent* l; last_bad = 0; - for (link = priv_data->bad_blocks_xtent_list; link; link = link->next) { - if ((unsigned int) PED_BE16_TO_CPU (link->extent.start_block) - + PED_BE16_TO_CPU (link->extent.block_count) > last_bad) - last_bad = PED_BE16_TO_CPU (link->extent.start_block) - + PED_BE16_TO_CPU (link->extent.block_count); + for (l = priv_data->bad_blocks_xtent_list; l; l = l->next) { + if ((unsigned int) PED_BE16_TO_CPU (l->extent.start_block) + + PED_BE16_TO_CPU (l->extent.block_count) > last_bad) + last_bad = PED_BE16_TO_CPU (l->extent.start_block) + + PED_BE16_TO_CPU (l->extent.block_count); } /* Count the free blocks from last_bad to the end of the volume */ diff --git a/libparted/fs/hfs/advfs_plus.c b/libparted/fs/hfs/advfs_plus.c index 94bfe3b..8543904 100644 --- a/libparted/fs/hfs/advfs_plus.c +++ b/libparted/fs/hfs/advfs_plus.c @@ -275,7 +275,6 @@ hfsplus_get_empty_end (const PedFileSystem *fs) HfsPPrivateFSData* priv_data = (HfsPPrivateFSData*) fs->type_specific; HfsPVolumeHeader* vh = priv_data->vh; - HfsPPrivateLinkExtent* link; unsigned int block, last_bad, end_free_blocks; /* find the next block to the last bad block of the volume */ @@ -287,12 +286,13 @@ hfsplus_get_empty_end (const PedFileSystem *fs) return 0; } + HfsPPrivateLinkExtent* l; last_bad = 0; - for (link = priv_data->bad_blocks_xtent_list; link; link = link->next) { - if ((unsigned int) PED_BE32_TO_CPU (link->extent.start_block) - + PED_BE32_TO_CPU (link->extent.block_count) > last_bad) - last_bad = PED_BE32_TO_CPU (link->extent.start_block) - + PED_BE32_TO_CPU (link->extent.block_count); + for (l = priv_data->bad_blocks_xtent_list; l; l = l->next) { + if ((unsigned int) PED_BE32_TO_CPU (l->extent.start_block) + + PED_BE32_TO_CPU (l->extent.block_count) > last_bad) + last_bad = PED_BE32_TO_CPU (l->extent.start_block) + + PED_BE32_TO_CPU (l->extent.block_count); } /* Count the free blocks from last_bad to the end of the volume */ |