2020-09-11 04:00:10

by Zheng Bin

[permalink] [raw]
Subject: [PATCH -next 3/5] cifs: fix comparison to bool warning in smb2misc.c

Fixes coccicheck warning:

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

Signed-off-by: Zheng Bin <[email protected]>
---
fs/cifs/smb2misc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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);
--
2.26.0.106.g9fadedd