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@xxxxxxxxxx> --- src/conf/numa_conf.c | 2 +- src/conf/numa_conf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index be0c4572c5..dd4997c759 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -116,7 +116,7 @@ struct _virDomainNuma { bool -virDomainNumatuneNodeSpecified(virDomainNuma *numatune, +virDomainNumatuneNodeSpecified(const virDomainNuma *numatune, int cellid) { if (numatune && diff --git a/src/conf/numa_conf.h b/src/conf/numa_conf.h index bbb928abb2..f5a20315b6 100644 --- a/src/conf/numa_conf.h +++ b/src/conf/numa_conf.h @@ -210,7 +210,7 @@ int virDomainNumatuneSpecifiedMaxNode(virDomainNuma *numatune); bool virDomainNumatuneNodesetIsAvailable(virDomainNuma *numatune, virBitmap *auto_nodeset); -bool virDomainNumatuneNodeSpecified(virDomainNuma *numatune, +bool virDomainNumatuneNodeSpecified(const virDomainNuma *numatune, int cellid); int virDomainNumaDefParseXML(virDomainNuma *def, xmlXPathContextPtr ctxt); -- 2.39.3