sys/net/sock/sock_util: use MODULE_FMT instead of RIOT_VERSION

sock_util used ot check RIOT_VERSION for selecting fmt functions.
RIOT's Makefile.dep sets fmt as a dependency for sock_util,
so the usual MODULE_FMT can be used.

One special case less.
This commit is contained in:
Kaspar Schleiser 2020-02-28 12:11:53 +01:00
parent 23c5d34284
commit ddee330bbd

View File

@ -29,7 +29,7 @@
#include "net/sock/udp.h" #include "net/sock/udp.h"
#include "net/sock/util.h" #include "net/sock/util.h"
#ifdef RIOT_VERSION #ifdef MODULE_FMT
#include "fmt.h" #include "fmt.h"
#endif #endif
@ -63,7 +63,7 @@ int sock_udp_ep_fmt(const sock_udp_ep_t *endpoint, char *addr_str, uint16_t *por
#if defined(SOCK_HAS_IPV6) #if defined(SOCK_HAS_IPV6)
if ((endpoint->family == AF_INET6) && endpoint->netif) { if ((endpoint->family == AF_INET6) && endpoint->netif) {
#ifdef RIOT_VERSION #ifdef MODULE_FMT
char *tmp = addr_str + strlen(addr_str); char *tmp = addr_str + strlen(addr_str);
*tmp++ = '%'; *tmp++ = '%';
tmp += fmt_u16_dec(tmp, endpoint->netif); tmp += fmt_u16_dec(tmp, endpoint->netif);