From: Nitesh Konkar Date: Thu, 16 Mar 2017 11:55:15 +0000 (+0530) Subject: perf: remote: Compare perf nparams against the correct constant X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9dba52efd29f357934bd55c900d7cbbedab20f4c;p=libvirt.git 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 --- diff --git a/daemon/remote.c b/daemon/remote.c index f2b9b9aec4..1c9708c681 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -3105,7 +3105,7 @@ remoteDispatchDomainGetPerfEvents(virNetServerPtr server ATTRIBUTE_UNUSED, if (virDomainGetPerfEvents(dom, ¶ms, &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; }