diff options
| author | jsing <> | 2014-04-15 13:42:55 +0000 |
|---|---|---|
| committer | jsing <> | 2014-04-15 13:42:55 +0000 |
| commit | 179b5aba8054138fe6ae76eb86d0ba485fa99f67 (patch) | |
| tree | f085d85cb06e6b6e1a1b1d52cced54d9f7d7e5f2 /src/lib/libcrypto/s390xcap.c | |
| parent | 91b7379546c278344ff2e20e9eb6ecec326f20cd (diff) | |
| download | openbsd-179b5aba8054138fe6ae76eb86d0ba485fa99f67.tar.gz openbsd-179b5aba8054138fe6ae76eb86d0ba485fa99f67.tar.bz2 openbsd-179b5aba8054138fe6ae76eb86d0ba485fa99f67.zip | |
First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using
tr and md5.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/s390xcap.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/lib/libcrypto/s390xcap.c b/src/lib/libcrypto/s390xcap.c index f2e94ef47e..77f6260785 100644 --- a/src/lib/libcrypto/s390xcap.c +++ b/src/lib/libcrypto/s390xcap.c | |||
| @@ -7,31 +7,36 @@ | |||
| 7 | extern unsigned long OPENSSL_s390xcap_P[]; | 7 | extern unsigned long OPENSSL_s390xcap_P[]; |
| 8 | 8 | ||
| 9 | static sigjmp_buf ill_jmp; | 9 | static sigjmp_buf ill_jmp; |
| 10 | static void ill_handler (int sig) { siglongjmp(ill_jmp,sig); } | 10 | static void ill_handler (int sig) |
| 11 | { | ||
| 12 | siglongjmp(ill_jmp, sig); | ||
| 13 | } | ||
| 11 | 14 | ||
| 12 | unsigned long OPENSSL_s390x_facilities(void); | 15 | unsigned long OPENSSL_s390x_facilities(void); |
| 13 | 16 | ||
| 14 | void OPENSSL_cpuid_setup(void) | 17 | void |
| 15 | { | 18 | OPENSSL_cpuid_setup(void) |
| 19 | { | ||
| 16 | sigset_t oset; | 20 | sigset_t oset; |
| 17 | struct sigaction ill_act,oact; | 21 | struct sigaction ill_act, oact; |
| 18 | 22 | ||
| 19 | if (OPENSSL_s390xcap_P[0]) return; | 23 | if (OPENSSL_s390xcap_P[0]) |
| 24 | return; | ||
| 20 | 25 | ||
| 21 | OPENSSL_s390xcap_P[0] = 1UL<<(8*sizeof(unsigned long)-1); | 26 | OPENSSL_s390xcap_P[0] = 1UL << (8*sizeof(unsigned long) - 1); |
| 22 | 27 | ||
| 23 | memset(&ill_act,0,sizeof(ill_act)); | 28 | memset(&ill_act, 0, sizeof(ill_act)); |
| 24 | ill_act.sa_handler = ill_handler; | 29 | ill_act.sa_handler = ill_handler; |
| 25 | sigfillset(&ill_act.sa_mask); | 30 | sigfillset(&ill_act.sa_mask); |
| 26 | sigdelset(&ill_act.sa_mask,SIGILL); | 31 | sigdelset(&ill_act.sa_mask, SIGILL); |
| 27 | sigdelset(&ill_act.sa_mask,SIGTRAP); | 32 | sigdelset(&ill_act.sa_mask, SIGTRAP); |
| 28 | sigprocmask(SIG_SETMASK,&ill_act.sa_mask,&oset); | 33 | sigprocmask(SIG_SETMASK, &ill_act.sa_mask, &oset); |
| 29 | sigaction (SIGILL,&ill_act,&oact); | 34 | sigaction (SIGILL, &ill_act, &oact); |
| 30 | 35 | ||
| 31 | /* protection against missing store-facility-list-extended */ | 36 | /* protection against missing store-facility-list-extended */ |
| 32 | if (sigsetjmp(ill_jmp,1) == 0) | 37 | if (sigsetjmp(ill_jmp, 1) == 0) |
| 33 | OPENSSL_s390x_facilities(); | 38 | OPENSSL_s390x_facilities(); |
| 34 | 39 | ||
| 35 | sigaction (SIGILL,&oact,NULL); | 40 | sigaction (SIGILL, &oact, NULL); |
| 36 | sigprocmask(SIG_SETMASK,&oset,NULL); | 41 | sigprocmask(SIG_SETMASK, &oset, NULL); |
| 37 | } | 42 | } |
