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:
parent
a57dbb15db
commit
effb76c61e
2 changed files with 13 additions and 14 deletions
|
@ -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
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue