1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Add assert for oldname

Code cannot proceed if oldname would be NULL.
Since lvmetad currently doesn't use logging mechanism of lvm to report
internal errors - stay with current code style of lvmetad which uses
plain asserts for cases like this.
This commit is contained in:
Zdenek Kabelac 2012-02-27 10:19:00 +00:00
parent 25555737bd
commit d2e33bed94

View File

@ -595,6 +595,7 @@ static int remove_metadata(lvmetad_state *s, const char *vgid, int update_pvids)
if (!old)
return 0;
assert(oldname);
if (update_pvids)
update_pvid_to_vgid(s, old, "#orphan", 0);