diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/signal.cxx | 28 | ||||
-rw-r--r-- | sal/rtl/hash.cxx | 6 |
2 files changed, 17 insertions, 17 deletions
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx index 1c857b6b7535..78b42eb6423c 100644 --- a/sal/osl/unx/signal.cxx +++ b/sal/osl/unx/signal.cxx @@ -208,21 +208,21 @@ bool onInitSignal() sigfillset(&(act.sa_mask)); /* Initialize the rest of the signals */ - for (int i = 0; i < NoSignals; ++i) + for (SignalAction & rSignal : Signals) { #if defined HAVE_VALGRIND_HEADERS - if (Signals[i].Signal == SIGUSR2 && RUNNING_ON_VALGRIND) - Signals[i].Action = ACT_IGNORE; + if (rSignal.Signal == SIGUSR2 && RUNNING_ON_VALGRIND) + rSignal.Action = ACT_IGNORE; #endif /* hack: stomcatd is attaching JavaVM which does not work with an sigaction(SEGV) */ - if ((bSetSEGVHandler || Signals[i].Signal != SIGSEGV) - && (bSetWINCHHandler || Signals[i].Signal != SIGWINCH) - && (bSetILLHandler || Signals[i].Signal != SIGILL)) + if ((bSetSEGVHandler || rSignal.Signal != SIGSEGV) + && (bSetWINCHHandler || rSignal.Signal != SIGWINCH) + && (bSetILLHandler || rSignal.Signal != SIGILL)) { - if (Signals[i].Action != ACT_SYSTEM) + if (rSignal.Action != ACT_SYSTEM) { - if (Signals[i].Action == ACT_HIDE) + if (rSignal.Action == ACT_HIDE) { struct sigaction ign; @@ -231,18 +231,18 @@ bool onInitSignal() sigemptyset(&ign.sa_mask); struct sigaction oact; - if (sigaction(Signals[i].Signal, &ign, &oact) == 0) - Signals[i].Handler = oact.sa_handler; + if (sigaction(rSignal.Signal, &ign, &oact) == 0) + rSignal.Handler = oact.sa_handler; else - Signals[i].Handler = SIG_DFL; + rSignal.Handler = SIG_DFL; } else { struct sigaction oact; - if (sigaction(Signals[i].Signal, &act, &oact) == 0) - Signals[i].Handler = oact.sa_handler; + if (sigaction(rSignal.Signal, &act, &oact) == 0) + rSignal.Handler = oact.sa_handler; else - Signals[i].Handler = SIG_DFL; + rSignal.Handler = SIG_DFL; } } } diff --git a/sal/rtl/hash.cxx b/sal/rtl/hash.cxx index 9df367f25f7d..110283c3472b 100644 --- a/sal/rtl/hash.cxx +++ b/sal/rtl/hash.cxx @@ -58,10 +58,10 @@ getNextSize (sal_uInt32 nSize) 2097143, 4194301, 8388593, 16777213, 33554393, 67108859, 134217689 }; - for (sal_uInt32 i = 0; i < SAL_N_ELEMENTS(nPrimes); i++) + for (sal_uInt32 nPrime : nPrimes) { - if (nPrimes[i] > nSize) - return nPrimes[i]; + if (nPrime > nSize) + return nPrime; } return nSize * 2; } |