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.
This commit is contained in:
Thomas Haller
2023-10-30 08:23:56 +01:00
parent 5acd30ca44
commit ca4401e327
2 changed files with 4 additions and 4 deletions

View File

@@ -2812,9 +2812,9 @@ nm_team_setting_new(gboolean is_port, const char *js_str)
gsize l; gsize l;
G_STATIC_ASSERT_EXPR(sizeof(*self) == sizeof(self->_data_priv)); G_STATIC_ASSERT_EXPR(sizeof(*self) == sizeof(self->_data_priv));
G_STATIC_ASSERT_EXPR(sizeof(*self) G_STATIC_ASSERT_EXPR(
== NM_CONST_MAX(nm_offsetofend(NMTeamSetting, d.master), sizeof(*self)
nm_offsetofend(NMTeamSetting, d.port))); == 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); l = is_port ? nm_offsetofend(NMTeamSetting, d.port) : nm_offsetofend(NMTeamSetting, d.master);

View File

@@ -1803,7 +1803,7 @@ nmtst_inet_from_string(int addr_family, const char *str)
static inline const char * static inline const char *
nmtst_inet_to_string(int addr_family, gconstpointer addr) 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(NM_IN_SET(addr_family, AF_INET, AF_INET6));
g_assert(addr); g_assert(addr);