From 391f33039f7bc22e61fbcd2ebada31a6cb4a8ec6 Mon Sep 17 00:00:00 2001 From: Emily Shaffer Date: Mon, 3 Apr 2017 10:27:08 -0700 Subject: sensorhandler: Refactor find_sensor to eliminate redundant call find_openbmc_path was being called within find_sensor as well as following find_sensor Change-Id: Ie94eab7afbe34f214a07bda49bfbce729b20f237 Signed-off-by: Emily Shaffer --- ipmisensor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipmisensor.cpp') diff --git a/ipmisensor.cpp b/ipmisensor.cpp index f39832f..10a0ec6 100644 --- a/ipmisensor.cpp +++ b/ipmisensor.cpp @@ -4,7 +4,7 @@ #include #include "sensorhandler.h" -extern uint8_t find_sensor(uint8_t); +extern uint8_t find_type_for_sensor_number(uint8_t); struct sensorRES_t { @@ -261,7 +261,7 @@ int updateSensorRecordFromSSRAESC(const void *record) { uint8_t stype; int index, i=0; - stype = find_sensor(pRec->sensor_number); + stype = find_type_for_sensor_number(pRec->sensor_number); // 0xC3 types use the assertion7_0 for the value to be set // so skip the reseach and call the correct event reporting -- cgit v1.2.1