perf: remote: Compare perf nparams against the correct constant

Currently 'virsh perf domain' errors out as the perf nparams is
incorrectly compared against REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX
instead of REMOTE_DOMAIN_PERF_EVENTS_MAX.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
This commit is contained in:
Nitesh Konkar 2017-03-16 17:25:15 +05:30 committed by Michal Privoznik
parent 696a8ff36e
commit 9dba52efd2
1 changed files with 1 additions and 1 deletions

View File

@ -3105,7 +3105,7 @@ remoteDispatchDomainGetPerfEvents(virNetServerPtr server ATTRIBUTE_UNUSED,
if (virDomainGetPerfEvents(dom, &params, &nparams, args->flags) < 0)
goto cleanup;
if (nparams > REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX) {
if (nparams > REMOTE_DOMAIN_PERF_EVENTS_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup;
}