Loading services/audioflinger/FastThread.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -309,7 +309,7 @@ bool FastThread::threadLoop() // compute the delta value of clock_gettime(CLOCK_MONOTONIC) // compute the delta value of clock_gettime(CLOCK_MONOTONIC) uint32_t monotonicNs = nsec; uint32_t monotonicNs = nsec; if (sec > 0 && sec < 4) { if (sec > 0 && sec < 4) { monotonicNs += sec * 1000000000; monotonicNs += sec * 1000000000U; // unsigned to prevent signed overflow. } } // compute raw CPU load = delta value of clock_gettime(CLOCK_THREAD_CPUTIME_ID) // compute raw CPU load = delta value of clock_gettime(CLOCK_THREAD_CPUTIME_ID) uint32_t loadNs = 0; uint32_t loadNs = 0; Loading @@ -325,7 +325,7 @@ bool FastThread::threadLoop() } } loadNs = nsec; loadNs = nsec; if (sec > 0 && sec < 4) { if (sec > 0 && sec < 4) { loadNs += sec * 1000000000; loadNs += sec * 1000000000U; // unsigned to prevent signed overflow. } } } else { } else { // first time through the loop // first time through the loop Loading Loading
services/audioflinger/FastThread.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -309,7 +309,7 @@ bool FastThread::threadLoop() // compute the delta value of clock_gettime(CLOCK_MONOTONIC) // compute the delta value of clock_gettime(CLOCK_MONOTONIC) uint32_t monotonicNs = nsec; uint32_t monotonicNs = nsec; if (sec > 0 && sec < 4) { if (sec > 0 && sec < 4) { monotonicNs += sec * 1000000000; monotonicNs += sec * 1000000000U; // unsigned to prevent signed overflow. } } // compute raw CPU load = delta value of clock_gettime(CLOCK_THREAD_CPUTIME_ID) // compute raw CPU load = delta value of clock_gettime(CLOCK_THREAD_CPUTIME_ID) uint32_t loadNs = 0; uint32_t loadNs = 0; Loading @@ -325,7 +325,7 @@ bool FastThread::threadLoop() } } loadNs = nsec; loadNs = nsec; if (sec > 0 && sec < 4) { if (sec > 0 && sec < 4) { loadNs += sec * 1000000000; loadNs += sec * 1000000000U; // unsigned to prevent signed overflow. } } } else { } else { // first time through the loop // first time through the loop Loading