[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v3 3/4] virSocketAddrBroadcastByPrefix(): constify target of "addr" parameter



... and adapt functions that would cast away the new const qualifier.

Signed-off-by: Laszlo Ersek <lersek redhat com>
---
 src/util/virsocketaddr.h | 4 ++--
 src/util/virsocketaddr.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/util/virsocketaddr.h b/src/util/virsocketaddr.h
index 14b3a8b..14113e0 100644
--- a/src/util/virsocketaddr.h
+++ b/src/util/virsocketaddr.h
@@ -105,10 +105,10 @@ int virSocketAddrMask(const virSocketAddr    *addr,
 int virSocketAddrMaskByPrefix(const virSocketAddr    *addr,
                               unsigned int           prefix,
                               virSocketAddrPtr       network);
-int virSocketAddrBroadcast(const virSocketAddrPtr addr,
+int virSocketAddrBroadcast(const virSocketAddr    *addr,
                            const virSocketAddrPtr netmask,
                            virSocketAddrPtr       broadcast);
-int virSocketAddrBroadcastByPrefix(const virSocketAddrPtr addr,
+int virSocketAddrBroadcastByPrefix(const virSocketAddr    *addr,
                                    unsigned int           prefix,
                                    virSocketAddrPtr       broadcast);
 
diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c
index 0d415df..ca6e2b5 100644
--- a/src/util/virsocketaddr.c
+++ b/src/util/virsocketaddr.c
@@ -472,7 +472,7 @@ virSocketAddrMaskByPrefix(const virSocketAddr    *addr,
  * Returns 0 in case of success, or -1 on error.
  */
 int
-virSocketAddrBroadcast(const virSocketAddrPtr addr,
+virSocketAddrBroadcast(const virSocketAddr    *addr,
                        const virSocketAddrPtr netmask,
                        virSocketAddrPtr       broadcast)
 {
@@ -502,7 +502,7 @@ virSocketAddrBroadcast(const virSocketAddrPtr addr,
  * Returns 0 in case of success, or -1 on error.
  */
 int
-virSocketAddrBroadcastByPrefix(const virSocketAddrPtr addr,
+virSocketAddrBroadcastByPrefix(const virSocketAddr    *addr,
                                unsigned int           prefix,
                                virSocketAddrPtr       broadcast)
 {
-- 
1.8.3.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]