From 3ee1ebc7eebcbde2c47c4a92d9a400b172f32d91 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 1 Aug 2017 03:07:11 +0200 Subject: treewide: Remove useless casts from memcpy pointer arguments. This is using the following semantic patch: @memcpy1@ type T; expression A, B, C; @@ - memcpy((T *)A, B, C) + memcpy(A, B, C) @memcpy2@ type T; expression A, B, C; @@ - memcpy(A, (T *)B, C) + memcpy(A, B, C) Signed-off-by: Ralf Baechle --- tcpip/rip98t.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tcpip/rip98t.c') diff --git a/tcpip/rip98t.c b/tcpip/rip98t.c index 9fd78c6..502b5f4 100644 --- a/tcpip/rip98t.c +++ b/tcpip/rip98t.c @@ -55,7 +55,9 @@ void transmit_routes(int s) while (mess_len < 184 && route != NULL) { if (route->action != DEL_ROUTE) { - memcpy(message + mess_len + 0, (char *)&route->addr, sizeof(struct in_addr)); + memcpy(message + mess_len + 0, + &route->addr, + sizeof(struct in_addr)); message[mess_len + 4] = route->bits; message[mess_len + 5] = route->metric; -- cgit v1.2.3