[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 27/29] device/net_io.c (net_getstat): cast arguments to memcpy()
From: |
Marin Ramesa |
Subject: |
[PATCH 27/29] device/net_io.c (net_getstat): cast arguments to memcpy() |
Date: |
Mon, 9 Dec 2013 23:57:42 +0100 |
* device/net_io.c (net_getstat) (memcpy) (status): Cast to (void *).
(net_getstat) (memcpy) (if_address): Likewise.
(net_getstat) (memcpy) (addr_byte_count): Cast to size_t.
---
device/net_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/device/net_io.c b/device/net_io.c
index f437340..74c053c 100644
--- a/device/net_io.c
+++ b/device/net_io.c
@@ -1417,7 +1417,7 @@ printf ("net_getstat: count: %d, addr_int_count: %d\n",
return (D_INVALID_OPERATION);
}
- memcpy(status, ifp->if_address, addr_byte_count);
+ 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)
--
1.8.1.4
- [PATCH 20/29] device/ds_routines.c: remove forward declaration, (continued)
- [PATCH 20/29] device/ds_routines.c: remove forward declaration, Marin Ramesa, 2013/12/09
- [PATCH 21/29] device/ds_routines.c (device_write_get): check if io_count is larger or equal to zero and cast it to size_t, Marin Ramesa, 2013/12/09
- [PATCH 22/29] device/kmsg.c (kmsgread): check if io_count is larger or equal to zero and cast it to vm_size_t, Marin Ramesa, 2013/12/09
- [PATCH 23/29] device/kmsg.c (kmsgread, kmsg_read_done): cast arguments to memcpy(), Marin Ramesa, 2013/12/09
- [PATCH 24/29] device/kmsg.c (kmsg_read_done): check if amt is negative, Marin Ramesa, 2013/12/09
- [PATCH 25/29] device/net_io.c: remove forward declarations, Marin Ramesa, 2013/12/09
- [PATCH 26/29] device/net_io.c (net_getstat): check if addr_byte_count is negative, Marin Ramesa, 2013/12/09
- [PATCH 27/29] device/net_io.c (net_getstat): cast arguments to memcpy(),
Marin Ramesa <=
- [PATCH 28/29] device/net_io.c (net_getstat): cast arguments to memset(), Marin Ramesa, 2013/12/09
- [PATCH 29/29] device/subrs.c: use io_req_t instead of struct buf, Marin Ramesa, 2013/12/09