Commit 6a25466f authored by Jan Včelák's avatar Jan Včelák 🚀

server: clear static structure without memset

parent 38c0065f
......@@ -153,9 +153,7 @@ static void setup_signals(void)
pthread_sigmask(SIG_SETMASK, &all, NULL);
/* Setup handlers. */
struct sigaction action;
memset(&action, 0, sizeof(struct sigaction));
action.sa_handler = handle_signal;
struct sigaction action = { .sa_handler = handle_signal };
for (const struct signal *s = SIGNALS; s->signum > 0; s++) {
sigaction(s->signum, &action, NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment