|
1 | | -/* $NetBSD: arc4random.c,v 1.30 2015/05/13 23:15:57 justin Exp $ */ |
| 1 | +/* $NetBSD: arc4random.c,v 1.31 2016/03/25 22:13:23 riastradh Exp $ */ |
2 | 2 |
|
3 | 3 | /*- |
4 | 4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. |
|
52 | 52 | */ |
53 | 53 |
|
54 | 54 | #include <sys/cdefs.h> |
55 | | -__RCSID("$NetBSD: arc4random.c,v 1.30 2015/05/13 23:15:57 justin Exp $"); |
| 55 | +__RCSID("$NetBSD: arc4random.c,v 1.31 2016/03/25 22:13:23 riastradh Exp $"); |
56 | 56 |
|
57 | 57 | #include "namespace.h" |
58 | 58 | #include "reentrant.h" |
@@ -356,7 +356,8 @@ crypto_onetimestream(const void *seed, void *buf, size_t n) |
356 | 356 | * = log_2 o + 8 i. |
357 | 357 | */ |
358 | 358 | __CTASSERT(CHAR_BIT * sizeof n <= |
359 | | - (/*LINTED*/ilog2(crypto_core_OUTPUTBYTES) + 8 * crypto_core_INPUTBYTES)); |
| 359 | + (/*LINTED*/ilog2(crypto_core_OUTPUTBYTES) + |
| 360 | + 8*crypto_core_INPUTBYTES)); |
360 | 361 |
|
361 | 362 | p8 = buf; |
362 | 363 | p32 = (uint8_t *)roundup2((uintptr_t)p8, 4); |
@@ -444,7 +445,8 @@ arc4random_prng_create(void) |
444 | 445 | struct arc4random_prng *prng; |
445 | 446 | const size_t size = roundup(sizeof(*prng), sysconf(_SC_PAGESIZE)); |
446 | 447 |
|
447 | | - prng = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0); |
| 448 | + prng = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, |
| 449 | + 0); |
448 | 450 | if (prng == MAP_FAILED) |
449 | 451 | goto fail0; |
450 | 452 | if (minherit(prng, size, MAP_INHERIT_ZERO) == -1) |
|
0 commit comments