From 471e7ee279d633a7b48e73ece42677574a74ad39 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 29 Oct 2016 00:08:42 +0200 Subject: Modernize a few bits and pieces --- src/DabMux.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/DabMux.cpp') diff --git a/src/DabMux.cpp b/src/DabMux.cpp index c962818..046b149 100644 --- a/src/DabMux.cpp +++ b/src/DabMux.cpp @@ -188,8 +188,8 @@ int main(int argc, char *argv[]) sa.sa_handler = &signalHandler; const int sigs[] = {SIGHUP, SIGQUIT, SIGINT, SIGTERM}; - for (int i = 0; i < 4; i++) { - if (sigaction(sigs[i], &sa, nullptr) == -1) { + for (int sig : sigs) { + if (sigaction(sig, &sa, nullptr) == -1) { perror("sigaction"); return EXIT_FAILURE; } -- cgit v1.2.3