From aae30614d6efec7e7c7aea61845b06e9b583087d Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Fri, 14 Jan 2022 07:54:49 -0800 Subject: [PATCH] VtsAidlHalSensorsTargetTest: Fix assignment To make this assignment have an impact outside the function, we need to assign to the dereference of the pointer. Test: TreeHugger Bug: 195593357 Change-Id: I3541735574d6ebe2f2620c2bc5fbf5dd7d97cd91 --- sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp b/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp index 608a4b0c4c..1bc7263048 100644 --- a/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp +++ b/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp @@ -978,7 +978,7 @@ void SensorsAidlTest::verifyRegisterDirectChannel( ASSERT_EQ(status.getExceptionCode(), error); ASSERT_EQ(channelHandle, -1); } - directChannelHandle = &channelHandle; + *directChannelHandle = channelHandle; } void SensorsAidlTest::verifyUnregisterDirectChannel(int32_t* channelHandle,