virDomainNumatuneNodeSpecified: Fix const correctness

The virDomainNumatuneNodeSpecified() function does not write into
passed @numatune pointer, it just reads from it. Therefore, the
argument should be const, which allows this function to be called
from places where virDomainNuma is already const (e.g. domain
validation code).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Michal Privoznik 2023-05-18 10:27:36 +02:00
parent 90404c5368
commit a152d856c3
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ struct _virDomainNuma {
bool bool
virDomainNumatuneNodeSpecified(virDomainNuma *numatune, virDomainNumatuneNodeSpecified(const virDomainNuma *numatune,
int cellid) int cellid)
{ {
if (numatune && if (numatune &&

View File

@ -210,7 +210,7 @@ int virDomainNumatuneSpecifiedMaxNode(virDomainNuma *numatune);
bool virDomainNumatuneNodesetIsAvailable(virDomainNuma *numatune, bool virDomainNumatuneNodesetIsAvailable(virDomainNuma *numatune,
virBitmap *auto_nodeset); virBitmap *auto_nodeset);
bool virDomainNumatuneNodeSpecified(virDomainNuma *numatune, bool virDomainNumatuneNodeSpecified(const virDomainNuma *numatune,
int cellid); int cellid);
int virDomainNumaDefParseXML(virDomainNuma *def, xmlXPathContextPtr ctxt); int virDomainNumaDefParseXML(virDomainNuma *def, xmlXPathContextPtr ctxt);