/* Advances *optp to next option if still in PDU. This function returns the number of bytes opt has been advanced or  */
static size_t next_option_safe(coap_opt_t **optp, size_t *length)
/* Advances *optp to next option if still in PDU. This function returns the number of bytes opt has been advanced or  */
static size_t next_option_safe(coap_opt_t **optp, size_t *length)
{
    assert(optsize <= *length);
    *optp += optsize;
    *length -= optsize;
  }
  return optsize;
}