]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
xend_internal.c, sexpr.c: const-correctness fixes
authorJim Meyering <meyering@redhat.com>
Fri, 1 Aug 2008 14:43:12 +0000 (14:43 +0000)
committerJim Meyering <meyering@redhat.com>
Fri, 1 Aug 2008 14:43:12 +0000 (14:43 +0000)
ChangeLog
src/sexpr.c
src/sexpr.h
src/xend_internal.c

index 7a4a4776be0e9949c8f671b43cce396c1c2b075e..3face245d4afc47419fa596d3cd8a370fc0612a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@ Fri Aug  1 15:15:00 BST 2008 Daniel P. Berrange <berrange@redhat.com>
 Fri Aug  1 15:51:04 CEST 2008 Jim Meyering  <meyering@redhat.com>
 
        * virsh.c: more const-correctness fixes
+       * xend_internal.c, sexpr.c: Likewise.
 
 Fri Aug  1 13:57:00 BST 2008 Daniel P. Berrange <berrange@redhat.com>
 
index 90c549c1ee62e8a0cece990438a80362c6688056..b607e4147fff053f2a4a600f83b5e907141e1916 100644 (file)
@@ -519,7 +519,7 @@ sexpr_lookup(const struct sexpr *sexpr, const char *node)
  * Returns true if the key was found, false otherwise
  */
 int
-sexpr_has(struct sexpr *sexpr, const char *node)
+sexpr_has(const struct sexpr *sexpr, const char *node)
 {
     struct sexpr *s = sexpr_lookup_key(sexpr, node);
 
index 0559a27c784a2e172795dd7fb756a7364cd8a4bd..c3d038e4cadbc74534368672c064813db4497bf5 100644 (file)
@@ -51,5 +51,5 @@ int sexpr_node_copy(const struct sexpr *sexpr, const char *node, char **dst);
 const char *sexpr_fmt_node(const struct sexpr *sexpr, const char *fmt, ...)
   ATTRIBUTE_FORMAT(printf,2,3);
 struct sexpr *sexpr_lookup(const struct sexpr *sexpr, const char *node);
-int sexpr_has(struct sexpr *sexpr, const char *node);
+int sexpr_has(const struct sexpr *sexpr, const char *node);
 #endif
index 880a27962c32c5e94fe586e5b052cf152929fa1d..bb2edd2791a1fef88684d6cc244cee658ac37bb2 100644 (file)
@@ -1180,7 +1180,8 @@ xend_detect_config_version(virConnectPtr conn) {
  * Returns 0 in case of success and -1 in case of error
  */
 static int
-xenDaemonParseSxprOS(virConnectPtr xend, struct sexpr *node,
+xenDaemonParseSxprOS(virConnectPtr xend,
+                    const struct sexpr *node,
                      virDomainDefPtr def,
                      int hvm)
 {
@@ -1640,11 +1641,11 @@ error:
 static int
 xenDaemonParseSxprDisks(virConnectPtr conn,
                         virDomainDefPtr def,
-                        struct sexpr *root,
+                        const struct sexpr *root,
                         int hvm,
                         int xendConfigVersion)
 {
-    struct sexpr *cur, *node;
+    const struct sexpr *cur, *node;
     virDomainDiskDefPtr disk = NULL, prev = def->disks;
 
     for (cur = root; cur->kind == SEXPR_CONS; cur = cur->u.s.cdr) {
@@ -1803,10 +1804,10 @@ error:
 static int
 xenDaemonParseSxprNets(virConnectPtr conn,
                        virDomainDefPtr def,
-                       struct sexpr *root)
+                       const struct sexpr *root)
 {
     virDomainNetDefPtr net = NULL, prev = def->nets;
-    struct sexpr *cur, *node;
+    const struct sexpr *cur, *node;
     const char *tmp;
     int vif_index = 0;
 
@@ -1964,7 +1965,7 @@ error:
 static int
 xenDaemonParseSxprUSB(virConnectPtr conn,
                       virDomainDefPtr def,
-                      struct sexpr *root)
+                      const struct sexpr *root)
 {
     virDomainInputDefPtr prev = def->inputs;
     struct sexpr *cur, *node;
@@ -2007,7 +2008,7 @@ no_memory:
 static int
 xenDaemonParseSxprGraphicsOld(virConnectPtr conn,
                               virDomainDefPtr def,
-                              struct sexpr *root,
+                              const struct sexpr *root,
                               int hvm,
                               int xendConfigVersion)
 {
@@ -2085,10 +2086,10 @@ no_memory:
 static int
 xenDaemonParseSxprGraphicsNew(virConnectPtr conn,
                               virDomainDefPtr def,
-                              struct sexpr *root)
+                              const struct sexpr *root)
 {
     virDomainGraphicsDefPtr graphics = NULL;
-    struct sexpr *cur, *node;
+    const struct sexpr *cur, *node;
     const char *tmp;
 
     /* append network devices and framebuffer */