summaryrefslogtreecommitdiffstats
path: root/tools/lvconvert.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2011-04-09 19:05:23 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2011-04-09 19:05:23 +0000
commitc67d2b4dd4941a4119e4c4ad1fdd8fb9d161cbf7 (patch)
tree5c1798d594c0bcd2e3830485bde0b3be12028ff1 /tools/lvconvert.c
parenta1eba521e3cd652a8e72e662866e593d6f949fc2 (diff)
downloadlvm2-c67d2b4dd4941a4119e4c4ad1fdd8fb9d161cbf7.tar.gz
lvm2-c67d2b4dd4941a4119e4c4ad1fdd8fb9d161cbf7.tar.xz
lvm2-c67d2b4dd4941a4119e4c4ad1fdd8fb9d161cbf7.zip
Fix incorrect tests for dm_snprintf() failure
As the memory is preallocated based on arg size in these cases, the error would be quite hard to trigger here anyway.
Diffstat (limited to 'tools/lvconvert.c')
-rw-r--r--tools/lvconvert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 49d39cfd..7f496013 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -481,7 +481,7 @@ int lvconvert_poll(struct cmd_context *cmd, struct logical_volume *lv,
if (!uuid || !lv_full_name)
return_0;
- if (!dm_snprintf(lv_full_name, len, "%s/%s", lv->vg->name, lv->name))
+ if (dm_snprintf(lv_full_name, len, "%s/%s", lv->vg->name, lv->name) < 0)
return_0;
memcpy(uuid, &lv->lvid, sizeof(lv->lvid));