aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-13 12:21:26 -0400
committerDavid S. Miller <davem@conan.davemloft.net>2011-06-16 23:19:27 -0400
commitea110733874d5176cb56dcf612a629ffac09dbf0 (patch)
treed079bb9990ecf7dadc326b62605fb4de1f6fad4f /net/sctp/socket.c
parent3c8def9776c3d4636291432522ea312f7a44be95 (diff)
net: Remove casts of void *
Unnecessary casts of void * clutter the code. These are the remainder casts after several specific patches to remove netdev_priv and dev_priv. Done via coccinelle script: $ cat cast_void_pointer.cocci @@ type T; T *pt; void *pv; @@ - pt = (T *)pv; + pt = pv; Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 60038fef3ba1..fd31b3616a33 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -476,7 +476,7 @@ static int sctp_bindx_add(struct sock *sk, struct sockaddr *addrs, int addrcnt)
476 /* The list may contain either IPv4 or IPv6 address; 476 /* The list may contain either IPv4 or IPv6 address;
477 * determine the address length for walking thru the list. 477 * determine the address length for walking thru the list.
478 */ 478 */
479 sa_addr = (struct sockaddr *)addr_buf; 479 sa_addr = addr_buf;
480 af = sctp_get_af_specific(sa_addr->sa_family); 480 af = sctp_get_af_specific(sa_addr->sa_family);
481 if (!af) { 481 if (!af) {
482 retval = -EINVAL; 482 retval = -EINVAL;
@@ -555,7 +555,7 @@ static int sctp_send_asconf_add_ip(struct sock *sk,
555 */ 555 */
556 addr_buf = addrs; 556 addr_buf = addrs;
557 for (i = 0; i < addrcnt; i++) { 557 for (i = 0; i < addrcnt; i++) {
558 addr = (union sctp_addr *)addr_buf; 558 addr = addr_buf;
559 af = sctp_get_af_specific(addr->v4.sin_family); 559 af = sctp_get_af_specific(addr->v4.sin_family);
560 if (!af) { 560 if (!af) {
561 retval = -EINVAL; 561 retval = -EINVAL;
@@ -588,7 +588,7 @@ static int sctp_send_asconf_add_ip(struct sock *sk,
588 */ 588 */
589 addr_buf = addrs; 589 addr_buf = addrs;
590 for (i = 0; i < addrcnt; i++) { 590 for (i = 0; i < addrcnt; i++) {
591 addr = (union sctp_addr *)addr_buf; 591 addr = addr_buf;
592 af = sctp_get_af_specific(addr->v4.sin_family); 592 af = sctp_get_af_specific(addr->v4.sin_family);
593 memcpy(&saveaddr, addr, af->sockaddr_len); 593 memcpy(&saveaddr, addr, af->sockaddr_len);
594 retval = sctp_add_bind_addr(bp, &saveaddr, 594 retval = sctp_add_bind_addr(bp, &saveaddr,
@@ -659,7 +659,7 @@ static int sctp_bindx_rem(struct sock *sk, struct sockaddr *addrs, int addrcnt)
659 goto err_bindx_rem; 659 goto err_bindx_rem;
660 } 660 }
661 661
662 sa_addr = (union sctp_addr *)addr_buf; 662 sa_addr = addr_buf;
663 af = sctp_get_af_specific(sa_addr->sa.sa_family); 663 af = sctp_get_af_specific(sa_addr->sa.sa_family);
664 if (!af) { 664 if (!af) {
665 retval = -EINVAL; 665 retval = -EINVAL;
@@ -758,7 +758,7 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
758 */ 758 */
759 addr_buf = addrs; 759 addr_buf = addrs;
760 for (i = 0; i < addrcnt; i++) { 760 for (i = 0; i < addrcnt; i++) {
761 laddr = (union sctp_addr *)addr_buf; 761 laddr = addr_buf;
762 af = sctp_get_af_specific(laddr->v4.sin_family); 762 af = sctp_get_af_specific(laddr->v4.sin_family);
763 if (!af) { 763 if (!af) {
764 retval = -EINVAL; 764 retval = -EINVAL;
@@ -830,7 +830,7 @@ skip_mkasconf:
830 */ 830 */
831 addr_buf = addrs; 831 addr_buf = addrs;
832 for (i = 0; i < addrcnt; i++) { 832 for (i = 0; i < addrcnt; i++) {
833 laddr = (union sctp_addr *)addr_buf; 833 laddr = addr_buf;
834 af = sctp_get_af_specific(laddr->v4.sin_family); 834 af = sctp_get_af_specific(laddr->v4.sin_family);
835 list_for_each_entry(saddr, &bp->address_list, list) { 835 list_for_each_entry(saddr, &bp->address_list, list) {
836 if (sctp_cmp_addr_exact(&saddr->a, laddr)) 836 if (sctp_cmp_addr_exact(&saddr->a, laddr))
@@ -997,7 +997,7 @@ SCTP_STATIC int sctp_setsockopt_bindx(struct sock* sk,
997 return -EINVAL; 997 return -EINVAL;
998 } 998 }
999 999
1000 sa_addr = (struct sockaddr *)addr_buf; 1000 sa_addr = addr_buf;
1001 af = sctp_get_af_specific(sa_addr->sa_family); 1001 af = sctp_get_af_specific(sa_addr->sa_family);
1002 1002
1003 /* If the address family is not supported or if this address 1003 /* If the address family is not supported or if this address
@@ -1088,7 +1088,7 @@ static int __sctp_connect(struct sock* sk,
1088 goto out_free; 1088 goto out_free;
1089 } 1089 }
1090 1090
1091 sa_addr = (union sctp_addr *)addr_buf; 1091 sa_addr = addr_buf;
1092 af = sctp_get_af_specific(sa_addr->sa.sa_family); 1092 af = sctp_get_af_specific(sa_addr->sa.sa_family);
1093 1093
1094 /* If the address family is not supported or if this address 1094 /* If the address family is not supported or if this address