summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/crypto/getentropy_aix.c
diff options
context:
space:
mode:
authorderaadt <>2015-09-11 11:52:55 +0000
committerderaadt <>2015-09-11 11:52:55 +0000
commit52f5d74dfdc68d06be5b27e3df8b2fbb6387acf6 (patch)
tree3eca2f8474bd414322105d51e0a8bdb7f2035269 /src/lib/libcrypto/crypto/getentropy_aix.c
parent368b501095ffe62862d468562cfaf9d1012ca99c (diff)
downloadopenbsd-52f5d74dfdc68d06be5b27e3df8b2fbb6387acf6.tar.gz
openbsd-52f5d74dfdc68d06be5b27e3df8b2fbb6387acf6.tar.bz2
openbsd-52f5d74dfdc68d06be5b27e3df8b2fbb6387acf6.zip
unify files further
Diffstat (limited to 'src/lib/libcrypto/crypto/getentropy_aix.c')
-rw-r--r--src/lib/libcrypto/crypto/getentropy_aix.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/crypto/getentropy_aix.c b/src/lib/libcrypto/crypto/getentropy_aix.c
index 56096e7c4a..0616bfde56 100644
--- a/src/lib/libcrypto/crypto/getentropy_aix.c
+++ b/src/lib/libcrypto/crypto/getentropy_aix.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getentropy_aix.c,v 1.3 2015/08/25 17:26:43 deraadt Exp $ */ 1/* $OpenBSD: getentropy_aix.c,v 1.4 2015/09/11 11:52:55 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2015 Michael Felt <aixtools@gmail.com> 4 * Copyright (c) 2015 Michael Felt <aixtools@gmail.com>
@@ -72,7 +72,7 @@ getentropy(void *buf, size_t len)
72 72
73 if (len > 256) { 73 if (len > 256) {
74 errno = EIO; 74 errno = EIO;
75 return -1; 75 return (-1);
76 } 76 }
77 77
78 /* 78 /*
@@ -130,8 +130,8 @@ gotdata(char *buf, size_t len)
130 for (i = 0; i < len; ++i) 130 for (i = 0; i < len; ++i)
131 any_set |= buf[i]; 131 any_set |= buf[i];
132 if (any_set == 0) 132 if (any_set == 0)
133 return -1; 133 return (-1);
134 return 0; 134 return (0);
135} 135}
136 136
137static int 137static int
@@ -181,11 +181,11 @@ start:
181 close(fd); 181 close(fd);
182 if (gotdata(buf, len) == 0) { 182 if (gotdata(buf, len) == 0) {
183 errno = save_errno; 183 errno = save_errno;
184 return 0; /* satisfied */ 184 return (0); /* satisfied */
185 } 185 }
186nodevrandom: 186nodevrandom:
187 errno = EIO; 187 errno = EIO;
188 return -1; 188 return (-1);
189} 189}
190 190
191static const int cl[] = { 191static const int cl[] = {
@@ -418,8 +418,8 @@ getentropy_fallback(void *buf, size_t len)
418 explicit_bzero(results, sizeof results); 418 explicit_bzero(results, sizeof results);
419 if (gotdata(buf, len) == 0) { 419 if (gotdata(buf, len) == 0) {
420 errno = save_errno; 420 errno = save_errno;
421 return 0; /* satisfied */ 421 return (0); /* satisfied */
422 } 422 }
423 errno = EIO; 423 errno = EIO;
424 return -1; 424 return (-1);
425} 425}