summaryrefslogtreecommitdiffstats
path: root/ipmisensor.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-10-13 10:06:13 -0700
committerPatrick Venture <venture@google.com>2018-10-17 22:45:46 +0000
commitd99148b3a0e72775ec217ff4060e3021c50299c3 (patch)
tree56cd6ea977fdc7877d3beaf2c11b4a9e97898b0b /ipmisensor.cpp
parent4d1a5dd4a55b8886ce8fc7512578ba3438faf386 (diff)
downloadphosphor-host-ipmid-d99148b3a0e72775ec217ff4060e3021c50299c3.zip
phosphor-host-ipmid-d99148b3a0e72775ec217ff4060e3021c50299c3.tar.gz
cleanup: c-style casting
[ipmisensor.cpp:308]: (style) C-style pointer casting [sensorhandler.cpp:302]: (style) C-style pointer casting [sensorhandler.cpp:376]: (style) C-style pointer casting [sensorhandler.cpp:404]: (style) C-style pointer casting [sensorhandler.cpp:405]: (style) C-style pointer casting [storageaddsel.cpp:157]: (style) C-style pointer casting [storageaddsel.cpp:187]: (style) C-style pointer casting Added missing const in reportSensorEventAssert and reportSensorEventDeassert as the *pTable->func(...) take the const pointer and the casting then was using the proper const casting. Change-Id: I54a591b4e5e678b8ec3cae2633617a5f7aac7a66 Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'ipmisensor.cpp')
-rw-r--r--ipmisensor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipmisensor.cpp b/ipmisensor.cpp
index 9e88987..5a629a8 100644
--- a/ipmisensor.cpp
+++ b/ipmisensor.cpp
@@ -249,12 +249,12 @@ lookup_t g_ipmidbuslookup[] = {
{0xCA, 0x01, set_sensor_dbus_state_simple, "setValue", "Enabled", ""},
{0xFF, 0xFF, NULL, "", "", ""}};
-void reportSensorEventAssert(sensorRES_t* pRec, int index)
+void reportSensorEventAssert(const sensorRES_t* pRec, int index)
{
lookup_t* pTable = &g_ipmidbuslookup[index];
(*pTable->func)(pRec, pTable, pTable->assertion);
}
-void reportSensorEventDeassert(sensorRES_t* pRec, int index)
+void reportSensorEventDeassert(const sensorRES_t* pRec, int index)
{
lookup_t* pTable = &g_ipmidbuslookup[index];
(*pTable->func)(pRec, pTable, pTable->deassertion);
@@ -305,7 +305,7 @@ bool shouldReport(uint8_t sensorType, int offset, int* index)
int updateSensorRecordFromSSRAESC(const void* record)
{
- sensorRES_t* pRec = (sensorRES_t*)record;
+ auto pRec = static_cast<const sensorRES_t*>(record);
uint8_t stype;
int index, i = 0;
OpenPOWER on IntegriCloud