[PATCH 1/7] sock_diag.7: Remove unneeded casts

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

 



The type `struct sockaddr_nl *` is implicitly casted to `void *`.
Explicitly casting can silence warnings when mistakes are made, so it's
better to remove those casts when possible.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx>
---
 man7/sock_diag.7 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man7/sock_diag.7 b/man7/sock_diag.7
index a5816ceca..185fb77ee 100644
--- a/man7/sock_diag.7
+++ b/man7/sock_diag.7
@@ -680,7 +680,7 @@ send_query(int fd)
         .iov_len = sizeof(req)
     };
     struct msghdr msg = {
-        .msg_name = (void *) &nladdr,
+        .msg_name = &nladdr,
         .msg_namelen = sizeof(nladdr),
         .msg_iov = &iov,
         .msg_iovlen = 1
@@ -765,7 +765,7 @@ receive_responses(int fd)
 
     for (;;) {
         struct msghdr msg = {
-            .msg_name = (void *) &nladdr,
+            .msg_name = &nladdr,
             .msg_namelen = sizeof(nladdr),
             .msg_iov = &iov,
             .msg_iovlen = 1
-- 
2.28.0




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux