Use static inline for iface_{setup,delete}_addr in tests/sys/net/routing.

This fixes possible link errors, similar to:

ld: error: undefined symbol: iface_setup_addr
>>> referenced by test_rtsock_l3.c:111 (tests/sys/net/routing/test_rtsock_l3.c:111)
>>>               test_rtsock_l3.o:(presetup_ipv4)
>>> referenced by test_rtsock_l3.c:79 (tests/sys/net/routing/test_rtsock_l3.c:79)
>>>               test_rtsock_l3.o:(presetup_ipv6)
>>> referenced by test_rtsock_l3.c:512 (tests/sys/net/routing/test_rtsock_l3.c:512)
>>>               test_rtsock_l3.o:(atfu_rtm_change_v4_gw_success_body)
>>> referenced 10 more times

In C (not C++), 'naked' inline is almost always a mistake. Either use
static inline (this is appropriate for most cases), or extern inline.

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2020-08-08 11:06:27 +00:00
parent dfb98e350c
commit 967348a966

View File

@ -204,7 +204,7 @@ iface_open(char *ifname)
* Sets primary IPv4 addr.
* Returns 0 on success.
*/
inline int
static inline int
iface_setup_addr(char *ifname, char *addr, int plen)
{
char cmd[512];
@ -225,7 +225,7 @@ iface_setup_addr(char *ifname, char *addr, int plen)
* Removes primary IPv4 prefix.
* Returns 0 on success.
*/
inline int
static inline int
iface_delete_addr(char *ifname, char *addr)
{
char cmd[512];