summaryrefslogtreecommitdiffstats
path: root/tools/lvchange.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2006-05-09 21:23:51 +0000
committerAlasdair Kergon <agk@redhat.com>2006-05-09 21:23:51 +0000
commit72b2cb613a57918dadf9722c59a30ca71d751c8e (patch)
treeae0130e37b873591370abd65ff44cb2a554db049 /tools/lvchange.c
parentb810c547004a98a7fc25c8dde65cf88d82ad9652 (diff)
downloadlvm2-72b2cb613a57918dadf9722c59a30ca71d751c8e.tar.gz
lvm2-72b2cb613a57918dadf9722c59a30ca71d751c8e.tar.xz
lvm2-72b2cb613a57918dadf9722c59a30ca71d751c8e.zip
Make SIZE_SHORT the default for display_size().
Fix some memory leaks in error paths found by coverity. Use C99 struct initialisers. Move DEFS into configure.h. Clean-ups to remove miscellaneous compiler warnings.
Diffstat (limited to 'tools/lvchange.c')
-rw-r--r--tools/lvchange.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/lvchange.c b/tools/lvchange.c
index 13c2b7a4..147519d0 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -150,7 +150,7 @@ static int lvchange_alloc(struct cmd_context *cmd, struct logical_volume *lv)
want_contiguous = strcmp(arg_str_value(cmd, contiguous_ARG, "n"), "n");
alloc = want_contiguous ? ALLOC_CONTIGUOUS : ALLOC_INHERIT;
- alloc = (alloc_policy_t) arg_uint_value(cmd, alloc_ARG, alloc);
+ alloc = arg_uint_value(cmd, alloc_ARG, alloc);
if (alloc == lv->alloc) {
log_error("Allocation policy of logical volume \"%s\" is "
@@ -186,7 +186,7 @@ static int lvchange_alloc(struct cmd_context *cmd, struct logical_volume *lv)
static int lvchange_readahead(struct cmd_context *cmd,
struct logical_volume *lv)
{
- unsigned int read_ahead = 0;
+ unsigned read_ahead = 0;
read_ahead = arg_uint_value(cmd, readahead_ARG, 0);
@@ -369,7 +369,7 @@ static int lvchange_tag(struct cmd_context *cmd, struct logical_volume *lv,
}
static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
- void *handle)
+ void *handle __attribute((unused)))
{
int doit = 0;
int archived = 0;