diff options
Diffstat (limited to 'src/lib/libcrypto/arc4random/getentropy_hpux.c')
| -rw-r--r-- | src/lib/libcrypto/arc4random/getentropy_hpux.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/arc4random/getentropy_hpux.c b/src/lib/libcrypto/arc4random/getentropy_hpux.c index 2c4abfc96d..bdac6e16de 100644 --- a/src/lib/libcrypto/arc4random/getentropy_hpux.c +++ b/src/lib/libcrypto/arc4random/getentropy_hpux.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: getentropy_hpux.c,v 1.3 2015/08/25 17:26:43 deraadt Exp $ */ | 1 | /* $OpenBSD: getentropy_hpux.c,v 1.4 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> |
| @@ -76,7 +76,7 @@ getentropy(void *buf, size_t len) | |||
| 76 | 76 | ||
| 77 | if (len > 256) { | 77 | if (len > 256) { |
| 78 | errno = EIO; | 78 | errno = EIO; |
| 79 | return -1; | 79 | return (-1); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | /* | 82 | /* |
| @@ -134,8 +134,8 @@ gotdata(char *buf, size_t len) | |||
| 134 | for (i = 0; i < len; ++i) | 134 | for (i = 0; i < len; ++i) |
| 135 | any_set |= buf[i]; | 135 | any_set |= buf[i]; |
| 136 | if (any_set == 0) | 136 | if (any_set == 0) |
| 137 | return -1; | 137 | return (-1); |
| 138 | return 0; | 138 | return (0); |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | static int | 141 | static int |
| @@ -185,11 +185,11 @@ start: | |||
| 185 | close(fd); | 185 | close(fd); |
| 186 | if (gotdata(buf, len) == 0) { | 186 | if (gotdata(buf, len) == 0) { |
| 187 | errno = save_errno; | 187 | errno = save_errno; |
| 188 | return 0; /* satisfied */ | 188 | return (0); /* satisfied */ |
| 189 | } | 189 | } |
| 190 | nodevrandom: | 190 | nodevrandom: |
| 191 | errno = EIO; | 191 | errno = EIO; |
| 192 | return -1; | 192 | return (-1); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | static const int cl[] = { | 195 | static const int cl[] = { |
| @@ -412,8 +412,8 @@ getentropy_fallback(void *buf, size_t len) | |||
| 412 | explicit_bzero(results, sizeof results); | 412 | explicit_bzero(results, sizeof results); |
| 413 | if (gotdata(buf, len) == 0) { | 413 | if (gotdata(buf, len) == 0) { |
| 414 | errno = save_errno; | 414 | errno = save_errno; |
| 415 | return 0; /* satisfied */ | 415 | return (0); /* satisfied */ |
| 416 | } | 416 | } |
| 417 | errno = EIO; | 417 | errno = EIO; |
| 418 | return -1; | 418 | return (-1); |
| 419 | } | 419 | } |
