lxc: Remove unnecessary error label

Since lxcConvertSize already creates an error message, there
is no need to use an error: label in lxcSetMemTune to just
overwrite or essentially rewrite the same error. So remove
the label.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
John Ferlan 2018-09-21 07:26:00 -04:00
parent 7eb56dcd9e
commit f6399b9d89

View File

@ -763,7 +763,7 @@ lxcSetMemTune(virDomainDefPtr def, virConfPtr properties)
"lxc.cgroup.memory.limit_in_bytes",
&value) > 0) {
if (lxcConvertSize(value, &size) < 0)
goto error;
return -1;
size = size / 1024;
virDomainDefSetMemoryTotal(def, size);
def->mem.hard_limit = virMemoryLimitTruncate(size);
@ -773,7 +773,7 @@ lxcSetMemTune(virDomainDefPtr def, virConfPtr properties)
"lxc.cgroup.memory.soft_limit_in_bytes",
&value) > 0) {
if (lxcConvertSize(value, &size) < 0)
goto error;
return -1;
def->mem.soft_limit = virMemoryLimitTruncate(size / 1024);
}
@ -781,16 +781,10 @@ lxcSetMemTune(virDomainDefPtr def, virConfPtr properties)
"lxc.cgroup.memory.memsw.limit_in_bytes",
&value) > 0) {
if (lxcConvertSize(value, &size) < 0)
goto error;
return -1;
def->mem.swap_hard_limit = virMemoryLimitTruncate(size / 1024);
}
return 0;
error:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("failed to parse integer: '%s'"), value);
return -1;
}
static int