mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-30 10:17:08 +03:00
lwip address fields are constant sized
This commit is contained in:
1 parent
c65b384ff1
commit
6498b01552
1 file changed
+3
-1
@@ -39,7 +39,6 @@
|
||||
#include <lwip/ip_addr.h>
|
||||
|
||||
typedef struct __coap_address_t {
|
||||
unsigned char size;
|
||||
uint16_t port;
|
||||
ip_addr_t addr;
|
||||
} __coap_address_t;
|
||||
@@ -140,7 +139,10 @@ static inline void
|
||||
coap_address_init(coap_address_t *addr) {
|
||||
assert(addr);
|
||||
memset(addr, 0, sizeof(coap_address_t));
|
||||
#ifndef WITH_LWIP
|
||||
/* lwip has constandt address sizes and doesn't need the .size part */
|
||||
addr->size = sizeof(addr->addr);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user