lib: os: cbprintf: Fix Z_C_GENERIC not being used
Due to the fact that define was created after including cbprintf_internal.h, it was not used there. Change the order and fix the issue that was revealed. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
7e125fe7e4
commit
d82e31f903
2 changed files with 4 additions and 2 deletions
|
@ -11,7 +11,6 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <sys/cbprintf_internal.h>
|
|
||||||
|
|
||||||
#ifdef CONFIG_CBPRINTF_LIBC_SUBSTS
|
#ifdef CONFIG_CBPRINTF_LIBC_SUBSTS
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -36,6 +35,9 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Z_C_GENERIC is used there */
|
||||||
|
#include <sys/cbprintf_internal.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup cbprintf_apis Formatted Output APIs
|
* @defgroup cbprintf_apis Formatted Output APIs
|
||||||
* @ingroup support_apis
|
* @ingroup support_apis
|
||||||
|
|
|
@ -242,7 +242,7 @@ do { \
|
||||||
"Buffer must be aligned."); \
|
"Buffer must be aligned."); \
|
||||||
} \
|
} \
|
||||||
uint8_t *_pbuf = buf; \
|
uint8_t *_pbuf = buf; \
|
||||||
size_t _pmax = (buf != NULL) ? *_inlen : SIZE_MAX; \
|
size_t _pmax = (buf != NULL) ? _inlen : SIZE_MAX; \
|
||||||
size_t _pkg_len = 0; \
|
size_t _pkg_len = 0; \
|
||||||
union z_cbprintf_hdr *_len_loc; \
|
union z_cbprintf_hdr *_len_loc; \
|
||||||
/* package starts with string address and field with length */ \
|
/* package starts with string address and field with length */ \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue