Changeset f959a20f in mainline for uspace/srv/net/tcp/tqueue.c


Ignore:
Timestamp:
2019-02-01T22:32:38Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
00b7fc8
Parents:
1a37496
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-01 21:22:39)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-01 22:32:38)
Message:

Avoid directly using .head/.next/.prev of list_t/link_t

Use existing constructs from <adt/list.h> instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tcp/tqueue.c

    r1a37496 rf959a20f  
    245245void tcp_tqueue_ack_received(tcp_conn_t *conn)
    246246{
    247         link_t *cur, *next;
    248 
    249247        log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_tqueue_ack_received(%p)", conn->name,
    250248            conn);
    251249
    252         cur = conn->retransmit.list.head.next;
    253 
    254         while (cur != &conn->retransmit.list.head) {
    255                 next = cur->next;
    256 
     250        list_foreach_safe(conn->retransmit.list, cur, next) {
    257251                tcp_tqueue_entry_t *tqe = list_get_instance(cur,
    258252                    tcp_tqueue_entry_t, link);
     
    277271                        tcp_tqueue_timer_set(conn);
    278272                }
    279 
    280                 cur = next;
    281273        }
    282274
Note: See TracChangeset for help on using the changeset viewer.