Skip to content

Commit a4bba64

Browse files
committed
bluetooth: controller: Use %zu format specifier for size_t vars
The "z" format specifier was added in C99 to be used for size types. Signed-off-by: Rubin Gerritsen <[email protected]>
1 parent e40e91f commit a4bba64

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

subsys/bluetooth/controller/hci_driver.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ static int data_packet_process(const struct device *dev, uint8_t *hci_buf)
486486
bc = bt_acl_flags_bc(flags);
487487

488488
if (len + sizeof(*hdr) > HCI_RX_BUF_SIZE) {
489-
LOG_ERR("Event buffer too small. %u > %u",
489+
LOG_ERR("Event buffer too small. %zu > %u",
490490
len + sizeof(*hdr),
491491
HCI_RX_BUF_SIZE);
492492
return -ENOMEM;
@@ -517,7 +517,7 @@ static int iso_data_packet_process(const struct device *dev, uint8_t *hci_buf)
517517
}
518518

519519
if (len + sizeof(*hdr) > HCI_RX_BUF_SIZE) {
520-
LOG_ERR("Event buffer too small. %u > %u",
520+
LOG_ERR("Event buffer too small. %zu > %u",
521521
len + sizeof(*hdr),
522522
HCI_RX_BUF_SIZE);
523523
return -ENOMEM;
@@ -583,7 +583,7 @@ static int event_packet_process(const struct device *dev, uint8_t *hci_buf)
583583
struct net_buf *evt_buf;
584584

585585
if (hdr->len + sizeof(*hdr) > HCI_RX_BUF_SIZE) {
586-
LOG_ERR("Event buffer too small. %u > %u",
586+
LOG_ERR("Event buffer too small. %zu > %u",
587587
hdr->len + sizeof(*hdr),
588588
HCI_RX_BUF_SIZE);
589589
return -ENOMEM;
@@ -1351,11 +1351,11 @@ static int configure_memory_usage(void)
13511351
}
13521352
#endif
13531353

1354-
LOG_DBG("BT mempool size: %u, required: %u",
1354+
LOG_DBG("BT mempool size: %zu, required: %u",
13551355
sizeof(sdc_mempool), required_memory);
13561356

13571357
if (required_memory > sizeof(sdc_mempool)) {
1358-
LOG_ERR("Allocated memory too low: %u < %u",
1358+
LOG_ERR("Allocated memory too low: %zu < %u",
13591359
sizeof(sdc_mempool), required_memory);
13601360
k_panic();
13611361
/* No return from k_panic(). */

0 commit comments

Comments
 (0)