From 0f8e8110b10bc287d54fd608cae65a0b62eb8346 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Mon, 23 Aug 2021 17:32:23 -0700 Subject: BootAnimation: remove superfluous null check for `mAnimation` The null check added in I603da080b1732a436a10dbaca6f2be9f158124dc makes our static analyzer suspect that the call to `playAnimation(*mAnimation)` dereferences null. The beginning of this function establishes a non-null value for `mAnimation`, which is used unconditionally throughout the function. Hence, this condition seems unnecessary. Bug: None Test: TreeHugger Change-Id: I0575df17df7f7e3018d99cafd9dcfcd3c10e5fbc --- cmds/bootanimation/BootAnimation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/bootanimation/BootAnimation.cpp') diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 7c81f0942f78..90a5d49bf56b 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -1339,7 +1339,7 @@ bool BootAnimation::movie() { mTimeCheckThread->run("BootAnimation::TimeCheckThread", PRIORITY_NORMAL); } - if (mAnimation != nullptr && mAnimation->dynamicColoringEnabled) { + if (mAnimation->dynamicColoringEnabled) { initDynamicColors(); } -- cgit v1.2.3-59-g8ed1b