From 0f2e66866c18ff581fc0e9225bdac67509c68658 Mon Sep 17 00:00:00 2001 From: Keith Mok Date: Mon, 15 Nov 2021 05:50:32 +0000 Subject: [PATCH] Fix nanosleep in BootAnimation clock_nanosleep will return 0 or error no directly. Bug: 207149564 Test: Build ok Change-Id: I15866728719d0672a16b4a76a8fd3be4d53d420a --- cmds/bootanimation/BootAnimation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 3109c5c1e075..6b8a775ef838 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -1348,7 +1348,7 @@ bool BootAnimation::playAnimation(const Animation& animation) { int err; do { err = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &spec, nullptr); - } while (err<0 && errno == EINTR); + } while (err == EINTR); } checkExit();