logging: Do not check pointers when strings are stripped

When logging strings are stripped from the binary prevent
performing check of pointers which requires access to the
string.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2023-10-30 09:09:28 +01:00 committed by Carles Cufí
parent 0ca5fdc6e8
commit 01cf78ad39

View file

@ -236,7 +236,8 @@ void z_impl_z_log_msg_static_create(const void *source,
if (inlen > 0) {
uint32_t flags = CBPRINTF_PACKAGE_CONVERT_RW_STR |
CBPRINTF_PACKAGE_CONVERT_PTR_CHECK;
(IS_ENABLED(CONFIG_LOG_FMT_SECTION_STRIP) ?
0 : CBPRINTF_PACKAGE_CONVERT_PTR_CHECK);
uint16_t strl[4];
int len;