[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191216.162616.2089849587478762136.davem@davemloft.net>
Date: Mon, 16 Dec 2019 16:26:16 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: alexchan@...k.com.hk
Cc: netdev@...r.kernel.org, linux-kernel@...r.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.
From: "Chan Shu Tak, Alex" <alexchan@...k.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.
Powered by blists - more mailing lists