From f0bfb6302d49442d4a924b1eae5772cc952e0def Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 4 Mar 2013 18:02:42 +0000 Subject: [PATCH] Refactor loop device setup code in LXC Minor re-factoring of code for setting up loop devices in the LXC controller Signed-off-by: Daniel P. Berrange --- src/lxc/lxc_controller.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 45e7aac643..3634194386 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -383,12 +383,13 @@ static int virLXCControllerSetupLoopDevices(virLXCControllerPtr ctrl) int ret = -1; for (i = 0 ; i < ctrl->def->nfss ; i++) { + virDomainFSDefPtr fs = ctrl->def->fss[i]; int fd; - if (ctrl->def->fss[i]->type != VIR_DOMAIN_FS_TYPE_FILE) + if (fs->type != VIR_DOMAIN_FS_TYPE_FILE) continue; - fd = virLXCControllerSetupLoopDevice(ctrl->def->fss[i]); + fd = virLXCControllerSetupLoopDevice(fs); if (fd < 0) goto cleanup; -- GitLab