summaryrefslogtreecommitdiffstats
path: root/ipmid.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-10-13 13:00:42 -0700
committerPatrick Venture <venture@google.com>2018-10-31 01:46:08 +0000
commit4491a46fb05d1d9c90fed3452157645b339b9dab (patch)
treec1f49a319df811b5f4bfd7b582f1f53186f53b7f /ipmid.cpp
parent85f9819177505a6930be1443d755eaf2f7cfaf2e (diff)
downloadphosphor-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 'ipmid.cpp')
-rw-r--r--ipmid.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/ipmid.cpp b/ipmid.cpp
index 2d48bfe..10b41d4 100644
--- a/ipmid.cpp
+++ b/ipmid.cpp
@@ -505,7 +505,6 @@ void ipmi_register_callback_handlers(const char* ipmi_lib_path)
{
// For walking the ipmi_lib_path
struct dirent** handler_list;
- int num_handlers = 0;
// This is used to check and abort if someone tries to register a bad one.
void* lib_handler = NULL;
@@ -528,7 +527,7 @@ void ipmi_register_callback_handlers(const char* ipmi_lib_path)
// already a .so, adding one more is not any harm.
handler_fqdn += "/";
- num_handlers =
+ int num_handlers =
scandir(ipmi_lib_path, &handler_list, handler_select, alphasort);
if (num_handlers < 0)
return;
OpenPOWER on IntegriCloud