From 5f956cfe95a3a3a9da233125958d22d142b99c96 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Wed, 21 Oct 2020 12:06:00 -0700 Subject: [PATCH] [notifier] define 'kEventStrings[]' as const pointer (#5673) --- src/core/common/notifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/common/notifier.cpp b/src/core/common/notifier.cpp index e38c4d5db..caf9c606b 100644 --- a/src/core/common/notifier.cpp +++ b/src/core/common/notifier.cpp @@ -239,7 +239,7 @@ const char *Notifier::EventToString(Event aEvent) const // To ensure no clipping of flag names in the logs, the returned // strings from this method should have shorter length than // `kMaxFlagNameLength` value. - static const char *kEventStrings[] = { + static const char *const kEventStrings[] = { "Ip6+", // kEventIp6AddressAdded (1 << 0) "Ip6-", // kEventIp6AddressRemoved (1 << 1) "Role", // kEventThreadRoleChanged (1 << 2)