diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2017-08-01 03:11:15 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-08-03 04:21:23 +0200 |
commit | 2b87888e8428bd55e2b30533914f903782a0c27c (patch) | |
tree | 6a093441edc37a6d2cfb935f51effaaa0491eed7 /tcpip/ttylinkd.c | |
parent | 5e1dd90d814c46ad3ef41053cf7ca3bac6c80466 (diff) |
treewide: Remove useless casts from sendto() pointer argument.
This is using the following semantic patch:
@send@
type T;
expression A, B, C, D;
@@
- send(A, (T *)B, C, D)
+ send(A, B, C, D)
@sendto1@
type T;
expression A, B, C, D, E, F;
@@
- sendto(A, (T *)B, C, D, E, F)
+ sendto(A, B, C, D, E, F)
@sendto2@
type T;
expression A, B, C, D, F;
struct sockaddr *E;
@@
- sendto(A, B, C, D, (struct sockaddr *) E, F)
+ sendto(A, B, C, D, E, F)
@sendmsg@
type T;
expression A, B, C;
@@
- sendmsg(A, (T *)B, C)
+ sendmsg(A, B, C)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'tcpip/ttylinkd.c')
-rw-r--r-- | tcpip/ttylinkd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tcpip/ttylinkd.c b/tcpip/ttylinkd.c index 71a63c5..0412597 100644 --- a/tcpip/ttylinkd.c +++ b/tcpip/ttylinkd.c @@ -501,7 +501,7 @@ static int send_control(int skt, struct in_addr addr, CTL_MSG msg, sin.sin_family = AF_INET; sin.sin_port = talk_port; - if (sendto(skt, (char*)&msg, sizeof(msg), 0, (struct sockaddr*)&sin, sizeof(sin)) != sizeof(msg)) + if (sendto(skt, &msg, sizeof(msg), 0, (struct sockaddr *)&sin, sizeof(sin)) != sizeof(msg)) { syslog(LOG_DAEMON | LOG_ERR, "send_control(): sendto failed (%m)."); return -1; |