summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2016-11-22 12:55:34 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2016-11-22 12:55:34 +0000
commit3a43a14cf35559df6f314a30b7eeb4094f1cc44e (patch)
tree4bce6f39cb61c669f19f24e10927a257af823402 /usr.sbin
parentf7dc2043e60a1d425fb1cf1617fdbb6bd469b70c (diff)
There is no need for res when there is already ret.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/vmd/vmd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/vmd/vmd.c b/usr.sbin/vmd/vmd.c
index c89b66ca5ba..228882e6406 100644
--- a/usr.sbin/vmd/vmd.c
+++ b/usr.sbin/vmd/vmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmd.c,v 1.40 2016/11/22 11:31:38 edd Exp $ */
+/* $OpenBSD: vmd.c,v 1.41 2016/11/22 12:55:33 reyk Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -455,7 +455,7 @@ vmd_configure(void)
{
struct vmd_vm *vm;
struct vmd_switch *vsw;
- int res, ret = 0;
+ int ret = 0;
/*
* pledge in the parent process:
@@ -497,16 +497,15 @@ vmd_configure(void)
vm->vm_params.vmc_params.vcp_name);
continue;
}
- res = config_setvm(&env->vmd_ps, vm, -1);
- if (res == -1) {
+ if ((ret = config_setvm(&env->vmd_ps, vm, -1)) == -1) {
log_warn("%s: failed to create vm %s",
__func__,
vm->vm_params.vmc_params.vcp_name);
- ret = -1;
vm_remove(vm);
goto fail;
}
}
+
fail:
return (ret);
}