From f7d30133221896638f7bf4f66c504255c4b14f48 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 2 Jan 2020 21:01:38 +0100 Subject: Issue #1338 - Part 1: Update NSPR to 4.24 --- nsprpub/pr/src/md/windows/w32rng.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'nsprpub/pr/src/md/windows/w32rng.c') diff --git a/nsprpub/pr/src/md/windows/w32rng.c b/nsprpub/pr/src/md/windows/w32rng.c index 633ae0da5..c07625ecc 100644 --- a/nsprpub/pr/src/md/windows/w32rng.c +++ b/nsprpub/pr/src/md/windows/w32rng.c @@ -16,8 +16,9 @@ CurrentClockTickTime(LPDWORD lpdwHigh, LPDWORD lpdwLow) { LARGE_INTEGER liCount; - if (!QueryPerformanceCounter(&liCount)) + if (!QueryPerformanceCounter(&liCount)) { return FALSE; + } *lpdwHigh = liCount.u.HighPart; *lpdwLow = liCount.u.LowPart; @@ -31,8 +32,9 @@ extern PRSize _PR_MD_GetRandomNoise( void *buf, PRSize size ) size_t nBytes; time_t sTime; - if (size <= 0) + if (size <= 0) { return 0; + } CurrentClockTickTime(&dwHigh, &dwLow); @@ -42,16 +44,18 @@ extern PRSize _PR_MD_GetRandomNoise( void *buf, PRSize size ) n += nBytes; size -= nBytes; - if (size <= 0) + if (size <= 0) { return n; + } nBytes = sizeof(dwHigh) > size ? size : sizeof(dwHigh); memcpy(((char *)buf) + n, &dwHigh, nBytes); n += nBytes; size -= nBytes; - if (size <= 0) + if (size <= 0) { return n; + } // get the number of milliseconds that have elapsed since Windows started dwVal = GetTickCount(); @@ -61,8 +65,9 @@ extern PRSize _PR_MD_GetRandomNoise( void *buf, PRSize size ) n += nBytes; size -= nBytes; - if (size <= 0) + if (size <= 0) { return n; + } // get the time in seconds since midnight Jan 1, 1970 time(&sTime); -- cgit v1.2.3