From a201939a8150bc4c2f221925797ea2751c74b77c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 7 Dec 2024 15:59:37 -0500 Subject: Use likely()/unlikely() macros and a few bugfixes for integers --- stdlib/rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stdlib/rng.c') diff --git a/stdlib/rng.c b/stdlib/rng.c index 8104c451..bf23cb74 100644 --- a/stdlib/rng.c +++ b/stdlib/rng.c @@ -101,7 +101,7 @@ public Bool_t RNG$bool(RNG_t rng, Num_t p) public Int_t RNG$int(RNG_t rng, Int_t min, Int_t max) { - if (__builtin_expect(((min.small & max.small) & 1) != 0, 1)) { + if (likely(((min.small & max.small) & 1) != 0)) { int32_t r = RNG$int32(rng, (int32_t)(min.small >> 2), (int32_t)(max.small >> 2)); return I_small(r); } -- cgit v1.2.3