diff --git a/services/include/apn_manager/apn_item.h b/services/include/apn_manager/apn_item.h index 522d5f3b60c5e83b4fe9e56847a2a93923974d12..4b0bc1e63e47c9715a9aeca1fbb5cfe9cedb33b1 100644 --- a/services/include/apn_manager/apn_item.h +++ b/services/include/apn_manager/apn_item.h @@ -41,16 +41,16 @@ public: public: constexpr static int ALL_APN_ITEM_CHAR_LENGTH = 256; struct attribute { - char types_[ALL_APN_ITEM_CHAR_LENGTH]; - char numeric_[ALL_APN_ITEM_CHAR_LENGTH]; - int32_t profileId_; - char protocol_[ALL_APN_ITEM_CHAR_LENGTH]; - char roamingProtocol_[ALL_APN_ITEM_CHAR_LENGTH]; - int32_t authType_; - char apn_[ALL_APN_ITEM_CHAR_LENGTH]; - char apnName_[ALL_APN_ITEM_CHAR_LENGTH]; - char user_[ALL_APN_ITEM_CHAR_LENGTH]; - char password_[ALL_APN_ITEM_CHAR_LENGTH]; + char types_[ALL_APN_ITEM_CHAR_LENGTH] = { 0 }; + char numeric_[ALL_APN_ITEM_CHAR_LENGTH] = { 0 }; + int32_t profileId_ = 0; + char protocol_[ALL_APN_ITEM_CHAR_LENGTH] = { 0 }; + char roamingProtocol_[ALL_APN_ITEM_CHAR_LENGTH] = { 0 }; + int32_t authType_ = 0; + char apn_[ALL_APN_ITEM_CHAR_LENGTH] = { 0 }; + char apnName_[ALL_APN_ITEM_CHAR_LENGTH] = { 0 }; + char user_[ALL_APN_ITEM_CHAR_LENGTH] = { 0 }; + char password_[ALL_APN_ITEM_CHAR_LENGTH] = { 0 }; } attr_; private: diff --git a/services/include/common/cellular_data_constant.h b/services/include/common/cellular_data_constant.h index 4ba064331283b4e06457544d5fb5cb06f3c2cea2..504eb892b1ea3dc37930146ea63fe7d055900153 100644 --- a/services/include/common/cellular_data_constant.h +++ b/services/include/common/cellular_data_constant.h @@ -41,27 +41,27 @@ enum class RecoveryState : int32_t { }; struct AddressInfo { - std::string ip; - std::string netMask; - uint8_t type; - uint8_t prefixLen; + std::string ip = ""; + std::string netMask = ""; + uint8_t type = 0; + uint8_t prefixLen = 0; }; struct RouteInfo { - std::string ip; - uint8_t type; - std::string destination; + std::string ip = ""; + uint8_t type = 0; + std::string destination = ""; }; struct NetSupplier { - uint32_t supplierId; - uint64_t capability; - int32_t slotId; + uint32_t supplierId = 0; + uint64_t capability = 0; + int32_t slotId = 0; }; struct NetRequest { - uint64_t capability; - std::string ident; + uint64_t capability = 0; + std::string ident = ""; }; static const uint32_t DEFAULT_BANDWIDTH = 14;