diff options
author | Robert P. J. Day <rpjday@crashcourse.ca> | 2008-04-12 21:54:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-12 21:54:24 -0400 |
commit | 9dbc15f055f05393ace4f1733f160ec3d188cf9b (patch) | |
tree | c3aca36fdb57d7b64aa5d5fdea0b7cf048c88dc7 /net/sctp/sm_make_chunk.c | |
parent | 30e935600776b45db38238355f0de2b8f72b3847 (diff) |
[SCTP]: "list_for_each()" -> "list_for_each_entry()" where appropriate.
Replacing (almost) all invocations of list_for_each() with
list_for_each_entry() tightens up the code and allows for the deletion
of numerous list iterator variables that are no longer necessary.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index c8982452580e..0679bddf3a95 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -2246,8 +2246,8 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid, | |||
2246 | * high (for example, implementations MAY use the size of the receiver | 2246 | * high (for example, implementations MAY use the size of the receiver |
2247 | * advertised window). | 2247 | * advertised window). |
2248 | */ | 2248 | */ |
2249 | list_for_each(pos, &asoc->peer.transport_addr_list) { | 2249 | list_for_each_entry(transport, &asoc->peer.transport_addr_list, |
2250 | transport = list_entry(pos, struct sctp_transport, transports); | 2250 | transports) { |
2251 | transport->ssthresh = asoc->peer.i.a_rwnd; | 2251 | transport->ssthresh = asoc->peer.i.a_rwnd; |
2252 | } | 2252 | } |
2253 | 2253 | ||
@@ -3043,7 +3043,6 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, | |||
3043 | union sctp_addr addr; | 3043 | union sctp_addr addr; |
3044 | struct sctp_bind_addr *bp = &asoc->base.bind_addr; | 3044 | struct sctp_bind_addr *bp = &asoc->base.bind_addr; |
3045 | union sctp_addr_param *addr_param; | 3045 | union sctp_addr_param *addr_param; |
3046 | struct list_head *pos; | ||
3047 | struct sctp_transport *transport; | 3046 | struct sctp_transport *transport; |
3048 | struct sctp_sockaddr_entry *saddr; | 3047 | struct sctp_sockaddr_entry *saddr; |
3049 | int retval = 0; | 3048 | int retval = 0; |
@@ -3071,9 +3070,8 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, | |||
3071 | local_bh_disable(); | 3070 | local_bh_disable(); |
3072 | retval = sctp_del_bind_addr(bp, &addr); | 3071 | retval = sctp_del_bind_addr(bp, &addr); |
3073 | local_bh_enable(); | 3072 | local_bh_enable(); |
3074 | list_for_each(pos, &asoc->peer.transport_addr_list) { | 3073 | list_for_each_entry(transport, &asoc->peer.transport_addr_list, |
3075 | transport = list_entry(pos, struct sctp_transport, | 3074 | transports) { |
3076 | transports); | ||
3077 | dst_release(transport->dst); | 3075 | dst_release(transport->dst); |
3078 | sctp_transport_route(transport, NULL, | 3076 | sctp_transport_route(transport, NULL, |
3079 | sctp_sk(asoc->base.sk)); | 3077 | sctp_sk(asoc->base.sk)); |