summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbcook <bcook@openbsd.org>2014-07-19 13:02:28 +0000
committerbcook <bcook@openbsd.org>2014-07-19 13:02:28 +0000
commit40d5988388806226c206054dd75b4901e56ee9f6 (patch)
treed67e9fad769a58b56aa7414d658a730d6b16df9b
parentBackout pci_dopm usage as it also breaks reboot on Lemote's. (diff)
downloadwireguard-openbsd-40d5988388806226c206054dd75b4901e56ee9f6.tar.xz
wireguard-openbsd-40d5988388806226c206054dd75b4901e56ee9f6.zip
fixup typos
-rw-r--r--lib/libcrypto/arc4random/arc4random_linux.h36
-rw-r--r--lib/libcrypto/arc4random/arc4random_osx.h36
-rw-r--r--lib/libcrypto/arc4random/arc4random_solaris.h37
-rw-r--r--lib/libcrypto/crypto/arc4random_linux.h36
-rw-r--r--lib/libcrypto/crypto/arc4random_osx.h36
-rw-r--r--lib/libcrypto/crypto/arc4random_solaris.h37
6 files changed, 108 insertions, 110 deletions
diff --git a/lib/libcrypto/arc4random/arc4random_linux.h b/lib/libcrypto/arc4random/arc4random_linux.h
index a713d15e06d..992ee6bb8ef 100644
--- a/lib/libcrypto/arc4random/arc4random_linux.h
+++ b/lib/libcrypto/arc4random/arc4random_linux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc4random_linux.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */
+/* $OpenBSD: arc4random_linux.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -22,23 +22,6 @@
* Stub functions for portability.
*/
-static inline int
-_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);
-
- if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
- munmap(*rsxp, sizeof(**rsxp);
- return (-1);
- }
-
- _ARC4_ATFORK(_rs_forkhandler);
- return (0);
-}
-
static volatile sig_atomic_t _rs_forked;
static inline void
@@ -60,3 +43,20 @@ _rs_forkdetect(void)
memset(rs, 0, sizeof(*rs));
}
}
+
+static inline int
+_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);
+
+ if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
+ munmap(*rsxp, sizeof(**rsxp));
+ return (-1);
+ }
+
+ _ARC4_ATFORK(_rs_forkhandler);
+ return (0);
+}
diff --git a/lib/libcrypto/arc4random/arc4random_osx.h b/lib/libcrypto/arc4random/arc4random_osx.h
index ea4bd70fcd0..274288000f4 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.3 2014/07/19 00:08:43 deraadt Exp $ */
+/* $OpenBSD: arc4random_osx.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -22,23 +22,6 @@
* Stub functions for portability.
*/
-static inline int
-_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);
-
- if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
- munmap(*rsxp, sizeof(**rsxp);
- return (-1);
- }
-
- _ARC4_ATFORK(_rs_forkhandler);
- return (0);
-}
-
static volatile sig_atomic_t _rs_forked;
static inline void
@@ -60,3 +43,20 @@ _rs_forkdetect(void)
memset(rs, 0, sizeof(*rs));
}
}
+
+static inline int
+_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;
+
+ if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
+ munmap(*rsxp, sizeof(**rsxp));
+ return -1;
+ }
+
+ _ARC4_ATFORK(_rs_forkhandler);
+ return 0;
+}
diff --git a/lib/libcrypto/arc4random/arc4random_solaris.h b/lib/libcrypto/arc4random/arc4random_solaris.h
index ec9353f1b77..128f61e0033 100644
--- a/lib/libcrypto/arc4random/arc4random_solaris.h
+++ b/lib/libcrypto/arc4random/arc4random_solaris.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc4random_solaris.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */
+/* $OpenBSD: arc4random_solaris.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -21,24 +21,6 @@
/*
* Stub functions for portability.
*/
-
-static inline int
-_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);
-
- if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
- munmap(*rsxp, sizeof(**rsxp);
- return (-1);
- }
-
- _ARC4_ATFORK(_rs_forkhandler);
- return (0);
-}
-
static volatile sig_atomic_t _rs_forked;
static inline void
@@ -60,3 +42,20 @@ _rs_forkdetect(void)
memset(rs, 0, sizeof(*rs));
}
}
+
+static inline int
+_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);
+
+ if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
+ munmap(*rsxp, sizeof(**rsxp));
+ return (-1);
+ }
+
+ _ARC4_ATFORK(_rs_forkhandler);
+ return (0);
+}
diff --git a/lib/libcrypto/crypto/arc4random_linux.h b/lib/libcrypto/crypto/arc4random_linux.h
index a713d15e06d..992ee6bb8ef 100644
--- a/lib/libcrypto/crypto/arc4random_linux.h
+++ b/lib/libcrypto/crypto/arc4random_linux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc4random_linux.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */
+/* $OpenBSD: arc4random_linux.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -22,23 +22,6 @@
* Stub functions for portability.
*/
-static inline int
-_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);
-
- if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
- munmap(*rsxp, sizeof(**rsxp);
- return (-1);
- }
-
- _ARC4_ATFORK(_rs_forkhandler);
- return (0);
-}
-
static volatile sig_atomic_t _rs_forked;
static inline void
@@ -60,3 +43,20 @@ _rs_forkdetect(void)
memset(rs, 0, sizeof(*rs));
}
}
+
+static inline int
+_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);
+
+ if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
+ munmap(*rsxp, sizeof(**rsxp));
+ return (-1);
+ }
+
+ _ARC4_ATFORK(_rs_forkhandler);
+ return (0);
+}
diff --git a/lib/libcrypto/crypto/arc4random_osx.h b/lib/libcrypto/crypto/arc4random_osx.h
index ea4bd70fcd0..274288000f4 100644
--- a/lib/libcrypto/crypto/arc4random_osx.h
+++ b/lib/libcrypto/crypto/arc4random_osx.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc4random_osx.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */
+/* $OpenBSD: arc4random_osx.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -22,23 +22,6 @@
* Stub functions for portability.
*/
-static inline int
-_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);
-
- if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
- munmap(*rsxp, sizeof(**rsxp);
- return (-1);
- }
-
- _ARC4_ATFORK(_rs_forkhandler);
- return (0);
-}
-
static volatile sig_atomic_t _rs_forked;
static inline void
@@ -60,3 +43,20 @@ _rs_forkdetect(void)
memset(rs, 0, sizeof(*rs));
}
}
+
+static inline int
+_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;
+
+ if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
+ munmap(*rsxp, sizeof(**rsxp));
+ return -1;
+ }
+
+ _ARC4_ATFORK(_rs_forkhandler);
+ return 0;
+}
diff --git a/lib/libcrypto/crypto/arc4random_solaris.h b/lib/libcrypto/crypto/arc4random_solaris.h
index ec9353f1b77..128f61e0033 100644
--- a/lib/libcrypto/crypto/arc4random_solaris.h
+++ b/lib/libcrypto/crypto/arc4random_solaris.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc4random_solaris.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */
+/* $OpenBSD: arc4random_solaris.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -21,24 +21,6 @@
/*
* Stub functions for portability.
*/
-
-static inline int
-_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);
-
- if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
- munmap(*rsxp, sizeof(**rsxp);
- return (-1);
- }
-
- _ARC4_ATFORK(_rs_forkhandler);
- return (0);
-}
-
static volatile sig_atomic_t _rs_forked;
static inline void
@@ -60,3 +42,20 @@ _rs_forkdetect(void)
memset(rs, 0, sizeof(*rs));
}
}
+
+static inline int
+_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);
+
+ if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
+ munmap(*rsxp, sizeof(**rsxp));
+ return (-1);
+ }
+
+ _ARC4_ATFORK(_rs_forkhandler);
+ return (0);
+}