diff options
author | Patrick Venture <venture@google.com> | 2018-10-13 13:00:42 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-10-31 01:46:08 +0000 |
commit | 4491a46fb05d1d9c90fed3452157645b339b9dab (patch) | |
tree | c1f49a319df811b5f4bfd7b582f1f53186f53b7f /sensorhandler.cpp | |
parent | 85f9819177505a6930be1443d755eaf2f7cfaf2e (diff) | |
download | phosphor-host-ipmid-4491a46fb05d1d9c90fed3452157645b339b9dab.tar.gz phosphor-host-ipmid-4491a46fb05d1d9c90fed3452157645b339b9dab.zip |
cleanup: scope reduction
[app/channel.cpp:102]: (style) The scope of the variable 'resp' can be reduced.
[ipmisensor.cpp:310]: (style) The scope of the variable 'i' can be reduced.
[ipmid.cpp:506]: (style) The scope of the variable 'num_handlers' can be reduced.
[read_fru_data.cpp:82]: (style) The scope of the variable 'fruId' can be reduced.
[sensorhandler.cpp:256]: (style) The scope of the variable 'p' can be reduced.
[storageaddsel.cpp:68]: (style) The scope of the variable 'p' can be reduced.
Also delete two extra vertical lines.
Change-Id: I8e72f8e1d94381f456674abf523d2f2fbdd8046d
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'sensorhandler.cpp')
-rw-r--r-- | sensorhandler.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sensorhandler.cpp b/sensorhandler.cpp index dca9765..1058230 100644 --- a/sensorhandler.cpp +++ b/sensorhandler.cpp @@ -256,7 +256,6 @@ uint8_t dbus_to_sensor_type(char* p) uint8_t get_type_from_interface(dbus_interface_t dbus_if) { - char* p; uint8_t type; // This is where sensors that do not exist in dbus but do @@ -275,7 +274,7 @@ uint8_t get_type_from_interface(dbus_interface_t dbus_if) else { // Non InventoryItems - p = strrchr(dbus_if.path, '/'); + char* p = strrchr(dbus_if.path, '/'); type = dbus_to_sensor_type(p + 1); } |