nvmesensor: Make bus and address private variables
It is recommended to make the bus and address as const variables to
prevent it from being edited in code.
Tested: Manually by verifying that the behavior remains the same, and
that the bus and address gotten from Entity Manager configuration is
used by the binary.
Change-Id: Ib69e8d7e68f433064504f2502ce79c4e5c234f3e
Signed-off-by: Nnamdi Ajah <nnamdi@cloudflare.com>
diff --git a/src/NVMeSensor.hpp b/src/NVMeSensor.hpp
index 5d89d6a..7f2f114 100644
--- a/src/NVMeSensor.hpp
+++ b/src/NVMeSensor.hpp
@@ -21,8 +21,8 @@
bool sample();
- int bus;
- uint8_t address;
+ const int bus;
+ const uint8_t address;
private:
const unsigned int scanDelayTicks = 5 * 60;