tests: use NM_CONST_MAX() macro where a constant expression is required

Otherwise, "nm-utils/nm-test-utils.h" won't work after we
include systemd headers.
This commit is contained in:
Thomas Haller 2019-02-04 09:57:20 +01:00 committed by Beniamino Galvani
parent b52d3e2ad3
commit 14957e914a

View file

@ -1214,7 +1214,7 @@ nmtst_inet_from_string (int addr_family, const char *str)
static inline const char *
nmtst_inet_to_string (int addr_family, gconstpointer addr)
{
static char buf[MAX (INET6_ADDRSTRLEN, INET_ADDRSTRLEN)];
static char buf[NM_CONST_MAX (INET6_ADDRSTRLEN, INET_ADDRSTRLEN)];
g_assert (NM_IN_SET (addr_family, AF_INET, AF_INET6));
g_assert (addr);