Date: Sun, 2 Jan 2022 07:59:43 GMT From: Wojciech Macek <wma@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: d28d74de876b - main - smp.h: make sign conversion explicit Message-ID: <202201020759.2027xhEX064327@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201020759.2027xhEX064327>