logging: Use new cbprintf check for pointers

Cbprintf has new feature where it can distinguish between
character pointers used for %p and %s. It is enabled by
flag CBPRINTF_PACKAGE_CONVERT_PTR_CHECK.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2022-08-26 15:34:00 +02:00 committed by Fabio Baltieri
commit b097f5c5f8

View file

@ -52,7 +52,8 @@ void z_impl_z_log_msg_static_create(const void *source,
struct log_msg *msg;
if (inlen > 0) {
uint32_t flags = CBPRINTF_PACKAGE_CONVERT_RW_STR;
uint32_t flags = CBPRINTF_PACKAGE_CONVERT_RW_STR |
CBPRINTF_PACKAGE_CONVERT_PTR_CHECK;
uint16_t strl[4];
int len;