summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-09-11 11:52:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-09-11 11:52:56 +0000
commit2f161f91c335bfc09e37dc52cc83020751df5a32 (patch)
tree8e91f5540a35a625d9b681c1178ce75137891ece
parent49570d7ab26986d50e68f2af3044176bba1a1878 (diff)
unify files further
-rw-r--r--lib/libcrypto/arc4random/arc4random_freebsd.h8
-rw-r--r--lib/libcrypto/arc4random/arc4random_netbsd.h8
-rw-r--r--lib/libcrypto/arc4random/arc4random_osx.h8
-rw-r--r--lib/libcrypto/arc4random/getentropy_aix.c16
-rw-r--r--lib/libcrypto/arc4random/getentropy_hpux.c16
-rw-r--r--lib/libcrypto/arc4random/getentropy_linux.c20
-rw-r--r--lib/libcrypto/arc4random/getentropy_netbsd.c8
-rw-r--r--lib/libcrypto/arc4random/getentropy_osx.c16
-rw-r--r--lib/libcrypto/arc4random/getentropy_solaris.c18
-rw-r--r--lib/libcrypto/arc4random/getentropy_win.c4
10 files changed, 61 insertions, 61 deletions
diff --git a/lib/libcrypto/arc4random/arc4random_freebsd.h b/lib/libcrypto/arc4random/arc4random_freebsd.h
index b97bad86caf..b54f400c545 100644
--- a/lib/libcrypto/arc4random/arc4random_freebsd.h
+++ b/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 <dm@uun.org>
@@ -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/lib/libcrypto/arc4random/arc4random_netbsd.h b/lib/libcrypto/arc4random/arc4random_netbsd.h
index 489e73a0785..7092baf77dc 100644
--- a/lib/libcrypto/arc4random/arc4random_netbsd.h
+++ b/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 <dm@uun.org>
@@ -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/lib/libcrypto/arc4random/arc4random_osx.h b/lib/libcrypto/arc4random/arc4random_osx.h
index 3bb14e03abb..19233ab58c2 100644
--- a/lib/libcrypto/arc4random/arc4random_osx.h
+++ b/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 <dm@uun.org>
@@ -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/lib/libcrypto/arc4random/getentropy_aix.c b/lib/libcrypto/arc4random/getentropy_aix.c
index 56096e7c4a0..0616bfde568 100644
--- a/lib/libcrypto/arc4random/getentropy_aix.c
+++ b/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 <aixtools@gmail.com>
@@ -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/lib/libcrypto/arc4random/getentropy_hpux.c b/lib/libcrypto/arc4random/getentropy_hpux.c
index 2c4abfc96d7..bdac6e16dec 100644
--- a/lib/libcrypto/arc4random/getentropy_hpux.c
+++ b/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 <deraadt@openbsd.org>
@@ -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/lib/libcrypto/arc4random/getentropy_linux.c b/lib/libcrypto/arc4random/getentropy_linux.c
index fb218feefaf..2a0a6875e4c 100644
--- a/lib/libcrypto/arc4random/getentropy_linux.c
+++ b/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 <deraadt@openbsd.org>
@@ -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/lib/libcrypto/arc4random/getentropy_netbsd.c b/lib/libcrypto/arc4random/getentropy_netbsd.c
index a9710ef9233..2a73591f6e7 100644
--- a/lib/libcrypto/arc4random/getentropy_netbsd.c
+++ b/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 <pjd@FreeBSD.org>
@@ -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/lib/libcrypto/arc4random/getentropy_osx.c b/lib/libcrypto/arc4random/getentropy_osx.c
index ac5c748f6a6..e2dc9164743 100644
--- a/lib/libcrypto/arc4random/getentropy_osx.c
+++ b/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 <deraadt@openbsd.org>
@@ -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/lib/libcrypto/arc4random/getentropy_solaris.c b/lib/libcrypto/arc4random/getentropy_solaris.c
index 4133d895fd9..53ce742fac7 100644
--- a/lib/libcrypto/arc4random/getentropy_solaris.c
+++ b/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 <deraadt@openbsd.org>
@@ -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/lib/libcrypto/arc4random/getentropy_win.c b/lib/libcrypto/arc4random/getentropy_win.c
index da048ae157d..2e89b122056 100644
--- a/lib/libcrypto/arc4random/getentropy_win.c
+++ b/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 <deraadt@openbsd.org>
@@ -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,