git: d28d74de876b - main - smp.h: make sign conversion explicit
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Jan 2022 07:59:43 UTC
The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=d28d74de876b3e45ffaf85784a9d3f5accbd4834 commit d28d74de876b3e45ffaf85784a9d3f5accbd4834 Author: sebastien.bini <sebastien.bini@stormshield.eu> AuthorDate: 2021-12-14 10:54:12 +0000 Commit: Wojciech Macek <wma@FreeBSD.org> CommitDate: 2022-01-02 07:59:21 +0000 smp.h: make sign conversion explicit When comparing singed with unsigned the signed value is casted to unsigned. Make this explicit as it might lead to compilation warnings otherwise. Obtained from: Stormshield --- sys/sys/smp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/smp.h b/sys/sys/smp.h index 1da557212ae2..4583dc4350c9 100644 --- a/sys/sys/smp.h +++ b/sys/sys/smp.h @@ -213,7 +213,7 @@ cpu_next(int i) for (;;) { i++; - if (i > mp_maxid) + if ((u_int)i > mp_maxid) i = 0; if (!CPU_ABSENT(i)) return (i);