diff options
| author | bcook <> | 2014-07-19 13:02:28 +0000 | 
|---|---|---|
| committer | bcook <> | 2014-07-19 13:02:28 +0000 | 
| commit | 7fb2af12ce2778416f758df6e30e9932b1909167 (patch) | |
| tree | 53d501834c44a51110661a8ac9346c6c06f12bbe /src | |
| parent | 46d5c3cc30e24d85e8c9bbed06a9a2b022705da2 (diff) | |
| download | openbsd-7fb2af12ce2778416f758df6e30e9932b1909167.tar.gz openbsd-7fb2af12ce2778416f758df6e30e9932b1909167.tar.bz2 openbsd-7fb2af12ce2778416f758df6e30e9932b1909167.zip | |
fixup typos
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/arc4random/arc4random_linux.h | 36 | ||||
| -rw-r--r-- | src/lib/libcrypto/arc4random/arc4random_osx.h | 36 | ||||
| -rw-r--r-- | src/lib/libcrypto/arc4random/arc4random_solaris.h | 37 | ||||
| -rw-r--r-- | src/lib/libcrypto/crypto/arc4random_linux.h | 36 | ||||
| -rw-r--r-- | src/lib/libcrypto/crypto/arc4random_osx.h | 36 | ||||
| -rw-r--r-- | src/lib/libcrypto/crypto/arc4random_solaris.h | 37 | 
6 files changed, 108 insertions, 110 deletions
| diff --git a/src/lib/libcrypto/arc4random/arc4random_linux.h b/src/lib/libcrypto/arc4random/arc4random_linux.h index a713d15e06..992ee6bb8e 100644 --- a/src/lib/libcrypto/arc4random/arc4random_linux.h +++ b/src/lib/libcrypto/arc4random/arc4random_linux.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_linux.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */ | 1 | /* $OpenBSD: arc4random_linux.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 
| @@ -22,23 +22,6 @@ | |||
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. | 
| 23 | */ | 23 | */ | 
| 24 | 24 | ||
| 25 | static inline int | ||
| 26 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 27 | { | ||
| 28 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 29 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 30 | return (-1); | ||
| 31 | |||
| 32 | if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE, | ||
| 33 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 34 | munmap(*rsxp, sizeof(**rsxp); | ||
| 35 | return (-1); | ||
| 36 | } | ||
| 37 | |||
| 38 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 39 | return (0); | ||
| 40 | } | ||
| 41 | |||
| 42 | static volatile sig_atomic_t _rs_forked; | 25 | static volatile sig_atomic_t _rs_forked; | 
| 43 | 26 | ||
| 44 | static inline void | 27 | static inline void | 
| @@ -60,3 +43,20 @@ _rs_forkdetect(void) | |||
| 60 | memset(rs, 0, sizeof(*rs)); | 43 | memset(rs, 0, sizeof(*rs)); | 
| 61 | } | 44 | } | 
| 62 | } | 45 | } | 
| 46 | |||
| 47 | static inline int | ||
| 48 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 49 | { | ||
| 50 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 51 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 52 | return (-1); | ||
| 53 | |||
| 54 | if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, | ||
| 55 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 56 | munmap(*rsxp, sizeof(**rsxp)); | ||
| 57 | return (-1); | ||
| 58 | } | ||
| 59 | |||
| 60 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 61 | return (0); | ||
| 62 | } | ||
| diff --git a/src/lib/libcrypto/arc4random/arc4random_osx.h b/src/lib/libcrypto/arc4random/arc4random_osx.h index ea4bd70fcd..274288000f 100644 --- a/src/lib/libcrypto/arc4random/arc4random_osx.h +++ b/src/lib/libcrypto/arc4random/arc4random_osx.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_osx.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */ | 1 | /* $OpenBSD: arc4random_osx.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 
| @@ -22,23 +22,6 @@ | |||
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. | 
| 23 | */ | 23 | */ | 
| 24 | 24 | ||
| 25 | static inline int | ||
| 26 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 27 | { | ||
| 28 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 29 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 30 | return (-1); | ||
| 31 | |||
| 32 | if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE, | ||
| 33 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 34 | munmap(*rsxp, sizeof(**rsxp); | ||
| 35 | return (-1); | ||
| 36 | } | ||
| 37 | |||
| 38 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 39 | return (0); | ||
| 40 | } | ||
| 41 | |||
| 42 | static volatile sig_atomic_t _rs_forked; | 25 | static volatile sig_atomic_t _rs_forked; | 
| 43 | 26 | ||
| 44 | static inline void | 27 | static inline void | 
| @@ -60,3 +43,20 @@ _rs_forkdetect(void) | |||
| 60 | memset(rs, 0, sizeof(*rs)); | 43 | memset(rs, 0, sizeof(*rs)); | 
| 61 | } | 44 | } | 
| 62 | } | 45 | } | 
| 46 | |||
| 47 | static inline int | ||
| 48 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 49 | { | ||
| 50 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 51 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 52 | return -1; | ||
| 53 | |||
| 54 | if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, | ||
| 55 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 56 | munmap(*rsxp, sizeof(**rsxp)); | ||
| 57 | return -1; | ||
| 58 | } | ||
| 59 | |||
| 60 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 61 | return 0; | ||
| 62 | } | ||
| diff --git a/src/lib/libcrypto/arc4random/arc4random_solaris.h b/src/lib/libcrypto/arc4random/arc4random_solaris.h index ec9353f1b7..128f61e003 100644 --- a/src/lib/libcrypto/arc4random/arc4random_solaris.h +++ b/src/lib/libcrypto/arc4random/arc4random_solaris.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_solaris.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */ | 1 | /* $OpenBSD: arc4random_solaris.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 
| @@ -21,24 +21,6 @@ | |||
| 21 | /* | 21 | /* | 
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. | 
| 23 | */ | 23 | */ | 
| 24 | |||
| 25 | static inline int | ||
| 26 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 27 | { | ||
| 28 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 29 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 30 | return (-1); | ||
| 31 | |||
| 32 | if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE, | ||
| 33 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 34 | munmap(*rsxp, sizeof(**rsxp); | ||
| 35 | return (-1); | ||
| 36 | } | ||
| 37 | |||
| 38 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 39 | return (0); | ||
| 40 | } | ||
| 41 | |||
| 42 | static volatile sig_atomic_t _rs_forked; | 24 | static volatile sig_atomic_t _rs_forked; | 
| 43 | 25 | ||
| 44 | static inline void | 26 | static inline void | 
| @@ -60,3 +42,20 @@ _rs_forkdetect(void) | |||
| 60 | memset(rs, 0, sizeof(*rs)); | 42 | memset(rs, 0, sizeof(*rs)); | 
| 61 | } | 43 | } | 
| 62 | } | 44 | } | 
| 45 | |||
| 46 | static inline int | ||
| 47 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 48 | { | ||
| 49 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 50 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 51 | return (-1); | ||
| 52 | |||
| 53 | if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, | ||
| 54 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 55 | munmap(*rsxp, sizeof(**rsxp)); | ||
| 56 | return (-1); | ||
| 57 | } | ||
| 58 | |||
| 59 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 60 | return (0); | ||
| 61 | } | ||
| diff --git a/src/lib/libcrypto/crypto/arc4random_linux.h b/src/lib/libcrypto/crypto/arc4random_linux.h index a713d15e06..992ee6bb8e 100644 --- a/src/lib/libcrypto/crypto/arc4random_linux.h +++ b/src/lib/libcrypto/crypto/arc4random_linux.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_linux.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */ | 1 | /* $OpenBSD: arc4random_linux.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 
| @@ -22,23 +22,6 @@ | |||
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. | 
| 23 | */ | 23 | */ | 
| 24 | 24 | ||
| 25 | static inline int | ||
| 26 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 27 | { | ||
| 28 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 29 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 30 | return (-1); | ||
| 31 | |||
| 32 | if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE, | ||
| 33 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 34 | munmap(*rsxp, sizeof(**rsxp); | ||
| 35 | return (-1); | ||
| 36 | } | ||
| 37 | |||
| 38 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 39 | return (0); | ||
| 40 | } | ||
| 41 | |||
| 42 | static volatile sig_atomic_t _rs_forked; | 25 | static volatile sig_atomic_t _rs_forked; | 
| 43 | 26 | ||
| 44 | static inline void | 27 | static inline void | 
| @@ -60,3 +43,20 @@ _rs_forkdetect(void) | |||
| 60 | memset(rs, 0, sizeof(*rs)); | 43 | memset(rs, 0, sizeof(*rs)); | 
| 61 | } | 44 | } | 
| 62 | } | 45 | } | 
| 46 | |||
| 47 | static inline int | ||
| 48 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 49 | { | ||
| 50 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 51 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 52 | return (-1); | ||
| 53 | |||
| 54 | if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, | ||
| 55 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 56 | munmap(*rsxp, sizeof(**rsxp)); | ||
| 57 | return (-1); | ||
| 58 | } | ||
| 59 | |||
| 60 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 61 | return (0); | ||
| 62 | } | ||
| diff --git a/src/lib/libcrypto/crypto/arc4random_osx.h b/src/lib/libcrypto/crypto/arc4random_osx.h index ea4bd70fcd..274288000f 100644 --- a/src/lib/libcrypto/crypto/arc4random_osx.h +++ b/src/lib/libcrypto/crypto/arc4random_osx.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_osx.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */ | 1 | /* $OpenBSD: arc4random_osx.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 
| @@ -22,23 +22,6 @@ | |||
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. | 
| 23 | */ | 23 | */ | 
| 24 | 24 | ||
| 25 | static inline int | ||
| 26 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 27 | { | ||
| 28 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 29 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 30 | return (-1); | ||
| 31 | |||
| 32 | if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE, | ||
| 33 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 34 | munmap(*rsxp, sizeof(**rsxp); | ||
| 35 | return (-1); | ||
| 36 | } | ||
| 37 | |||
| 38 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 39 | return (0); | ||
| 40 | } | ||
| 41 | |||
| 42 | static volatile sig_atomic_t _rs_forked; | 25 | static volatile sig_atomic_t _rs_forked; | 
| 43 | 26 | ||
| 44 | static inline void | 27 | static inline void | 
| @@ -60,3 +43,20 @@ _rs_forkdetect(void) | |||
| 60 | memset(rs, 0, sizeof(*rs)); | 43 | memset(rs, 0, sizeof(*rs)); | 
| 61 | } | 44 | } | 
| 62 | } | 45 | } | 
| 46 | |||
| 47 | static inline int | ||
| 48 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 49 | { | ||
| 50 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 51 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 52 | return -1; | ||
| 53 | |||
| 54 | if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, | ||
| 55 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 56 | munmap(*rsxp, sizeof(**rsxp)); | ||
| 57 | return -1; | ||
| 58 | } | ||
| 59 | |||
| 60 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 61 | return 0; | ||
| 62 | } | ||
| diff --git a/src/lib/libcrypto/crypto/arc4random_solaris.h b/src/lib/libcrypto/crypto/arc4random_solaris.h index ec9353f1b7..128f61e003 100644 --- a/src/lib/libcrypto/crypto/arc4random_solaris.h +++ b/src/lib/libcrypto/crypto/arc4random_solaris.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: arc4random_solaris.h,v 1.3 2014/07/19 00:08:43 deraadt Exp $ */ | 1 | /* $OpenBSD: arc4random_solaris.h,v 1.4 2014/07/19 13:02:28 bcook Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | 
| @@ -21,24 +21,6 @@ | |||
| 21 | /* | 21 | /* | 
| 22 | * Stub functions for portability. | 22 | * Stub functions for portability. | 
| 23 | */ | 23 | */ | 
| 24 | |||
| 25 | static inline int | ||
| 26 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 27 | { | ||
| 28 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 29 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 30 | return (-1); | ||
| 31 | |||
| 32 | if ((*rsxp = mmap(NULL, sizeof(**rsxp) PROT_READ|PROT_WRITE, | ||
| 33 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 34 | munmap(*rsxp, sizeof(**rsxp); | ||
| 35 | return (-1); | ||
| 36 | } | ||
| 37 | |||
| 38 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 39 | return (0); | ||
| 40 | } | ||
| 41 | |||
| 42 | static volatile sig_atomic_t _rs_forked; | 24 | static volatile sig_atomic_t _rs_forked; | 
| 43 | 25 | ||
| 44 | static inline void | 26 | static inline void | 
| @@ -60,3 +42,20 @@ _rs_forkdetect(void) | |||
| 60 | memset(rs, 0, sizeof(*rs)); | 42 | memset(rs, 0, sizeof(*rs)); | 
| 61 | } | 43 | } | 
| 62 | } | 44 | } | 
| 45 | |||
| 46 | static inline int | ||
| 47 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
| 48 | { | ||
| 49 | if ((*rsp = mmap(NULL, sizeof(**rsp), PROT_READ|PROT_WRITE, | ||
| 50 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
| 51 | return (-1); | ||
| 52 | |||
| 53 | if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE, | ||
| 54 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) { | ||
| 55 | munmap(*rsxp, sizeof(**rsxp)); | ||
| 56 | return (-1); | ||
| 57 | } | ||
| 58 | |||
| 59 | _ARC4_ATFORK(_rs_forkhandler); | ||
| 60 | return (0); | ||
| 61 | } | ||
