From a3653aa389464d4fc62e371f9ac1f41c37e66492 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Tue, 17 Feb 2015 16:03:35 +0100 Subject: [PATCH] Removed internal function check_opt_size() that is not used anymore --- net.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/net.c b/net.c index 328dba63..ead7706f 100644 --- a/net.c +++ b/net.c @@ -723,20 +723,6 @@ coap_retransmit(coap_context_t *context, coap_queue_t *node) { return COAP_INVALID_TID; } -/** - * Checks if @p opt fits into the message that ends with @p maxpos. - * This function returns @c 1 on success, or @c 0 if the option @p opt - * would exceed @p maxpos. - */ -static inline int -check_opt_size(coap_opt_t *opt, unsigned char *maxpos) { - if (opt && opt < maxpos) { - if (((*opt & 0x0f) < 0x0f) || (opt + 1 < maxpos)) - return opt + COAP_OPT_SIZE(opt) < maxpos; - } - return 0; -} - void coap_dispatch(coap_context_t *context, coap_queue_t *rcvd); int