summaryrefslogtreecommitdiffstats
path: root/tools/vgrename.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/vgrename.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/vgrename.c')
-rw-r--r--tools/vgrename.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/vgrename.c b/tools/vgrename.c
index df62dbac..3facaf7e 100644
--- a/tools/vgrename.c
+++ b/tools/vgrename.c
@@ -18,7 +18,7 @@
int vgrename(struct cmd_context *cmd, int argc, char **argv)
{
char *dev_dir;
- unsigned int length;
+ unsigned length;
struct id id;
int consistent = 1;
int match = 0;
@@ -90,9 +90,9 @@ int vgrename(struct cmd_context *cmd, int argc, char **argv)
log_suppress(2);
found_id = id_read_format(&id, vg_name_old);
log_suppress(0);
- if (found_id && (vg_name = vgname_from_vgid(cmd->mem, id.uuid))) {
+ if (found_id && (vg_name = vgname_from_vgid(cmd->mem, (char *)id.uuid))) {
vg_name_old = vg_name;
- vgid = id.uuid;
+ vgid = (char *)id.uuid;
} else
vgid = NULL;