1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib:util: Remove always‐false comparison (CID 242193)

‘id’ is an unsigned variable, and so it can never be less than zero.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-10-06 15:27:18 +13:00 committed by Andrew Bartlett
parent 700754b096
commit 86f8cde6b3

View File

@ -150,7 +150,7 @@ restart:
sh = IDR_BITS*l;
id = ((id >> sh) ^ n ^ m) << sh;
}
if ((id >= MAX_ID_BIT) || (id < 0))
if (id >= MAX_ID_BIT)
return -1;
if (l == 0)
break;