static volatile int should_quit;
-static
-void sighandler(int sig)
+static void sighandler(int sig)
{
if (sig == SIGTERM) {
should_quit = 1;
}
}
-static
-int set_signal_handler(void)
+static int set_signal_handler()
{
int ret;
struct sigaction sa {};
goto end;
}
- ret = sigaction(SIGTERM, &sa, NULL);
+ ret = sigaction(SIGTERM, &sa, nullptr);
if (ret) {
perror("sigaction");
goto end;