NimBLE: Fix misc warnings and return code in ble_hs_tx_data

- Previously `ble_hs_tx_data` returned 0 irrespective of error code returned by
  `ble_hci_trans_hs_acl_tx`.
- Minor changes in `porting/nimble/` and `ble_gattc.c` to remove discard const
  qualifier warnings, fixes #4028.
This commit is contained in:
Prasad Alatkar
2020-08-03 23:37:28 +05:30
parent 71e8f7c20b
commit 75080ea856
6 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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.
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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;