diff options
author | Nathan Scott <nathans@redhat.com> | 2023-04-04 16:48:46 +1000 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-04-06 00:19:54 +0200 |
commit | c878343784f23d7cb18ccec6aa034f01aee8069e (patch) | |
tree | cb1272776ec4d2cabc1502b9f2d9690a46c7c94e /CRT.c | |
parent | 14da84f877a0f3627ddaea836c9537b2292fa22d (diff) |
Correct some inconsistent function call conventions in CRT.c
Diffstat (limited to 'CRT.c')
-rw-r--r-- | CRT.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -888,16 +888,16 @@ static struct sigaction old_sig_handler[32]; static void CRT_installSignalHandlers(void) { struct sigaction act; - sigemptyset (&act.sa_mask); + sigemptyset(&act.sa_mask); act.sa_flags = (int)SA_RESETHAND | SA_NODEFER; act.sa_handler = CRT_handleSIGSEGV; - sigaction (SIGSEGV, &act, &old_sig_handler[SIGSEGV]); - sigaction (SIGFPE, &act, &old_sig_handler[SIGFPE]); - sigaction (SIGILL, &act, &old_sig_handler[SIGILL]); - sigaction (SIGBUS, &act, &old_sig_handler[SIGBUS]); - sigaction (SIGPIPE, &act, &old_sig_handler[SIGPIPE]); - sigaction (SIGSYS, &act, &old_sig_handler[SIGSYS]); - sigaction (SIGABRT, &act, &old_sig_handler[SIGABRT]); + sigaction(SIGSEGV, &act, &old_sig_handler[SIGSEGV]); + sigaction(SIGFPE, &act, &old_sig_handler[SIGFPE]); + sigaction(SIGILL, &act, &old_sig_handler[SIGILL]); + sigaction(SIGBUS, &act, &old_sig_handler[SIGBUS]); + sigaction(SIGPIPE, &act, &old_sig_handler[SIGPIPE]); + sigaction(SIGSYS, &act, &old_sig_handler[SIGSYS]); + sigaction(SIGABRT, &act, &old_sig_handler[SIGABRT]); signal(SIGCHLD, SIG_DFL); signal(SIGINT, CRT_handleSIGTERM); @@ -906,13 +906,13 @@ static void CRT_installSignalHandlers(void) { } void CRT_resetSignalHandlers(void) { - sigaction (SIGSEGV, &old_sig_handler[SIGSEGV], NULL); - sigaction (SIGFPE, &old_sig_handler[SIGFPE], NULL); - sigaction (SIGILL, &old_sig_handler[SIGILL], NULL); - sigaction (SIGBUS, &old_sig_handler[SIGBUS], NULL); - sigaction (SIGPIPE, &old_sig_handler[SIGPIPE], NULL); - sigaction (SIGSYS, &old_sig_handler[SIGSYS], NULL); - sigaction (SIGABRT, &old_sig_handler[SIGABRT], NULL); + sigaction(SIGSEGV, &old_sig_handler[SIGSEGV], NULL); + sigaction(SIGFPE, &old_sig_handler[SIGFPE], NULL); + sigaction(SIGILL, &old_sig_handler[SIGILL], NULL); + sigaction(SIGBUS, &old_sig_handler[SIGBUS], NULL); + sigaction(SIGPIPE, &old_sig_handler[SIGPIPE], NULL); + sigaction(SIGSYS, &old_sig_handler[SIGSYS], NULL); + sigaction(SIGABRT, &old_sig_handler[SIGABRT], NULL); signal(SIGINT, SIG_DFL); signal(SIGTERM, SIG_DFL); @@ -1225,7 +1225,7 @@ void CRT_handleSIGSEGV(int signal) { ); /* Call old sigsegv handler; may be default exit or third party one (e.g. ASAN) */ - if (sigaction (signal, &old_sig_handler[signal], NULL) < 0) { + if (sigaction(signal, &old_sig_handler[signal], NULL) < 0) { /* This avoids an infinite loop in case the handler could not be reset. */ fprintf(stderr, "!!! Chained handler could not be restored. Forcing exit.\n" |