From 5b1a5f2876b8c70ee7bf3eab8570a971697f542b Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 27 Oct 2020 08:35:29 -0400 Subject: Do not increment signals No need to do a read and a write... and it's declared volatile so maybe that's even worse? I don't even know, but there's no point. --- daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'daemon.c') diff --git a/daemon.c b/daemon.c index 490e13f..15c278d 100644 --- a/daemon.c +++ b/daemon.c @@ -46,7 +46,7 @@ struct timespec resetInterval = { .tv_sec = 15 * 60 }; static volatile sig_atomic_t signals[NSIG]; static void signalHandler(int signal) { - signals[signal]++; + signals[signal] = 1; } static int parseConfig(const char *path) { -- cgit 1.4.1