diff options
Diffstat (limited to 'src/lib/libcrypto/arc4random/getentropy_osx.c')
-rw-r--r-- | src/lib/libcrypto/arc4random/getentropy_osx.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/arc4random/getentropy_osx.c b/src/lib/libcrypto/arc4random/getentropy_osx.c index ac5c748f6a..e2dc916474 100644 --- a/src/lib/libcrypto/arc4random/getentropy_osx.c +++ b/src/lib/libcrypto/arc4random/getentropy_osx.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getentropy_osx.c,v 1.8 2014/07/21 20:19:47 guenther Exp $ */ | 1 | /* $OpenBSD: getentropy_osx.c,v 1.9 2015/09/11 11:52:55 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> | 4 | * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> |
@@ -88,7 +88,7 @@ getentropy(void *buf, size_t len) | |||
88 | 88 | ||
89 | if (len > 256) { | 89 | if (len > 256) { |
90 | errno = EIO; | 90 | errno = EIO; |
91 | return -1; | 91 | return (-1); |
92 | } | 92 | } |
93 | 93 | ||
94 | /* | 94 | /* |
@@ -149,8 +149,8 @@ gotdata(char *buf, size_t len) | |||
149 | for (i = 0; i < len; ++i) | 149 | for (i = 0; i < len; ++i) |
150 | any_set |= buf[i]; | 150 | any_set |= buf[i]; |
151 | if (any_set == 0) | 151 | if (any_set == 0) |
152 | return -1; | 152 | return (-1); |
153 | return 0; | 153 | return (0); |
154 | } | 154 | } |
155 | 155 | ||
156 | static int | 156 | static int |
@@ -200,11 +200,11 @@ start: | |||
200 | close(fd); | 200 | close(fd); |
201 | if (gotdata(buf, len) == 0) { | 201 | if (gotdata(buf, len) == 0) { |
202 | errno = save_errno; | 202 | errno = save_errno; |
203 | return 0; /* satisfied */ | 203 | return (0); /* satisfied */ |
204 | } | 204 | } |
205 | nodevrandom: | 205 | nodevrandom: |
206 | errno = EIO; | 206 | errno = EIO; |
207 | return -1; | 207 | return (-1); |
208 | } | 208 | } |
209 | 209 | ||
210 | static int tcpmib[] = { CTL_NET, AF_INET, IPPROTO_TCP, TCPCTL_STATS }; | 210 | static int tcpmib[] = { CTL_NET, AF_INET, IPPROTO_TCP, TCPCTL_STATS }; |
@@ -422,8 +422,8 @@ getentropy_fallback(void *buf, size_t len) | |||
422 | explicit_bzero(results, sizeof results); | 422 | explicit_bzero(results, sizeof results); |
423 | if (gotdata(buf, len) == 0) { | 423 | if (gotdata(buf, len) == 0) { |
424 | errno = save_errno; | 424 | errno = save_errno; |
425 | return 0; /* satisfied */ | 425 | return (0); /* satisfied */ |
426 | } | 426 | } |
427 | errno = EIO; | 427 | errno = EIO; |
428 | return -1; | 428 | return (-1); |
429 | } | 429 | } |