diff mbox series

[v5,1/5] sctp: Remove superfluous test in sctp_ulpq_reasm_drain().

Message ID 20190411.150153.218246264497327400.davem@davemloft.net
State Accepted
Delegated to: David Miller
Headers show
Series SCTP: Event skb list overhaul. | expand

Commit Message

David Miller April 11, 2019, 10:01 p.m. UTC
Inside the loop, we always start with event non-NULL.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/sctp/ulpqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marcelo Ricardo Leitner April 11, 2019, 10:17 p.m. UTC | #1
On Thu, Apr 11, 2019 at 03:01:53PM -0700, David Miller wrote:
> 
> Inside the loop, we always start with event non-NULL.
> 
> Signed-off-by: David S. Miller <davem@davemloft.net>

Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

> ---
>  net/sctp/ulpqueue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
> index 5dde92101743..0fecc1fb4ab7 100644
> --- a/net/sctp/ulpqueue.c
> +++ b/net/sctp/ulpqueue.c
> @@ -745,7 +745,7 @@ static void sctp_ulpq_reasm_drain(struct sctp_ulpq *ulpq)
>  
>  	while ((event = sctp_ulpq_retrieve_reassembled(ulpq)) != NULL) {
>  		/* Do ordering if needed.  */
> -		if ((event) && (event->msg_flags & MSG_EOR)) {
> +		if (event->msg_flags & MSG_EOR) {
>  			skb_queue_head_init(&temp);
>  			__skb_queue_tail(&temp, sctp_event2skb(event));
>  
> -- 
> 2.20.1
>
diff mbox series

Patch

diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index 5dde92101743..0fecc1fb4ab7 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -745,7 +745,7 @@  static void sctp_ulpq_reasm_drain(struct sctp_ulpq *ulpq)
 
 	while ((event = sctp_ulpq_retrieve_reassembled(ulpq)) != NULL) {
 		/* Do ordering if needed.  */
-		if ((event) && (event->msg_flags & MSG_EOR)) {
+		if (event->msg_flags & MSG_EOR) {
 			skb_queue_head_init(&temp);
 			__skb_queue_tail(&temp, sctp_event2skb(event));