diff options
Diffstat (limited to 'src/net/tcp.c')
| -rw-r--r-- | src/net/tcp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/net/tcp.c b/src/net/tcp.c index 1c824bdff..420640346 100644 --- a/src/net/tcp.c +++ b/src/net/tcp.c @@ -1014,9 +1014,8 @@ static void tcp_process_rx_queue ( struct tcp_connection *tcp ) { * queue, since tcp_discard() may remove packets from the RX * queue while we are processing. */ - while ( ! list_empty ( &tcp->rx_queue ) ) { - list_for_each_entry ( iobuf, &tcp->rx_queue, list ) - break; + while ( ( iobuf = list_first_entry ( &tcp->rx_queue, struct io_buffer, + list ) ) ) { /* Stop processing when we hit the first gap */ tcpqhdr = iobuf->data; |
