Bluetooth: Fix left-over printf usage
These should have been converted to using printk instead. Change-Id: I62323704dad4fc51cc14ee4734acb6b325dcda14 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
f85878146a
commit
26056c8318
2 changed files with 6 additions and 4 deletions
|
@ -26,6 +26,7 @@
|
|||
#include <init.h>
|
||||
#include <drivers/console/uart_pipe.h>
|
||||
#include <misc/byteorder.h>
|
||||
#include <misc/printk.h>
|
||||
#include <uart.h>
|
||||
|
||||
#include <bluetooth/buf.h>
|
||||
|
@ -84,7 +85,7 @@ void bt_log(int prio, const char *fmt, ...)
|
|||
int len, key;
|
||||
|
||||
va_start(ap, fmt);
|
||||
len = vsnprintf(NULL, 0, fmt, ap);
|
||||
len = vsnprintk(NULL, 0, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (len < 0) {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <misc/byteorder.h>
|
||||
#include <misc/printk.h>
|
||||
|
||||
#include <bluetooth/uuid.h>
|
||||
|
||||
|
@ -100,10 +101,10 @@ void bt_uuid_to_str(const struct bt_uuid *uuid, char *str, size_t len)
|
|||
|
||||
switch (uuid->type) {
|
||||
case BT_UUID_TYPE_16:
|
||||
snprintf(str, len, "%.4x", BT_UUID_16(uuid)->val);
|
||||
snprintk(str, len, "%.4x", BT_UUID_16(uuid)->val);
|
||||
break;
|
||||
case BT_UUID_TYPE_32:
|
||||
snprintf(str, len, "%.4x", BT_UUID_32(uuid)->val);
|
||||
snprintk(str, len, "%.4x", BT_UUID_32(uuid)->val);
|
||||
break;
|
||||
case BT_UUID_TYPE_128:
|
||||
memcpy(&tmp0, &BT_UUID_128(uuid)->val[0], sizeof(tmp0));
|
||||
|
@ -113,7 +114,7 @@ void bt_uuid_to_str(const struct bt_uuid *uuid, char *str, size_t len)
|
|||
memcpy(&tmp4, &BT_UUID_128(uuid)->val[10], sizeof(tmp4));
|
||||
memcpy(&tmp5, &BT_UUID_128(uuid)->val[12], sizeof(tmp5));
|
||||
|
||||
snprintf(str, len, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x",
|
||||
snprintk(str, len, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x",
|
||||
tmp5, tmp4, tmp3, tmp2, tmp1, tmp0);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue