diff options
author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-02-11 01:44:13 -0600 |
---|---|---|
committer | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-02-14 13:00:19 -0600 |
commit | 5caa89504b33cda1feae1cac9af209a782a02693 (patch) | |
tree | 1541531588e56ee17c7bd295478d6109c509a416 | |
parent | 0fc20ed1a596cec22b3a5f5f5a44ee288fb7dd24 (diff) | |
download | ipmi-fru-parser-5caa89504b33cda1feae1cac9af209a782a02693.tar.gz ipmi-fru-parser-5caa89504b33cda1feae1cac9af209a782a02693.zip |
Initialise members of class ipmi_fru
The class ipmi_fru has a disabled default ctor, and the custom one
doesn't initialise all class members. Fix this issue.
Change-Id: I9a0364743ba5afe41a319f9091fd8b0bd85f1777
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
-rw-r--r-- | fru-area.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fru-area.hpp b/fru-area.hpp index cc18178..d040a9c 100644 --- a/fru-area.hpp +++ b/fru-area.hpp @@ -17,28 +17,28 @@ class ipmi_fru { private: // Unique way of identifying a FRU - uint8_t iv_fruid; + uint8_t iv_fruid = 0; // Type of the fru matching offsets in common header - ipmi_fru_area_type iv_type; + ipmi_fru_area_type iv_type = IPMI_FRU_AREA_INTERNAL_USE; // Name of the fru area. ( BOARD/CHASSIS/PRODUCT ) std::string iv_name; // Length of a specific fru area. - size_t iv_len; + size_t iv_len = 0; // Special bit for BMC readable eeprom only. - bool iv_bmc_fru; + bool iv_bmc_fru = false; // If a FRU is physically present. - bool iv_present; + bool iv_present = false; // Whether a particular area is valid ? - bool iv_valid; + bool iv_valid = false; // Actual area data. - uint8_t *iv_data; + uint8_t *iv_data = nullptr; // fru inventory dbus name std::string iv_bus_name; @@ -50,7 +50,7 @@ class ipmi_fru std::string iv_intf_name; // sd_bus handle - sd_bus *iv_bus_type; + sd_bus *iv_bus_type = nullptr; // Default constructor disabled. ipmi_fru(); |