diff options
author | Alasdair Kergon <agk@redhat.com> | 2006-05-09 21:23:51 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2006-05-09 21:23:51 +0000 |
commit | 72b2cb613a57918dadf9722c59a30ca71d751c8e (patch) | |
tree | ae0130e37b873591370abd65ff44cb2a554db049 /lib/format1/lvm1-label.c | |
parent | b810c547004a98a7fc25c8dde65cf88d82ad9652 (diff) | |
download | lvm2-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 'lib/format1/lvm1-label.c')
-rw-r--r-- | lib/format1/lvm1-label.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/format1/lvm1-label.c b/lib/format1/lvm1-label.c index 276b063e..320651c5 100644 --- a/lib/format1/lvm1-label.c +++ b/lib/format1/lvm1-label.c @@ -61,16 +61,16 @@ static int _lvm1_read(struct labeller *l, struct device *dev, char *buf, struct vg_disk vgd; struct lvmcache_info *info; const char *vgid = NULL; - int exported = 0; + unsigned exported = 0; munge_pvd(dev, pvd); if (*pvd->vg_name && read_vgd(dev, &vgd, pvd)) { - vgid = vgd.vg_uuid; + vgid = (char *) vgd.vg_uuid; exported = pvd->pv_status & VG_EXPORTED; } - if (!(info = lvmcache_add(l, pvd->pv_uuid, dev, pvd->vg_name, vgid, + if (!(info = lvmcache_add(l, (char *)pvd->pv_uuid, dev, (char *)pvd->vg_name, vgid, exported))) { stack; return 0; @@ -103,13 +103,13 @@ static void _lvm1_destroy(struct labeller *l) } struct label_ops _lvm1_ops = { - can_handle:_lvm1_can_handle, - write:_lvm1_write, - read:_lvm1_read, - verify:_lvm1_can_handle, - initialise_label:_lvm1_initialise_label, - destroy_label:_lvm1_destroy_label, - destroy:_lvm1_destroy + .can_handle = _lvm1_can_handle, + .write = _lvm1_write, + .read = _lvm1_read, + .verify = _lvm1_can_handle, + .initialise_label = _lvm1_initialise_label, + .destroy_label = _lvm1_destroy_label, + .destroy = _lvm1_destroy, }; struct labeller *lvm1_labeller_create(struct format_type *fmt) |