From: Zdenek Kabelac Date: Mon, 27 Feb 2012 10:19:00 +0000 (+0000) Subject: Add assert for oldname X-Git-Tag: v2_02_96~299 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=d2e33bed9435410f1cf9510f511a69212d2f299e;p=lvm2.git 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. --- diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c index 07e9a4197..f53478b64 100644 --- a/daemons/lvmetad/lvmetad-core.c +++ b/daemons/lvmetad/lvmetad-core.c @@ -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);