From 73c48595b7b3839429eeaaca24689e998df1860b Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Tue, 8 Nov 2022 11:15:22 +0100 Subject: [PATCH] [cli] fix `printf` style output (#8377) When `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled. --- src/cli/cli.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 73b70480b..6fae533b2 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -4620,7 +4620,7 @@ template <> otError Interpreter::Process(Arg aArgs[]) if (aArgs[0].IsEmpty()) { - OutputLine("0x%04x", otThreadGetPskcRef(GetInstancePtr())); + OutputLine("0x%08lx", ToUlong(otThreadGetPskcRef(GetInstancePtr()))); } else { @@ -5040,7 +5040,7 @@ template <> otError Interpreter::Process(Arg aArgs[]) if (aArgs[0].IsEmpty()) { - OutputLine("0x%04x", otThreadGetNetworkKeyRef(GetInstancePtr())); + OutputLine("0x%08lx", ToUlong(otThreadGetNetworkKeyRef(GetInstancePtr()))); } else {