mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: alexchan@task.com.hk
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] llc2: Reverse the true/false statements of the condition operator in llc_stat_ev_rx_null_dsap_xid_c and llc_stat_ev_rx_null_dsap_test_c.
Date: Mon, 16 Dec 2019 16:26:16 -0800 (PST)	[thread overview]
Message-ID: <20191216.162616.2089849587478762136.davem@davemloft.net> (raw)
In-Reply-To: <1576340820-4929-1-git-send-email-alexchan@task.com.hk>

From: "Chan Shu Tak, Alex" <alexchan@task.com.hk>
Date: Sun, 15 Dec 2019 00:26:58 +0800

> @@ -32,7 +32,7 @@ static int llc_stat_ev_rx_null_dsap_xid_c(struct sk_buff *skb)
>  	return LLC_PDU_IS_CMD(pdu) &&			/* command PDU */
>  	       LLC_PDU_TYPE_IS_U(pdu) &&		/* U type PDU */
>  	       LLC_U_PDU_CMD(pdu) == LLC_1_PDU_CMD_XID &&
> -	       !pdu->dsap ? 0 : 1;			/* NULL DSAP value */
> +	       !pdu->dsap ? 1 : 0;			/* NULL DSAP value */
>  }
>  
>  static int llc_stat_ev_rx_null_dsap_test_c(struct sk_buff *skb)
> @@ -42,7 +42,7 @@ static int llc_stat_ev_rx_null_dsap_test_c(struct sk_buff *skb)
>  	return LLC_PDU_IS_CMD(pdu) &&			/* command PDU */
>  	       LLC_PDU_TYPE_IS_U(pdu) &&		/* U type PDU */
>  	       LLC_U_PDU_CMD(pdu) == LLC_1_PDU_CMD_TEST &&
> -	       !pdu->dsap ? 0 : 1;			/* NULL DSAP */
> +	       !pdu->dsap ? 1 : 0;			/* NULL DSAP */
>  }
>  

These are both plain booleans now then.  Just plain "!pdu->dsap" is
therefore, sufficient.

  reply	other threads:[~2019-12-17  0:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-14 16:26 Chan Shu Tak, Alex
2019-12-17  0:26 ` David Miller [this message]
2019-12-17  4:00 ` [PATCH v2] llc2: Remove " Chan Shu Tak, Alex
2019-12-18  6:18   ` David Miller
2019-12-18 15:07     ` Chan Shu Tak, ALex
2019-12-18 20:24       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191216.162616.2089849587478762136.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexchan@task.com.hk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®