Skip to content

Commit f6d81b5

Browse files
author
Arto Kinnunen
committed
Review corrections
-Fix GCC warning "missing braces around initializer" -Fix GCC warning "defined but not used " functions
1 parent 7487ca1 commit f6d81b5

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

source/6LoWPAN/Thread/thread_extension_bbr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ static int thread_extension_bbr_dua_cb(int8_t service_id, uint8_t source_address
10001000
typedef struct {
10011001
uint8_t addr[16];
10021002
} multicast_addr_t;
1003-
static multicast_addr_t multicast_store[MULTICAST_ADDRESS_STORE_AMOUNT] = {{0}};
1003+
static multicast_addr_t multicast_store[MULTICAST_ADDRESS_STORE_AMOUNT] = {{{0}}};
10041004

10051005
static void thread_border_router_multicast_store_add(thread_pbbr_t *this, uint8_t *destination_addr_ptr)
10061006
{

source/Security/protocols/tls_sec_prot/tls_sec_prot_lib.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ static void tls_sec_prot_lib_debug(void *ctx, int level, const char *file, int l
9797
#endif
9898

9999
#ifdef MBEDTLS_PLATFORM_MEMORY
100+
// Disable for now
101+
//#define TLS_SEC_PROT_LIB_USE_MBEDTLS_PLATFORM_MEMORY
102+
#endif
103+
104+
#ifdef TLS_SEC_PROT_LIB_USE_MBEDTLS_PLATFORM_MEMORY
100105
static void *tls_sec_prot_lib_mem_calloc(size_t count, size_t size);
101106
static void tls_sec_prot_lib_mem_free(void *ptr);
102107
#endif
@@ -105,9 +110,8 @@ int8_t tls_sec_prot_lib_init(tls_security_t *sec)
105110
{
106111
const char *pers = "ws_tls";
107112

108-
#ifdef MBEDTLS_PLATFORM_MEMORY
109-
// Disable for now
110-
//mbedtls_platform_set_calloc_free(tls_sec_prot_lib_mem_calloc, tls_sec_prot_lib_mem_free);
113+
#ifdef TLS_SEC_PROT_LIB_USE_MBEDTLS_PLATFORM_MEMORY
114+
mbedtls_platform_set_calloc_free(tls_sec_prot_lib_mem_calloc, tls_sec_prot_lib_mem_free);
111115
#endif
112116

113117

@@ -497,7 +501,7 @@ static int tls_sec_lib_entropy_poll(void *ctx, unsigned char *output, size_t len
497501
return (0);
498502
}
499503

500-
#ifdef MBEDTLS_PLATFORM_MEMORY
504+
#ifdef TLS_SEC_PROT_LIB_USE_MBEDTLS_PLATFORM_MEMORY
501505
static void *tls_sec_prot_lib_mem_calloc(size_t count, size_t size)
502506
{
503507
void *mem_ptr = ns_dyn_mem_temporary_alloc(count * size);

0 commit comments

Comments
 (0)