From f9a8fff2f90626aadd915178d04ece49d8c4884a Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Sun, 14 Jul 2024 18:01:52 +0200 Subject: switch to signal handlers that take no arguments for concrete signals --- src/sig.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/sig.c b/src/sig.c index 4c88143..e7c312e 100644 --- a/src/sig.c +++ b/src/sig.c @@ -19,9 +19,9 @@ void sig_alarmunblock() sig_unblock(SIGALRM); } -void sig_alarmcatch(void (*f)(int)) +void sig_alarmcatch(void (*f)(void)) { - sig_catch(SIGALRM, f); + sig_catch(SIGALRM, (void (*)(int))f); } void sig_alarmdefault() @@ -92,9 +92,9 @@ void sig_childunblock() sig_unblock(SIGCHLD); } -void sig_childcatch(void (*f)(int)) +void sig_childcatch(void (*f)(void)) { - sig_catch(SIGCHLD, f); + sig_catch(SIGCHLD, (void (*)(int))f); } void sig_childdefault() @@ -114,9 +114,9 @@ void sig_hangupunblock() sig_unblock(SIGHUP); } -void sig_hangupcatch(void (*f)(int)) +void sig_hangupcatch(void (*f)(void)) { - sig_catch(SIGHUP, f); + sig_catch(SIGHUP, (void (*)(int))f); } void sig_hangupdefault() @@ -136,9 +136,9 @@ void sig_termunblock() sig_unblock(SIGTERM); } -void sig_termcatch(f) void (*f)(int); +void sig_termcatch(void (*f)(void)) { - sig_catch(SIGTERM, f); + sig_catch(SIGTERM, (void (*)(int))f); } void sig_termdefault() -- cgit v1.2.3