net: lwm2m: build sprint_token only when debug is enabled

sprint_token is only used by SYS_LOG_DBG, so only build it when
CONFIG_SYS_LOG_LWM2M_LEVEL > 3.

Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
This commit is contained in:
Ricardo Salveti 2017-08-02 17:23:28 -03:00 committed by Jukka Rissanen
commit cc3290afc8

View file

@ -126,6 +126,7 @@ char *lwm2m_sprint_ip_addr(const struct sockaddr *addr)
return NULL;
}
#if CONFIG_SYS_LOG_LWM2M_LEVEL > 3
static char *sprint_token(const u8_t *token, u8_t tkl)
{
int i;
@ -138,6 +139,7 @@ static char *sprint_token(const u8_t *token, u8_t tkl)
buf[pos] = '\0';
return buf;
}
#endif
/* observer functions */