X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Futils%2Ftestapp%2Fsignal-helper.hpp;h=26272e37e4ad599a49acaa66677f8c67bc4c38d3;hb=HEAD;hp=ceadcb37277225bab6adf92667032888f6be49a0;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f;p=lttng-tools.git diff --git a/tests/utils/testapp/signal-helper.hpp b/tests/utils/testapp/signal-helper.hpp index ceadcb372..26272e37e 100644 --- a/tests/utils/testapp/signal-helper.hpp +++ b/tests/utils/testapp/signal-helper.hpp @@ -9,19 +9,18 @@ #define LTTNG_TESTAPP_SIGNAL_HELPER_H #include +#include 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 {}; @@ -34,7 +33,7 @@ int set_signal_handler(void) goto end; } - ret = sigaction(SIGTERM, &sa, NULL); + ret = sigaction(SIGTERM, &sa, nullptr); if (ret) { perror("sigaction"); goto end;