]> sourceware.org Git - lvm2.git/commitdiff
Add assert for oldname
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 27 Feb 2012 10:19:00 +0000 (10:19 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 27 Feb 2012 10:19:00 +0000 (10:19 +0000)
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.

daemons/lvmetad/lvmetad-core.c

index 07e9a4197526172055c55418646517f3c43c6141..f53478b643573353bd64a9e7a22cc6747f52b53a 100644 (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);
This page took 0.033691 seconds and 5 git commands to generate.