diff --git a/src/lib/libcrypto/arc4random/arc4random_freebsd.h b/src/lib/libcrypto/arc4random/arc4random_freebsd.h index b97bad86..b54f400c 100644 --- a/src/lib/libcrypto/arc4random/arc4random_freebsd.h +++ b/src/lib/libcrypto/arc4random/arc4random_freebsd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random_freebsd.h,v 1.2 2015/01/15 06:57:18 deraadt Exp $ */ +/* $OpenBSD: arc4random_freebsd.h,v 1.3 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 1996, David Mazieres @@ -73,14 +73,14 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) { if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) - return -1; + return (-1); if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { munmap(*rsp, sizeof(**rsp)); - return -1; + return (-1); } _ARC4_ATFORK(_rs_forkhandler); - return 0; + return (0); } diff --git a/src/lib/libcrypto/arc4random/arc4random_netbsd.h b/src/lib/libcrypto/arc4random/arc4random_netbsd.h index 489e73a0..7092baf7 100644 --- a/src/lib/libcrypto/arc4random/arc4random_netbsd.h +++ b/src/lib/libcrypto/arc4random/arc4random_netbsd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random_netbsd.h,v 1.1 2015/01/19 20:21:40 bcook Exp $ */ +/* $OpenBSD: arc4random_netbsd.h,v 1.2 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 1996, David Mazieres @@ -73,14 +73,14 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) { if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) - return -1; + return (-1); if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { munmap(*rsp, sizeof(**rsp)); - return -1; + return (-1); } _ARC4_ATFORK(_rs_forkhandler); - return 0; + return (0); } diff --git a/src/lib/libcrypto/arc4random/arc4random_osx.h b/src/lib/libcrypto/arc4random/arc4random_osx.h index 3bb14e03..19233ab5 100644 --- a/src/lib/libcrypto/arc4random/arc4random_osx.h +++ b/src/lib/libcrypto/arc4random/arc4random_osx.h @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random_osx.h,v 1.9 2015/01/15 06:57:18 deraadt Exp $ */ +/* $OpenBSD: arc4random_osx.h,v 1.10 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 1996, David Mazieres @@ -67,14 +67,14 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) { if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) - return -1; + return (-1); if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { munmap(*rsp, sizeof(**rsp)); - return -1; + return (-1); } _ARC4_ATFORK(_rs_forkhandler); - return 0; + return (0); } diff --git a/src/lib/libcrypto/arc4random/getentropy_aix.c b/src/lib/libcrypto/arc4random/getentropy_aix.c index 56096e7c..0616bfde 100644 --- a/src/lib/libcrypto/arc4random/getentropy_aix.c +++ b/src/lib/libcrypto/arc4random/getentropy_aix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_aix.c,v 1.3 2015/08/25 17:26:43 deraadt Exp $ */ +/* $OpenBSD: getentropy_aix.c,v 1.4 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2015 Michael Felt @@ -72,7 +72,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } /* @@ -130,8 +130,8 @@ gotdata(char *buf, size_t len) for (i = 0; i < len; ++i) any_set |= buf[i]; if (any_set == 0) - return -1; - return 0; + return (-1); + return (0); } static int @@ -181,11 +181,11 @@ start: close(fd); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } nodevrandom: errno = EIO; - return -1; + return (-1); } static const int cl[] = { @@ -418,8 +418,8 @@ getentropy_fallback(void *buf, size_t len) explicit_bzero(results, sizeof results); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/arc4random/getentropy_hpux.c b/src/lib/libcrypto/arc4random/getentropy_hpux.c index 2c4abfc9..bdac6e16 100644 --- a/src/lib/libcrypto/arc4random/getentropy_hpux.c +++ b/src/lib/libcrypto/arc4random/getentropy_hpux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_hpux.c,v 1.3 2015/08/25 17:26:43 deraadt Exp $ */ +/* $OpenBSD: getentropy_hpux.c,v 1.4 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -76,7 +76,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } /* @@ -134,8 +134,8 @@ gotdata(char *buf, size_t len) for (i = 0; i < len; ++i) any_set |= buf[i]; if (any_set == 0) - return -1; - return 0; + return (-1); + return (0); } static int @@ -185,11 +185,11 @@ start: close(fd); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } nodevrandom: errno = EIO; - return -1; + return (-1); } static const int cl[] = { @@ -412,8 +412,8 @@ getentropy_fallback(void *buf, size_t len) explicit_bzero(results, sizeof results); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/arc4random/getentropy_linux.c b/src/lib/libcrypto/arc4random/getentropy_linux.c index fb218fee..2a0a6875 100644 --- a/src/lib/libcrypto/arc4random/getentropy_linux.c +++ b/src/lib/libcrypto/arc4random/getentropy_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_linux.c,v 1.40 2015/08/25 17:26:43 deraadt Exp $ */ +/* $OpenBSD: getentropy_linux.c,v 1.41 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -91,7 +91,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } #ifdef SYS_getrandom @@ -186,8 +186,8 @@ gotdata(char *buf, size_t len) for (i = 0; i < len; ++i) any_set |= buf[i]; if (any_set == 0) - return -1; - return 0; + return (-1); + return (0); } #ifdef SYS_getrandom @@ -260,11 +260,11 @@ start: close(fd); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } nodevrandom: errno = EIO; - return -1; + return (-1); } #ifdef SYS__sysctl @@ -295,7 +295,7 @@ getentropy_sysctl(void *buf, size_t len) } sysctlfailed: errno = EIO; - return -1; + return (-1); } #endif /* SYS__sysctl */ @@ -330,7 +330,7 @@ getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data) SHA512_CTX *ctx = data; SHA512_Update(ctx, &info->dlpi_addr, sizeof (info->dlpi_addr)); - return 0; + return (0); } static int @@ -540,8 +540,8 @@ getentropy_fallback(void *buf, size_t len) explicit_bzero(results, sizeof results); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/arc4random/getentropy_netbsd.c b/src/lib/libcrypto/arc4random/getentropy_netbsd.c index a9710ef9..2a73591f 100644 --- a/src/lib/libcrypto/arc4random/getentropy_netbsd.c +++ b/src/lib/libcrypto/arc4random/getentropy_netbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_netbsd.c,v 1.1 2015/01/19 20:21:40 bcook Exp $ */ +/* $OpenBSD: getentropy_netbsd.c,v 1.2 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014 Pawel Jakub Dawidek @@ -55,10 +55,10 @@ int getentropy(void *buf, size_t len) { if (len <= 256 && - getentropy_sysctl(buf, len) == len) { - return 0; + getentropy_sysctl(buf, len) == len) { + return (0); } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/arc4random/getentropy_osx.c b/src/lib/libcrypto/arc4random/getentropy_osx.c index ac5c748f..e2dc9164 100644 --- a/src/lib/libcrypto/arc4random/getentropy_osx.c +++ b/src/lib/libcrypto/arc4random/getentropy_osx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_osx.c,v 1.8 2014/07/21 20:19:47 guenther Exp $ */ +/* $OpenBSD: getentropy_osx.c,v 1.9 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -88,7 +88,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } /* @@ -149,8 +149,8 @@ gotdata(char *buf, size_t len) for (i = 0; i < len; ++i) any_set |= buf[i]; if (any_set == 0) - return -1; - return 0; + return (-1); + return (0); } static int @@ -200,11 +200,11 @@ start: close(fd); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } nodevrandom: errno = EIO; - return -1; + return (-1); } static int tcpmib[] = { CTL_NET, AF_INET, IPPROTO_TCP, TCPCTL_STATS }; @@ -422,8 +422,8 @@ getentropy_fallback(void *buf, size_t len) explicit_bzero(results, sizeof results); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/arc4random/getentropy_solaris.c b/src/lib/libcrypto/arc4random/getentropy_solaris.c index 4133d895..53ce742f 100644 --- a/src/lib/libcrypto/arc4random/getentropy_solaris.c +++ b/src/lib/libcrypto/arc4random/getentropy_solaris.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_solaris.c,v 1.10 2015/08/25 17:26:43 deraadt Exp $ */ +/* $OpenBSD: getentropy_solaris.c,v 1.11 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -81,7 +81,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } /* @@ -160,8 +160,8 @@ gotdata(char *buf, size_t len) for (i = 0; i < len; ++i) any_set |= buf[i]; if (any_set == 0) - return -1; - return 0; + return (-1); + return (0); } static int @@ -212,11 +212,11 @@ start: close(fd); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } nodevrandom: errno = EIO; - return -1; + return (-1); } static const int cl[] = { @@ -250,7 +250,7 @@ getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data) SHA512_CTX *ctx = data; SHA512_Update(ctx, &info->dlpi_addr, sizeof (info->dlpi_addr)); - return 0; + return (0); } static int @@ -438,8 +438,8 @@ getentropy_fallback(void *buf, size_t len) explicit_bzero(results, sizeof results); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/arc4random/getentropy_win.c b/src/lib/libcrypto/arc4random/getentropy_win.c index da048ae1..2e89b122 100644 --- a/src/lib/libcrypto/arc4random/getentropy_win.c +++ b/src/lib/libcrypto/arc4random/getentropy_win.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_win.c,v 1.3 2014/11/11 13:54:33 bcook Exp $ */ +/* $OpenBSD: getentropy_win.c,v 1.4 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014, Theo de Raadt @@ -40,7 +40,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, diff --git a/src/lib/libcrypto/crypto/arc4random_freebsd.h b/src/lib/libcrypto/crypto/arc4random_freebsd.h index b97bad86..b54f400c 100644 --- a/src/lib/libcrypto/crypto/arc4random_freebsd.h +++ b/src/lib/libcrypto/crypto/arc4random_freebsd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random_freebsd.h,v 1.2 2015/01/15 06:57:18 deraadt Exp $ */ +/* $OpenBSD: arc4random_freebsd.h,v 1.3 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 1996, David Mazieres @@ -73,14 +73,14 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) { if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) - return -1; + return (-1); if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { munmap(*rsp, sizeof(**rsp)); - return -1; + return (-1); } _ARC4_ATFORK(_rs_forkhandler); - return 0; + return (0); } diff --git a/src/lib/libcrypto/crypto/arc4random_netbsd.h b/src/lib/libcrypto/crypto/arc4random_netbsd.h index 489e73a0..7092baf7 100644 --- a/src/lib/libcrypto/crypto/arc4random_netbsd.h +++ b/src/lib/libcrypto/crypto/arc4random_netbsd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random_netbsd.h,v 1.1 2015/01/19 20:21:40 bcook Exp $ */ +/* $OpenBSD: arc4random_netbsd.h,v 1.2 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 1996, David Mazieres @@ -73,14 +73,14 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) { if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) - return -1; + return (-1); if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { munmap(*rsp, sizeof(**rsp)); - return -1; + return (-1); } _ARC4_ATFORK(_rs_forkhandler); - return 0; + return (0); } diff --git a/src/lib/libcrypto/crypto/arc4random_osx.h b/src/lib/libcrypto/crypto/arc4random_osx.h index 3bb14e03..19233ab5 100644 --- a/src/lib/libcrypto/crypto/arc4random_osx.h +++ b/src/lib/libcrypto/crypto/arc4random_osx.h @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random_osx.h,v 1.9 2015/01/15 06:57:18 deraadt Exp $ */ +/* $OpenBSD: arc4random_osx.h,v 1.10 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 1996, David Mazieres @@ -67,14 +67,14 @@ _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) { if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) - return -1; + return (-1); if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { munmap(*rsp, sizeof(**rsp)); - return -1; + return (-1); } _ARC4_ATFORK(_rs_forkhandler); - return 0; + return (0); } diff --git a/src/lib/libcrypto/crypto/getentropy_aix.c b/src/lib/libcrypto/crypto/getentropy_aix.c index 56096e7c..0616bfde 100644 --- a/src/lib/libcrypto/crypto/getentropy_aix.c +++ b/src/lib/libcrypto/crypto/getentropy_aix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_aix.c,v 1.3 2015/08/25 17:26:43 deraadt Exp $ */ +/* $OpenBSD: getentropy_aix.c,v 1.4 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2015 Michael Felt @@ -72,7 +72,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } /* @@ -130,8 +130,8 @@ gotdata(char *buf, size_t len) for (i = 0; i < len; ++i) any_set |= buf[i]; if (any_set == 0) - return -1; - return 0; + return (-1); + return (0); } static int @@ -181,11 +181,11 @@ start: close(fd); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } nodevrandom: errno = EIO; - return -1; + return (-1); } static const int cl[] = { @@ -418,8 +418,8 @@ getentropy_fallback(void *buf, size_t len) explicit_bzero(results, sizeof results); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/crypto/getentropy_hpux.c b/src/lib/libcrypto/crypto/getentropy_hpux.c index 2c4abfc9..bdac6e16 100644 --- a/src/lib/libcrypto/crypto/getentropy_hpux.c +++ b/src/lib/libcrypto/crypto/getentropy_hpux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_hpux.c,v 1.3 2015/08/25 17:26:43 deraadt Exp $ */ +/* $OpenBSD: getentropy_hpux.c,v 1.4 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -76,7 +76,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } /* @@ -134,8 +134,8 @@ gotdata(char *buf, size_t len) for (i = 0; i < len; ++i) any_set |= buf[i]; if (any_set == 0) - return -1; - return 0; + return (-1); + return (0); } static int @@ -185,11 +185,11 @@ start: close(fd); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } nodevrandom: errno = EIO; - return -1; + return (-1); } static const int cl[] = { @@ -412,8 +412,8 @@ getentropy_fallback(void *buf, size_t len) explicit_bzero(results, sizeof results); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/crypto/getentropy_linux.c b/src/lib/libcrypto/crypto/getentropy_linux.c index fb218fee..2a0a6875 100644 --- a/src/lib/libcrypto/crypto/getentropy_linux.c +++ b/src/lib/libcrypto/crypto/getentropy_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_linux.c,v 1.40 2015/08/25 17:26:43 deraadt Exp $ */ +/* $OpenBSD: getentropy_linux.c,v 1.41 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -91,7 +91,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } #ifdef SYS_getrandom @@ -186,8 +186,8 @@ gotdata(char *buf, size_t len) for (i = 0; i < len; ++i) any_set |= buf[i]; if (any_set == 0) - return -1; - return 0; + return (-1); + return (0); } #ifdef SYS_getrandom @@ -260,11 +260,11 @@ start: close(fd); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } nodevrandom: errno = EIO; - return -1; + return (-1); } #ifdef SYS__sysctl @@ -295,7 +295,7 @@ getentropy_sysctl(void *buf, size_t len) } sysctlfailed: errno = EIO; - return -1; + return (-1); } #endif /* SYS__sysctl */ @@ -330,7 +330,7 @@ getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data) SHA512_CTX *ctx = data; SHA512_Update(ctx, &info->dlpi_addr, sizeof (info->dlpi_addr)); - return 0; + return (0); } static int @@ -540,8 +540,8 @@ getentropy_fallback(void *buf, size_t len) explicit_bzero(results, sizeof results); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/crypto/getentropy_netbsd.c b/src/lib/libcrypto/crypto/getentropy_netbsd.c index a9710ef9..2a73591f 100644 --- a/src/lib/libcrypto/crypto/getentropy_netbsd.c +++ b/src/lib/libcrypto/crypto/getentropy_netbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_netbsd.c,v 1.1 2015/01/19 20:21:40 bcook Exp $ */ +/* $OpenBSD: getentropy_netbsd.c,v 1.2 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014 Pawel Jakub Dawidek @@ -55,10 +55,10 @@ int getentropy(void *buf, size_t len) { if (len <= 256 && - getentropy_sysctl(buf, len) == len) { - return 0; + getentropy_sysctl(buf, len) == len) { + return (0); } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/crypto/getentropy_osx.c b/src/lib/libcrypto/crypto/getentropy_osx.c index ac5c748f..e2dc9164 100644 --- a/src/lib/libcrypto/crypto/getentropy_osx.c +++ b/src/lib/libcrypto/crypto/getentropy_osx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_osx.c,v 1.8 2014/07/21 20:19:47 guenther Exp $ */ +/* $OpenBSD: getentropy_osx.c,v 1.9 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -88,7 +88,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } /* @@ -149,8 +149,8 @@ gotdata(char *buf, size_t len) for (i = 0; i < len; ++i) any_set |= buf[i]; if (any_set == 0) - return -1; - return 0; + return (-1); + return (0); } static int @@ -200,11 +200,11 @@ start: close(fd); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } nodevrandom: errno = EIO; - return -1; + return (-1); } static int tcpmib[] = { CTL_NET, AF_INET, IPPROTO_TCP, TCPCTL_STATS }; @@ -422,8 +422,8 @@ getentropy_fallback(void *buf, size_t len) explicit_bzero(results, sizeof results); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/crypto/getentropy_solaris.c b/src/lib/libcrypto/crypto/getentropy_solaris.c index 4133d895..53ce742f 100644 --- a/src/lib/libcrypto/crypto/getentropy_solaris.c +++ b/src/lib/libcrypto/crypto/getentropy_solaris.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_solaris.c,v 1.10 2015/08/25 17:26:43 deraadt Exp $ */ +/* $OpenBSD: getentropy_solaris.c,v 1.11 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014 Theo de Raadt @@ -81,7 +81,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } /* @@ -160,8 +160,8 @@ gotdata(char *buf, size_t len) for (i = 0; i < len; ++i) any_set |= buf[i]; if (any_set == 0) - return -1; - return 0; + return (-1); + return (0); } static int @@ -212,11 +212,11 @@ start: close(fd); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } nodevrandom: errno = EIO; - return -1; + return (-1); } static const int cl[] = { @@ -250,7 +250,7 @@ getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data) SHA512_CTX *ctx = data; SHA512_Update(ctx, &info->dlpi_addr, sizeof (info->dlpi_addr)); - return 0; + return (0); } static int @@ -438,8 +438,8 @@ getentropy_fallback(void *buf, size_t len) explicit_bzero(results, sizeof results); if (gotdata(buf, len) == 0) { errno = save_errno; - return 0; /* satisfied */ + return (0); /* satisfied */ } errno = EIO; - return -1; + return (-1); } diff --git a/src/lib/libcrypto/crypto/getentropy_win.c b/src/lib/libcrypto/crypto/getentropy_win.c index da048ae1..2e89b122 100644 --- a/src/lib/libcrypto/crypto/getentropy_win.c +++ b/src/lib/libcrypto/crypto/getentropy_win.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_win.c,v 1.3 2014/11/11 13:54:33 bcook Exp $ */ +/* $OpenBSD: getentropy_win.c,v 1.4 2015/09/11 11:52:55 deraadt Exp $ */ /* * Copyright (c) 2014, Theo de Raadt @@ -40,7 +40,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,