From b926605531d8142519ef51a37e69864958f9849b Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 21 Jan 2002 16:15:25 +0000 Subject: [PATCH] o fail if create_pv_list would produce an empty list. --- tools/toollib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/toollib.c b/tools/toollib.c index 9ae241de0..725800b7f 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -312,7 +312,6 @@ struct list *create_pv_list(struct pool *mem, log_err("No free extents on physical volume %s", argv[i]); continue; - /* FIXME Buy check not empty at end! */ } if (!(new_pvl = pool_alloc(mem, sizeof(*new_pvl)))) { @@ -324,5 +323,5 @@ struct list *create_pv_list(struct pool *mem, list_add(r, &new_pvl->list); } - return r; + return list_empty(r) ? r : NULL; } -- 2.43.5