Bluetooth: Move re-implementation of snprintk

Move the function in the `subsys/testsuite/ztest/src/ztest_mock.c` files.

This is motivated by the fact that there is others re-implementation of
`*printk` functions using libc counterparts in the `ztest_mock.c` file.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
This commit is contained in:
Théo Battrel 2022-10-28 11:05:01 +02:00 committed by Carles Cufí
commit effb76c61e
2 changed files with 13 additions and 14 deletions

View file

@ -56,6 +56,19 @@ void vprintk(const char *fmt, va_list ap)
{
vprintf(fmt, ap);
}
int snprintk(char *str, size_t size, const char *fmt, ...)
{
va_list ap;
int ret;
va_start(ap, fmt);
ret = snprintf(str, size, fmt, ap);
va_end(ap);
return ret;
}
#else
/*