diff mbox series

[-next,3/5] cifs: fix comparison to bool warning in smb2misc.c

Message ID 20200911040539.113307-4-zhengbin13@huawei.com (mailing list archive)
State New, archived
Headers show
Series cifs: fix comparison to bool warning | expand

Commit Message

Zheng Bin Sept. 11, 2020, 4:05 a.m. UTC
Fixes coccicheck warning:

fs/cifs/smb2misc.c:416:5-51: WARNING: Comparison to bool

Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 fs/cifs/smb2misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.26.0.106.g9fadedd
diff mbox series

Patch

diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index d88e2683626e..0864cfa87834 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -413,7 +413,7 @@  smb2_calc_size(void *buf, struct TCP_Server_Info *srvr)
 	 */
 	len += le16_to_cpu(pdu->StructureSize2);

-	if (has_smb2_data_area[le16_to_cpu(shdr->Command)] == false)
+	if (!has_smb2_data_area[le16_to_cpu(shdr->Command)])
 		goto calc_size_exit;

 	smb2_get_data_area_len(&offset, &data_length, shdr);