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:
parent
3896930be6
commit
cc3290afc8
1 changed files with 2 additions and 0 deletions
|
@ -126,6 +126,7 @@ char *lwm2m_sprint_ip_addr(const struct sockaddr *addr)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_SYS_LOG_LWM2M_LEVEL > 3
|
||||||
static char *sprint_token(const u8_t *token, u8_t tkl)
|
static char *sprint_token(const u8_t *token, u8_t tkl)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -138,6 +139,7 @@ static char *sprint_token(const u8_t *token, u8_t tkl)
|
||||||
buf[pos] = '\0';
|
buf[pos] = '\0';
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* observer functions */
|
/* observer functions */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue