bug-hurd
[Top][All Lists]
Advanced

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

[PATCH 28/29] device/net_io.c (net_getstat): cast arguments to memset()


From: Marin Ramesa
Subject: [PATCH 28/29] device/net_io.c (net_getstat): cast arguments to memset()
Date: Mon, 9 Dec 2013 23:57:43 +0100

* device/net_io.c (net_getstat) (memset) ((char *)status + addr_byte_count): 
Cast to (void *).
(net_getstat) (memset) (addr_int_count * sizeof(int) - addr_byte_count): Cast 
to size_t.

---
 device/net_io.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/device/net_io.c b/device/net_io.c
index 74c053c..d85ec63 100644
--- a/device/net_io.c
+++ b/device/net_io.c
@@ -1419,8 +1419,8 @@ printf ("net_getstat: count: %d, addr_int_count: %d\n",
 
                memcpy((void *)status, (void *)ifp->if_address, 
(size_t)addr_byte_count);
                if (addr_byte_count < addr_int_count * sizeof(int))
-                   memset((char *)status + addr_byte_count, 0, 
-                         (addr_int_count * sizeof(int)
+                   memset((void *)((char *)status + addr_byte_count), 0, 
+                         (size_t)(addr_int_count * sizeof(int)
                                      - addr_byte_count));
 
                for (i = 0; i < addr_int_count; i++) {
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]