render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
Blob Blame History Raw
From 55efbb158069281e9b6c8f435cadbe0eba15640f Mon Sep 17 00:00:00 2001
Message-Id: <55efbb158069281e9b6c8f435cadbe0eba15640f@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Tue, 2 Aug 2016 13:41:47 +0200
Subject: [PATCH] util: json: Make first argument of virJSONValueCopy const

It's just read.

(cherry picked from commit 22ad4a7c0a546ca156f5a5b18ad2fcd6a699442c)
https://bugzilla.redhat.com/show_bug.cgi?id=1134878 [JSON backing]
https://bugzilla.redhat.com/show_bug.cgi?id=1247521 [gluster multi-host]
---
 src/util/virjson.c | 2 +-
 src/util/virjson.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virjson.c b/src/util/virjson.c
index afc98e3..b6d9a34 100644
--- a/src/util/virjson.c
+++ b/src/util/virjson.c
@@ -1241,7 +1241,7 @@ virJSONValueObjectForeachKeyValue(const virJSONValue *object,
 
 
 virJSONValuePtr
-virJSONValueCopy(virJSONValuePtr in)
+virJSONValueCopy(const virJSONValue *in)
 {
     size_t i;
     virJSONValuePtr out = NULL;
diff --git a/src/util/virjson.h b/src/util/virjson.h
index a5aef39..64cae88 100644
--- a/src/util/virjson.h
+++ b/src/util/virjson.h
@@ -171,6 +171,6 @@ int virJSONValueObjectForeachKeyValue(const virJSONValue *object,
                                       virJSONValueObjectIteratorFunc cb,
                                       void *opaque);
 
-virJSONValuePtr virJSONValueCopy(virJSONValuePtr in);
+virJSONValuePtr virJSONValueCopy(const virJSONValue *in);
 
 #endif /* __VIR_JSON_H_ */
-- 
2.9.2