diff --git a/net.h b/net.h index 2f0a557d..75ae58c0 100644 --- a/net.h +++ b/net.h @@ -168,7 +168,7 @@ coap_context_t *coap_new_context(const coap_address_t *listen_addr); static inline unsigned short coap_new_message_id(coap_context_t *context) { #ifndef WITH_CONTIKI - return htons(++context->message_id); + return htons(++(context->message_id)); #else /* WITH_CONTIKI */ return uip_htons(++context->message_id); #endif