From 77209c6e150b02ff6d21088d8edd028873fe5c32 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Mon, 16 Feb 2015 13:42:29 +0100 Subject: [PATCH] Contiki: Removed size from coap_address_t --- address.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/address.h b/address.h index f481270e..f08b4852 100644 --- a/address.h +++ b/address.h @@ -61,14 +61,12 @@ typedef struct coap_address_t { #include "uip.h" typedef struct coap_address_t { - unsigned char size; uip_ipaddr_t addr; unsigned short port; } coap_address_t; #define _coap_address_equals_impl(A,B) \ - ((A)->size == (B)->size \ - && (A)->port == (B)->port \ + ((A)->port == (B)->port \ && uip_ipaddr_cmp(&((A)->addr),&((B)->addr))) /** @todo implementation of _coap_address_isany_impl() for Contiki */ @@ -156,8 +154,8 @@ 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 */ +#ifdef WITH_POSIX + /* lwip and Contiki have constant address sizes and doesn't need the .size part */ addr->size = sizeof(addr->addr); #endif }