diff --git a/nimble/host/src/ble_gattc.c b/nimble/host/src/ble_gattc.c index a6ae1470d..c3ff060b0 100644 --- a/nimble/host/src/ble_gattc.c +++ b/nimble/host/src/ble_gattc.c @@ -485,7 +485,7 @@ ble_gattc_dbg_assert_proc_not_inserted(struct ble_gattc_proc *proc) *****************************************************************************/ static void -ble_gattc_log_proc_init(char *name) +ble_gattc_log_proc_init(const char *name) { BLE_HS_LOG(INFO, "GATT procedure initiated: %s", name); } @@ -587,7 +587,7 @@ ble_gattc_log_read_mult(const uint16_t *handles, uint8_t num_handles) static void ble_gattc_log_write(uint16_t att_handle, uint16_t len, int expecting_rsp) { - char *name; + const char *name; if (expecting_rsp) { name = "write; "; diff --git a/nimble/host/src/ble_hs.c b/nimble/host/src/ble_hs.c index d22efe104..4198ef205 100644 --- a/nimble/host/src/ble_hs.c +++ b/nimble/host/src/ble_hs.c @@ -718,8 +718,7 @@ ble_hs_tx_data(struct os_mbuf *om) ble_monitor_send_om(BLE_MONITOR_OPCODE_ACL_TX_PKT, om); #endif - ble_hci_trans_hs_acl_tx(om); - return 0; + return ble_hci_trans_hs_acl_tx(om); } void diff --git a/porting/nimble/include/mem/mem.h b/porting/nimble/include/mem/mem.h index a97e148fa..13a325b5a 100644 --- a/porting/nimble/include/mem/mem.h +++ b/porting/nimble/include/mem/mem.h @@ -42,7 +42,7 @@ int mem_malloc_mbufpkt_pool(struct os_mempool *mempool, void **out_buf); int mem_init_mbuf_pool(void *mem, struct os_mempool *mempool, struct os_mbuf_pool *mbuf_pool, int num_blocks, - int block_size, char *name); + int block_size, const char *name); /** * Specifies a function used as a callback. Functions of this type allocate an diff --git a/porting/nimble/include/os/os_mempool.h b/porting/nimble/include/os/os_mempool.h index 536cc5af6..251858742 100644 --- a/porting/nimble/include/os/os_mempool.h +++ b/porting/nimble/include/os/os_mempool.h @@ -70,7 +70,7 @@ struct os_mempool { STAILQ_ENTRY(os_mempool) mp_list; SLIST_HEAD(,os_memblock); /** Name for memory block */ - char *name; + const char *name; }; /** @@ -171,7 +171,7 @@ typedef uint64_t os_membuf_t; * @return os_error_t */ os_error_t os_mempool_init(struct os_mempool *mp, uint16_t blocks, - uint32_t block_size, void *membuf, char *name); + uint32_t block_size, void *membuf, const char *name); /** * Initializes an extended memory pool. Extended attributes (e.g., callbacks) @@ -187,7 +187,7 @@ os_error_t os_mempool_init(struct os_mempool *mp, uint16_t blocks, * @return os_error_t */ os_error_t os_mempool_ext_init(struct os_mempool_ext *mpe, uint16_t blocks, - uint32_t block_size, void *membuf, char *name); + uint32_t block_size, void *membuf, const char *name); /** * Clears a memory pool. diff --git a/porting/nimble/include/stats/stats.h b/porting/nimble/include/stats/stats.h index 996bcbc72..2669ebe28 100644 --- a/porting/nimble/include/stats/stats.h +++ b/porting/nimble/include/stats/stats.h @@ -67,7 +67,7 @@ stats_register(void *a, void *b) } static inline int -stats_init_and_reg(void *a, uint8_t b, uint8_t c, void *d, uint8_t e, void *f) +stats_init_and_reg(void *a, uint8_t b, uint8_t c, void *d, uint8_t e, const char *f) { /* dummy */ return 0; diff --git a/porting/nimble/src/mem.c b/porting/nimble/src/mem.c index 1fea7df4b..13659c9cf 100644 --- a/porting/nimble/src/mem.c +++ b/porting/nimble/src/mem.c @@ -206,7 +206,7 @@ mem_malloc_mbufpkt_pool(struct os_mempool *mempool, int mem_init_mbuf_pool(void *mem, struct os_mempool *mempool, struct os_mbuf_pool *mbuf_pool, int num_blocks, - int block_size, char *name) + int block_size, const char *name) { int rc; diff --git a/porting/nimble/src/os_mempool.c b/porting/nimble/src/os_mempool.c index a02fd6e6b..f4c712ff1 100644 --- a/porting/nimble/src/os_mempool.c +++ b/porting/nimble/src/os_mempool.c @@ -63,7 +63,7 @@ os_mempool_poison_check(void *start, int sz) os_error_t os_mempool_init(struct os_mempool *mp, uint16_t blocks, uint32_t block_size, - void *membuf, char *name) + void *membuf, const char *name) { int true_block_size; uint8_t *block_addr; @@ -120,7 +120,7 @@ os_mempool_init(struct os_mempool *mp, uint16_t blocks, uint32_t block_size, os_error_t os_mempool_ext_init(struct os_mempool_ext *mpe, uint16_t blocks, - uint32_t block_size, void *membuf, char *name) + uint32_t block_size, void *membuf, const char *name) { int rc; diff --git a/porting/nimble/src/os_msys_init.c b/porting/nimble/src/os_msys_init.c index 4d42d184a..02c202623 100644 --- a/porting/nimble/src/os_msys_init.c +++ b/porting/nimble/src/os_msys_init.c @@ -46,7 +46,7 @@ static struct os_mempool os_msys_init_2_mempool; static void os_msys_init_once(void *data, struct os_mempool *mempool, struct os_mbuf_pool *mbuf_pool, - int block_count, int block_size, char *name) + int block_count, int block_size, const char *name) { int rc;