[PATCH 1/4] util: remove const specifier from nlmsghdr arg to virNetlinkDumpCallback()

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

 



This is problematic if a callback function wants to send the nlmsghdr
to a library function that has no "const" in its prototype
(e.g. nlmsg_find_attr())

Signed-off-by: Laine Stump <laine@xxxxxxxxx>
---
 src/util/virnetdevip.c | 2 +-
 src/util/virnetlink.h  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c
index 9d308e440a..4c869739ee 100644
--- a/src/util/virnetdevip.c
+++ b/src/util/virnetdevip.c
@@ -506,7 +506,7 @@ struct virNetDevIPCheckIPv6ForwardingData {
 };
 
 static int
-virNetDevIPCheckIPv6ForwardingCallback(const struct nlmsghdr *resp,
+virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr *resp,
                                        void *opaque)
 {
     struct rtmsg *rtmsg = NLMSG_DATA(resp);
diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h
index debbd60f80..37442be44c 100644
--- a/src/util/virnetlink.h
+++ b/src/util/virnetlink.h
@@ -79,7 +79,7 @@ int virNetlinkCommand(struct nl_msg *nl_msg,
                       uint32_t src_pid, uint32_t dst_pid,
                       unsigned int protocol, unsigned int groups);
 
-typedef int (*virNetlinkDumpCallback)(const struct nlmsghdr *resp,
+typedef int (*virNetlinkDumpCallback)(struct nlmsghdr *resp,
                                       void *data);
 
 int virNetlinkDumpCommand(struct nl_msg *nl_msg,
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux