From 0428eda73905618ff1b3b307d3c45dfec11ba6fe Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 12 Feb 2015 10:04:44 +0200 Subject: [PATCH] monitor/mainloop: Use proper exit status code defines instead of hard-coded values --- monitor/mainloop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monitor/mainloop.c b/monitor/mainloop.c index 8d4b39189..38737db87 100644 --- a/monitor/mainloop.c +++ b/monitor/mainloop.c @@ -114,17 +114,17 @@ int mainloop_run(void) if (signal_data) { if (sigprocmask(SIG_BLOCK, &signal_data->mask, NULL) < 0) - return 1; + return EXIT_FAILURE; signal_data->fd = signalfd(-1, &signal_data->mask, SFD_NONBLOCK | SFD_CLOEXEC); if (signal_data->fd < 0) - return 1; + return EXIT_FAILURE; if (mainloop_add_fd(signal_data->fd, EPOLLIN, signal_callback, signal_data, NULL) < 0) { close(signal_data->fd); - return 1; + return EXIT_FAILURE; } } @@ -170,7 +170,7 @@ int mainloop_run(void) close(epoll_fd); epoll_fd = 0; - return 0; + return EXIT_SUCCESS; } int mainloop_add_fd(int fd, uint32_t events, mainloop_event_func callback, -- 2.47.3