From b26314a7991aaf21caf1982952d44ed8971af95f Mon Sep 17 00:00:00 2001 From: Kimmo Vaisanen Date: Thu, 13 Jun 2019 15:35:37 +0300 Subject: [PATCH] Cellular: Fix PLMN debug trace for IAR IAR does not allow printing from null pointer as parameter for %s. PLMN string can be null depending on user configuration. --- features/cellular/framework/device/CellularStateMachine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/cellular/framework/device/CellularStateMachine.cpp b/features/cellular/framework/device/CellularStateMachine.cpp index be4bd35f4a..deafc391ca 100644 --- a/features/cellular/framework/device/CellularStateMachine.cpp +++ b/features/cellular/framework/device/CellularStateMachine.cpp @@ -167,7 +167,7 @@ bool CellularStateMachine::open_sim() if (sim_ready) { _cb_data.error = _network.set_registration(_plmn); - tr_debug("STM: set_registration: %d, plmn: %s", _cb_data.error, _plmn); + tr_debug("STM: set_registration: %d, plmn: %s", _cb_data.error, _plmn ? _plmn : "NULL"); if (_cb_data.error) { return false; }