From 764d0fbe758a4d9f0d4979cfbd66513d263e0129 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Thu, 29 Nov 2018 11:15:21 +0100 Subject: [PATCH] auth: Fix final nit for dns_random --- pdns/dns_random.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dns_random.cc b/pdns/dns_random.cc index 58426facec..58f3c9caae 100644 --- a/pdns/dns_random.cc +++ b/pdns/dns_random.cc @@ -224,7 +224,7 @@ uint32_t dns_random(uint32_t upper_bound) { On applicable rngs, we loop until the rng spews out value larger than min, and then take modulo out of that. */ -#if (UINT32_MAX > 0xffffffffUL) +#if (ULONG_MAX > 0xffffffffUL) min = 0x100000000UL % upper_bound; #else /* Calculate (2**32 % upper_bound) avoiding 64-bit math */ -- 2.47.2