Date: Mon, 20 Dec 2021 09:52:50 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 46aec7fae47e - main - tests/libalias: Make inline functions static inline Message-ID: <202112200952.1BK9qo8v006883@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=46aec7fae47ed46368f95338741b4daffa5cbc94 commit 46aec7fae47ed46368f95338741b4daffa5cbc94 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2021-12-20 09:52:02 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2021-12-20 09:52:25 +0000 tests/libalias: Make inline functions static inline In C, plain inline functions should never be used: they should be declared either static inline or extern inline. In this case, they are clearly meant to be static inline. MFC after: 3 days --- tests/sys/netinet/libalias/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/netinet/libalias/util.h b/tests/sys/netinet/libalias/util.h index 81d71049b57f..fcec225af658 100644 --- a/tests/sys/netinet/libalias/util.h +++ b/tests/sys/netinet/libalias/util.h @@ -48,7 +48,7 @@ void hexdump(void *p, size_t len); struct ip * ip_packet(u_char protocol, size_t len); struct udphdr * set_udp(struct ip *p, u_short sport, u_short dport); -inline int +static inline int addr_eq(struct in_addr a, struct in_addr b) { return a.s_addr == b.s_addr; @@ -56,7 +56,7 @@ addr_eq(struct in_addr a, struct in_addr b) #define a2h(a) ntohl(a.s_addr) -inline int +static inline int rand_range(int min, int max) { return min + rand()%(max - min);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112200952.1BK9qo8v006883>