]> git.baikalelectronics.ru Git - kernel.git/commit
tls: rx: Fix unsigned comparison with less than zero
authorYang Li <yang.lee@linux.alibaba.com>
Thu, 28 Jul 2022 03:10:19 +0000 (11:10 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Jul 2022 04:50:39 +0000 (21:50 -0700)
commit8cf244822ea01bd623018b934c5ebb4290ec152e
tree7d9da4d803b3c178fe28eed2ba51603efbc3d181
parent143530612b051e0e7486c5c6a0175861f4318e81
tls: rx: Fix unsigned comparison with less than zero

The return from the call to tls_rx_msg_size() is int, it can be
a negative error code, however this is being assigned to an
unsigned long variable 'sz', so making 'sz' an int.

Eliminate the following coccicheck warning:
./net/tls/tls_strp.c:211:6-8: WARNING: Unsigned expression compared with zero: sz < 0

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220728031019.32838-1-yang.lee@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/tls/tls_strp.c