Exit early if possible to simplify the logic.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
virQEMUDriverConfigPtr cfg,
virQEMUCapsPtr qemuCaps ATTRIBUTE_UNUSED)
{
- if (cfg->seccompSandbox == 0)
+ if (cfg->seccompSandbox == 0) {
virCommandAddArgList(cmd, "-sandbox", "off", NULL);
- else if (cfg->seccompSandbox > 0)
+ return 0;
+ }
+
+ if (cfg->seccompSandbox > 0)
virCommandAddArgList(cmd, "-sandbox", "on", NULL);
return 0;