diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2017-08-01 03:09:11 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-08-03 04:21:23 +0200 |
commit | 5e1dd90d814c46ad3ef41053cf7ca3bac6c80466 (patch) | |
tree | f710155614df1195e5c405986c554b5820ccd871 /tcpip/ttylinkd.c | |
parent | 3ee1ebc7eebcbde2c47c4a92d9a400b172f32d91 (diff) |
treewide: Remove useless casts from memset pointer argument.
This is using the following semantic patch:
@memset@
type T;
expression A, B, C;
@@
- memset((T *)A, B, C)
+ memset(A, B, C)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'tcpip/ttylinkd.c')
-rw-r--r-- | tcpip/ttylinkd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tcpip/ttylinkd.c b/tcpip/ttylinkd.c index 3020977..71a63c5 100644 --- a/tcpip/ttylinkd.c +++ b/tcpip/ttylinkd.c @@ -266,7 +266,7 @@ int main(int argc, char *argv[]) memcpy(&my_addr, phe->h_addr, phe->h_length); /* Create local data socket */ - memset((char*)&msg_sa, 0, sizeof(msg_sa)); + memset(&msg_sa, 0, sizeof(msg_sa)); msg_sa.sa_family = AF_INET; msg_sin = (struct sockaddr_in*)&msg_sa; @@ -294,7 +294,7 @@ int main(int argc, char *argv[]) } /* Create local control socket */ - memset((char*)&ctl_sin, 0, sizeof(ctl_sin)); + memset(&ctl_sin, 0, sizeof(ctl_sin)); ctl_sin.sin_family = AF_INET; memcpy(&ctl_sin.sin_addr, phe->h_addr, phe->h_length); @@ -325,7 +325,7 @@ int main(int argc, char *argv[]) } /* Start talking to the talk daemon */ - memset((char*)&msg, 0, sizeof(msg)); + memset(&msg, 0, sizeof(msg)); msg.vers = TALK_VERSION; msg.id_num = htonl(0); msg.addr.sa_family = ntohs(AF_INET); @@ -496,7 +496,7 @@ static int send_control(int skt, struct in_addr addr, CTL_MSG msg, } /* Create the socket address */ - memset((char*)&sin, 0, sizeof(sin)); + memset(&sin, 0, sizeof(sin)); sin.sin_addr = addr; sin.sin_family = AF_INET; sin.sin_port = talk_port; |