summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-10-30 08:23:56 +0100
committerThomas Haller <thaller@redhat.com>2023-11-15 09:32:19 +0100
commitca4401e32781e34c235523dd6dce0d68682b29b9 (patch)
tree30674529a66b05f5554dc131a3ea50267d96bf32
parent5acd30ca44c3a54a127a1bf94ea546c281ad7c72 (diff)
all: use NM_MAX() instead of NM_CONST_MAX()
NM_CONST_MAX() is going to be replaced by NM_MAX() (or, in cases where NM_MAX() cannot be used, by NM_MAX_CONST()). Replace usage.
-rw-r--r--src/libnm-core-impl/nm-team-utils.c6
-rw-r--r--src/libnm-glib-aux/nm-test-utils.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libnm-core-impl/nm-team-utils.c b/src/libnm-core-impl/nm-team-utils.c
index 1aae11e49d..6f2f5dd298 100644
--- a/src/libnm-core-impl/nm-team-utils.c
+++ b/src/libnm-core-impl/nm-team-utils.c
@@ -2812,9 +2812,9 @@ nm_team_setting_new(gboolean is_port, const char *js_str)
gsize l;
G_STATIC_ASSERT_EXPR(sizeof(*self) == sizeof(self->_data_priv));
- G_STATIC_ASSERT_EXPR(sizeof(*self)
- == NM_CONST_MAX(nm_offsetofend(NMTeamSetting, d.master),
- nm_offsetofend(NMTeamSetting, d.port)));
+ G_STATIC_ASSERT_EXPR(
+ sizeof(*self)
+ == NM_MAX(nm_offsetofend(NMTeamSetting, d.master), nm_offsetofend(NMTeamSetting, d.port)));
l = is_port ? nm_offsetofend(NMTeamSetting, d.port) : nm_offsetofend(NMTeamSetting, d.master);
diff --git a/src/libnm-glib-aux/nm-test-utils.h b/src/libnm-glib-aux/nm-test-utils.h
index de6fd0f1b0..627151fa21 100644
--- a/src/libnm-glib-aux/nm-test-utils.h
+++ b/src/libnm-glib-aux/nm-test-utils.h
@@ -1803,7 +1803,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 _nm_thread_local char buf[NM_CONST_MAX(INET6_ADDRSTRLEN, INET_ADDRSTRLEN)];
+ static _nm_thread_local char buf[NM_MAX(INET6_ADDRSTRLEN, INET_ADDRSTRLEN)];
g_assert(NM_IN_SET(addr_family, AF_INET, AF_INET6));
g_assert(addr);