Use empty string for hidl_string instead of doing memset to 0.
Test: Manual
Bug: 35088270
Change-Id: Idf2f3a0f5a48d28fbd8678b1b7802e69ff52778a
(cherry picked from commit 1764f648a56ab5b71d82a7488f0b9dd0da78cc6c)
diff --git a/libril/ril_service.cpp b/libril/ril_service.cpp
index d01beb0..72b2123 100644
--- a/libril/ril_service.cpp
+++ b/libril/ril_service.cpp
@@ -2462,6 +2462,7 @@
populateResponseInfo(responseInfo, serial, responseType, e);
LastCallFailCauseInfo info;
memset(&info, 0, sizeof(info));
+ info.vendorCause = hidl_string();
if (response == NULL) {
RLOGE("radio::getCurrentCallsResponse Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
@@ -2659,6 +2660,7 @@
RLOGE("Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
memset(&result, 0, sizeof(result));
+ result.ackPDU = hidl_string();
} else {
RIL_SMS_Response *resp = (RIL_SMS_Response *) response;
result.messageRef = resp->messageRef;
@@ -2717,8 +2719,7 @@
RLOGE("Invalid response: NULL");
if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
memset(&result, 0, sizeof(result));
- hidl_string emptyString;
- result.simResponse = emptyString;
+ result.simResponse = hidl_string();
} else {
RIL_SIM_IO_Response *resp = (RIL_SIM_IO_Response *) response;
result.sw1 = resp->sw1;