diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index c4f7a2505..8bdc24113 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -35,6 +35,7 @@ #include "str_list.h" #include "segtype.h" #include "lvmcache.h" +#include "dev-cache.h" #ifdef HAVE_LIBDL #include "sharedlib.h" diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index d11529cc8..14e62582d 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -103,7 +103,7 @@ static int _add_pv_to_vg(struct format_instance *fid, struct volume_group *vg, if (!alloc_pv_segment_whole_pv(mem, pv)) { stack; - return NULL; + return 0; } pvl->pv = pv;