]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: remove const specifier from nlmsghdr arg to virNetlinkDumpCallback()
authorLaine Stump <laine@laine.org>
Sun, 6 Jan 2019 22:35:47 +0000 (17:35 -0500)
committerLaine Stump <laine@laine.org>
Thu, 10 Jan 2019 17:35:43 +0000 (12:35 -0500)
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@laine.org>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/util/virnetdevip.c
src/util/virnetlink.h

index 9d308e440a9a07151ed3eb0b725a9414f68df25d..4c869739ee67ee15f1445d664a63e560f58fcfda 100644 (file)
@@ -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);
index debbd60f80f0ab2f35a03b8eff276ffef49c1887..37442be44c4cd8a0b62a71200cb4e7ba57157850 100644 (file)
@@ -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,