summaryrefslogtreecommitdiffstats
path: root/ipmisensor.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-09-10 15:53:14 -0700
committerPatrick Venture <venture@google.com>2018-09-25 10:08:28 -0700
commitb51bf9c8815dae7ae3765158df8e69148539182d (patch)
treea7b6f9a7b7a99230ce630222882313e184d2781c /ipmisensor.cpp
parent3a5071a9256ded54366494e161045db73b2d7a92 (diff)
downloadphosphor-host-ipmid-b51bf9c8815dae7ae3765158df8e69148539182d.zip
phosphor-host-ipmid-b51bf9c8815dae7ae3765158df8e69148539182d.tar.gz
add std namespace prefix to common methods
Standard clib methods should be explicitly grabbed from the standard namespace. Change-Id: I8bcfcb260a99180d535ec8102c1a24c318cbc209 Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'ipmisensor.cpp')
-rw-r--r--ipmisensor.cpp46
1 files changed, 26 insertions, 20 deletions
diff --git a/ipmisensor.cpp b/ipmisensor.cpp
index 8891cdb..9e88987 100644
--- a/ipmisensor.cpp
+++ b/ipmisensor.cpp
@@ -123,22 +123,26 @@ int set_sensor_dbus_state_fwprogress(const sensorRES_t* pRec,
{
case 0x00:
- snprintf(p, sizeof(valuestring), "POST Error, %s",
- event_data_lookup(g_fwprogress00h, pRec->event_data2));
+ std::snprintf(
+ p, sizeof(valuestring), "POST Error, %s",
+ event_data_lookup(g_fwprogress00h, pRec->event_data2));
break;
case 0x01: /* Using g_fwprogress02h for 0x01 because that's what the
ipmi spec says to do */
- snprintf(p, sizeof(valuestring), "FW Hang, %s",
- event_data_lookup(g_fwprogress02h, pRec->event_data2));
+ std::snprintf(
+ p, sizeof(valuestring), "FW Hang, %s",
+ event_data_lookup(g_fwprogress02h, pRec->event_data2));
break;
case 0x02:
- snprintf(p, sizeof(valuestring), "FW Progress, %s",
- event_data_lookup(g_fwprogress02h, pRec->event_data2));
+ std::snprintf(
+ p, sizeof(valuestring), "FW Progress, %s",
+ event_data_lookup(g_fwprogress02h, pRec->event_data2));
break;
default:
- snprintf(p, sizeof(valuestring),
- "Internal warning, fw_progres offset unknown (0x%02x)",
- pTable->offset);
+ std::snprintf(
+ p, sizeof(valuestring),
+ "Internal warning, fw_progres offset unknown (0x%02x)",
+ pTable->offset);
break;
}
@@ -166,30 +170,32 @@ int set_sensor_dbus_state_system_event(const sensorRES_t* pRec,
{
case 0x00:
- snprintf(p, sizeof(valuestring), "System Reconfigured");
+ std::snprintf(p, sizeof(valuestring), "System Reconfigured");
break;
case 0x01:
- snprintf(p, sizeof(valuestring), "OEM Boot Event");
+ std::snprintf(p, sizeof(valuestring), "OEM Boot Event");
break;
case 0x02:
- snprintf(p, sizeof(valuestring),
- "Undetermined System Hardware Failure");
+ std::snprintf(p, sizeof(valuestring),
+ "Undetermined System Hardware Failure");
break;
case 0x03:
- snprintf(p, sizeof(valuestring),
- "System Failure see error log for more details (0x%02x)",
- pRec->event_data2);
+ std::snprintf(
+ p, sizeof(valuestring),
+ "System Failure see error log for more details (0x%02x)",
+ pRec->event_data2);
break;
case 0x04:
- snprintf(
+ std::snprintf(
p, sizeof(valuestring),
"System Failure see PEF error log for more details (0x%02x)",
pRec->event_data2);
break;
default:
- snprintf(p, sizeof(valuestring),
- "Internal warning, system_event offset unknown (0x%02x)",
- pTable->offset);
+ std::snprintf(
+ p, sizeof(valuestring),
+ "Internal warning, system_event offset unknown (0x%02x)",
+ pTable->offset);
break;
}
OpenPOWER on IntegriCloud