[lxc-devel] [PATCH 3/6] coverity: condition already checked for

Dwight Engen dwight.engen at oracle.com
Tue May 7 14:57:16 UTC 2013


Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
---
 src/lxc/bdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c
index 181e98e..fcde16b 100644
--- a/src/lxc/bdev.c
+++ b/src/lxc/bdev.c
@@ -1151,8 +1151,7 @@ static int overlayfs_clonepaths(struct bdev *orig, struct bdev *new, const char
 	if (strcmp(orig->type, "dir") == 0) {
 		char *delta;
 		int ret, len;
-		if (!snap)
-			return -1;
+
 		// if we have /var/lib/lxc/c2/rootfs, then delta will be
 		//            /var/lib/lxc/c2/delta0
 		delta = strdup(new->dest);
-- 
1.8.1.4






More information about the lxc-devel mailing list