summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-10-27 14:36:56 +0200
committerThomas Haller <thaller@redhat.com>2023-11-15 09:32:20 +0100
commitb4dd83975eeb1cc9f1f8644a261a4d25c3c4eaa1 (patch)
tree353ed9601f545b504da933abcfd7ecc3c61d918e
parent559d071f8d6de1af01dbfe20b324f060ddce604d (diff)
all: use NM_MIN() instead of MIN()
-rw-r--r--src/core/devices/wifi/nm-iwd-manager.c2
-rw-r--r--src/core/nm-connectivity.c2
-rw-r--r--src/core/nm-core-utils.c15
-rw-r--r--src/core/nm-dbus-manager.c4
-rw-r--r--src/core/nm-l3-config-data.c2
-rw-r--r--src/core/supplicant/nm-supplicant-interface.c2
-rw-r--r--src/core/tests/test-core-with-expect.c2
-rw-r--r--src/libnm-core-aux-intern/nm-auth-subject.c4
-rw-r--r--src/libnm-core-impl/nm-utils.c2
-rw-r--r--src/libnm-core-impl/nm-vpn-editor-plugin.c2
-rw-r--r--src/libnm-platform/nm-linux-platform.c2
-rw-r--r--src/libnm-platform/nm-platform-utils.c4
-rw-r--r--src/libnm-platform/nm-platform.c12
-rw-r--r--src/libnm-platform/nmp-plobj.c4
-rw-r--r--src/libnm-platform/wifi/nm-wifi-utils-wext.c4
-rw-r--r--src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c4
-rw-r--r--src/libnmt-newt/nmt-newt-form.c4
-rw-r--r--src/libnmt-newt/nmt-newt-textbox.c2
-rw-r--r--src/nmcli/devices.c2
19 files changed, 38 insertions, 37 deletions
diff --git a/src/core/devices/wifi/nm-iwd-manager.c b/src/core/devices/wifi/nm-iwd-manager.c
index 9f06b9fdb3..76a342e206 100644
--- a/src/core/devices/wifi/nm-iwd-manager.c
+++ b/src/core/devices/wifi/nm-iwd-manager.c
@@ -1902,7 +1902,7 @@ nm_iwd_manager_get_ap_mirror_connection(NMIwdManager *self, NMWifiAP *ap)
NM80211ApSecurityFlags sec_flags = nm_wifi_ap_get_wpa_flags(ap) | nm_wifi_ap_get_rsn_flags(ap);
ssid_bytes = g_bytes_get_data(nm_wifi_ap_get_ssid(ap), &ssid_len);
- ssid_len = MIN(ssid_len, 32u);
+ ssid_len = NM_MIN(ssid_len, 32u);
memcpy(name_buf, ssid_bytes, ssid_len);
name_buf[ssid_len] = '\0';
diff --git a/src/core/nm-connectivity.c b/src/core/nm-connectivity.c
index bb1a7baee8..15dc31aa24 100644
--- a/src/core/nm-connectivity.c
+++ b/src/core/nm-connectivity.c
@@ -1295,7 +1295,7 @@ update_config(NMConnectivity *self, NMConfigData *config_data)
priv->uri_valid = new_uri_valid;
interval = nm_config_data_get_connectivity_interval(config_data);
- interval = MIN(interval, (7u * 24 * 3600));
+ interval = NM_MIN(interval, (7u * 24 * 3600));
if (priv->interval != interval) {
priv->interval = interval;
changed = TRUE;
diff --git a/src/core/nm-core-utils.c b/src/core/nm-core-utils.c
index 1f43463491..c62c8f47d5 100644
--- a/src/core/nm-core-utils.c
+++ b/src/core/nm-core-utils.c
@@ -746,11 +746,12 @@ nm_utils_kill_child_sync(pid_t pid,
was_waiting = TRUE;
}
- sleep_time = MIN(wait_until - now, (gint64) sleep_duration_usec);
+ sleep_time = NM_MIN(wait_until - now, (gint64) sleep_duration_usec);
if (loop_count < 20) {
/* At the beginning we expect the process to die fast.
* Limit the sleep time, the limit doubles with every iteration. */
- sleep_time = MIN(sleep_time, (((guint64) 1) << loop_count) * G_USEC_PER_SEC / 2000);
+ sleep_time =
+ NM_MIN(sleep_time, (((guint64) 1) << loop_count) * G_USEC_PER_SEC / 2000);
loop_count++;
}
g_usleep(sleep_time);
@@ -1031,7 +1032,7 @@ nm_utils_kill_process_sync(pid_t pid,
loop_count =
0; /* reset the loop_count. Now we really expect the process to die quickly. */
} else
- sleep_time = MIN(wait_until_sigkill - now, (gint64) sleep_duration_usec);
+ sleep_time = NM_MIN(wait_until_sigkill - now, (gint64) sleep_duration_usec);
}
if (!was_waiting) {
@@ -1064,7 +1065,7 @@ nm_utils_kill_process_sync(pid_t pid,
if (loop_count < 20) {
/* At the beginning we expect the process to die fast.
* Limit the sleep time, the limit doubles with every iteration. */
- sleep_time = MIN(sleep_time, (((guint64) 1) << loop_count) * G_USEC_PER_SEC / 2000);
+ sleep_time = NM_MIN(sleep_time, (((guint64) 1) << loop_count) * G_USEC_PER_SEC / 2000);
loop_count++;
}
g_usleep(sleep_time);
@@ -3567,7 +3568,7 @@ nm_utils_ipv6_addr_set_stable_privacy_with_host_id(NMUtilsStableType stable_type
sum = g_checksum_new(G_CHECKSUM_SHA256);
- host_id_len = MIN(host_id_len, G_MAXUINT32);
+ host_id_len = NM_MIN(host_id_len, G_MAXUINT32);
if (stable_type != NM_UTILS_STABLE_TYPE_UUID) {
guint8 stable_type_uint8;
@@ -3742,7 +3743,7 @@ _hw_addr_gen_stable_eth(NMUtilsStableType stable_type,
sum = g_checksum_new(G_CHECKSUM_SHA256);
- host_id_len = MIN(host_id_len, G_MAXUINT32);
+ host_id_len = NM_MIN(host_id_len, G_MAXUINT32);
nm_assert(stable_type < (NMUtilsStableType) 255);
stable_type_uint8 = stable_type;
@@ -5418,7 +5419,7 @@ nm_utils_shorten_hostname(const char *hostname, char **shortened)
l = (dot - hostname);
else
l = strlen(hostname);
- l = MIN(l, (gsize) NM_HOST_NAME_MAX);
+ l = NM_MIN(l, (gsize) NM_HOST_NAME_MAX);
s = g_strndup(hostname, l);
diff --git a/src/core/nm-dbus-manager.c b/src/core/nm-dbus-manager.c
index 0bde5971d8..7e6757f016 100644
--- a/src/core/nm-dbus-manager.c
+++ b/src/core/nm-dbus-manager.c
@@ -1644,8 +1644,8 @@ _new_unix_process(GDBusMethodInvocation *context,
/* polkit glib library stores uid and pid as int. There might be some
* pitfalls if the id ever happens to be larger then that. Just assert against
* it here. */
- g_return_val_if_fail(uid <= MIN(G_MAXINT, G_MAXINT32), NULL);
- g_return_val_if_fail(pid > 0 && pid <= MIN(G_MAXINT, G_MAXINT32), NULL);
+ g_return_val_if_fail(uid <= NM_MIN(G_MAXINT, G_MAXINT32), NULL);
+ g_return_val_if_fail(pid > 0 && pid <= NM_MIN(G_MAXINT, G_MAXINT32), NULL);
self = nm_auth_subject_new_unix_process(dbus_sender, pid, uid);
diff --git a/src/core/nm-l3-config-data.c b/src/core/nm-l3-config-data.c
index f7f81d93a7..347332933a 100644
--- a/src/core/nm-l3-config-data.c
+++ b/src/core/nm-l3-config-data.c
@@ -1642,7 +1642,7 @@ nm_l3_config_data_get_dns_priority(const NML3ConfigData *self, int addr_family,
case AF_UNSPEC:
if (NM_FLAGS_ANY(self->flags, NM_L3_CONFIG_DAT_FLAGS_HAS_DNS_PRIORITY_4)) {
if (NM_FLAGS_ANY(self->flags, NM_L3_CONFIG_DAT_FLAGS_HAS_DNS_PRIORITY_6)) {
- NM_SET_OUT(out_prio, MIN(self->dns_priority_4, self->dns_priority_6));
+ NM_SET_OUT(out_prio, NM_MIN(self->dns_priority_4, self->dns_priority_6));
return TRUE;
}
NM_SET_OUT(out_prio, self->dns_priority_4);
diff --git a/src/core/supplicant/nm-supplicant-interface.c b/src/core/supplicant/nm-supplicant-interface.c
index a867785100..46a7bc46e0 100644
--- a/src/core/supplicant/nm-supplicant-interface.c
+++ b/src/core/supplicant/nm-supplicant-interface.c
@@ -689,7 +689,7 @@ _bss_info_properties_changed(NMSupplicantInterface *self,
v_v = nm_g_variant_lookup_value(properties, "SSID", G_VARIANT_TYPE_BYTESTRING);
if (v_v) {
arr_data = g_variant_get_fixed_array(v_v, &arr_len, 1);
- arr_len = MIN(32u, arr_len);
+ arr_len = NM_MIN(32u, arr_len);
/* Stupid ieee80211 layer uses <hidden> */
if (arr_data && arr_len
diff --git a/src/core/tests/test-core-with-expect.c b/src/core/tests/test-core-with-expect.c
index 54206d814a..680843fc74 100644
--- a/src/core/tests/test-core-with-expect.c
+++ b/src/core/tests/test-core-with-expect.c
@@ -617,7 +617,7 @@ test_nmp_utils_new_vlan_name(void)
g_assert(ifname && ifname[0]);
g_assert_cmpint(strlen(ifname),
==,
- MIN(15u, strlen(parent_names[i]) + strlen(vlan_id_s)));
+ NM_MIN(15u, strlen(parent_names[i]) + strlen(vlan_id_s)));
g_assert(g_str_has_suffix(ifname, vlan_id_s));
g_assert(ifname[strlen(ifname) - strlen(vlan_id_s)] == '.');
g_assert(strncmp(ifname, parent_names[i], strlen(ifname) - strlen(vlan_id_s)) == 0);
diff --git a/src/libnm-core-aux-intern/nm-auth-subject.c b/src/libnm-core-aux-intern/nm-auth-subject.c
index 48fcf08fde..c381bdba38 100644
--- a/src/libnm-core-aux-intern/nm-auth-subject.c
+++ b/src/libnm-core-aux-intern/nm-auth-subject.c
@@ -363,9 +363,9 @@ constructed(GObject *object)
case NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS:
/* Ensure pid and uid to be representable as int32.
* DBUS treats them as uint32, polkit library as int. */
- if (priv->unix_process.pid > MIN(G_MAXINT, G_MAXINT32))
+ if (priv->unix_process.pid > NM_MIN(G_MAXINT, G_MAXINT32))
break;
- if (priv->unix_process.uid > MIN(G_MAXINT, G_MAXINT32)) {
+ if (priv->unix_process.uid > NM_MIN(G_MAXINT, G_MAXINT32)) {
/* for uid==-1, libpolkit-gobject-1 detects the user based on the process id.
* Don't bother and require the user id as parameter. */
break;
diff --git a/src/libnm-core-impl/nm-utils.c b/src/libnm-core-impl/nm-utils.c
index 2bd8936da7..c4fb62b875 100644
--- a/src/libnm-core-impl/nm-utils.c
+++ b/src/libnm-core-impl/nm-utils.c
@@ -669,7 +669,7 @@ nm_utils_escape_ssid(const guint8 *ssid, gsize len)
return escaped;
}
- len = MIN(len, (guint32) NM_IW_ESSID_MAX_SIZE);
+ len = NM_MIN(len, (guint32) NM_IW_ESSID_MAX_SIZE);
while (len--) {
if (*s == '\0') {
*d++ = '\\';
diff --git a/src/libnm-core-impl/nm-vpn-editor-plugin.c b/src/libnm-core-impl/nm-vpn-editor-plugin.c
index 6c9aff43c6..6181368a5e 100644
--- a/src/libnm-core-impl/nm-vpn-editor-plugin.c
+++ b/src/libnm-core-impl/nm-vpn-editor-plugin.c
@@ -209,7 +209,7 @@ nm_vpn_editor_plugin_get_vt(NMVpnEditorPlugin *plugin, NMVpnEditorPluginVT *vt,
if (!p_vt)
p_vt_size = 0;
g_return_val_if_fail(p_vt_size, 0);
- memcpy(vt, p_vt, MIN(vt_size, p_vt_size));
+ memcpy(vt, p_vt, NM_MIN(vt_size, p_vt_size));
}
return p_vt_size;
diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c
index b71989155e..a04dc3a939 100644
--- a/src/libnm-platform/nm-linux-platform.c
+++ b/src/libnm-platform/nm-linux-platform.c
@@ -1096,7 +1096,7 @@ _addrtime_extend_lifetime(guint32 lifetime, guint32 seconds)
return lifetime;
v = (guint64) lifetime + (guint64) seconds;
- return MIN(v, NM_PLATFORM_LIFETIME_PERMANENT - 1);
+ return NM_MIN(v, NM_PLATFORM_LIFETIME_PERMANENT - 1);
}
/* The rtnl_addr object contains relative lifetimes @valid and @preferred
diff --git a/src/libnm-platform/nm-platform-utils.c b/src/libnm-platform/nm-platform-utils.c
index fc68fbb148..6074c3421f 100644
--- a/src/libnm-platform/nm-platform-utils.c
+++ b/src/libnm-platform/nm-platform-utils.c
@@ -2177,7 +2177,7 @@ nmp_utils_new_vlan_name(const char *parent_iface, guint32 vlan_id)
ifname = g_new(char, IFNAMSIZ);
parent_len = strlen(parent_iface);
- parent_len = MIN(parent_len, IFNAMSIZ - 1 - id_len);
+ parent_len = NM_MIN(parent_len, IFNAMSIZ - 1 - id_len);
memcpy(ifname, parent_iface, parent_len);
g_snprintf(&ifname[parent_len], IFNAMSIZ - parent_len, ".%u", vlan_id);
@@ -2256,7 +2256,7 @@ nmp_utils_lifetime_get(guint32 timestamp,
t_preferred = nmp_utils_lifetime_rebase_relative_time_on_now(timestamp, preferred, now);
- NM_SET_OUT(out_preferred, MIN(t_preferred, t_lifetime));
+ NM_SET_OUT(out_preferred, NM_MIN(t_preferred, t_lifetime));
/* Assert that non-permanent addresses have a (positive) @timestamp. nmp_utils_lifetime_rebase_relative_time_on_now()
* treats addresses with timestamp 0 as *now*. Addresses passed to _address_get_lifetime() always
diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c
index 68d41daa98..7ac1ba2007 100644
--- a/src/libnm-platform/nm-platform.c
+++ b/src/libnm-platform/nm-platform.c
@@ -8764,7 +8764,7 @@ nm_platform_ip4_route_cmp(const NMPlatformIP4Route *a,
NM_CMP_FIELD_UNSAFE(a, b, table_any);
NM_CMP_DIRECT(nm_platform_ip_route_get_effective_table(NM_PLATFORM_IP_ROUTE_CAST(a)),
nm_platform_ip_route_get_effective_table(NM_PLATFORM_IP_ROUTE_CAST(b)));
- NM_CMP_DIRECT_IP4_ADDR_SAME_PREFIX(a->network, b->network, MIN(a->plen, b->plen));
+ NM_CMP_DIRECT_IP4_ADDR_SAME_PREFIX(a->network, b->network, NM_MIN(a->plen, b->plen));
NM_CMP_FIELD(a, b, plen);
NM_CMP_FIELD_UNSAFE(a, b, metric_any);
NM_CMP_FIELD(a, b, metric);
@@ -8819,7 +8819,7 @@ nm_platform_ip4_route_cmp(const NMPlatformIP4Route *a,
NM_CMP_FIELD(a, b, table_coerced);
NM_CMP_FIELD(a, b, ifindex);
if (cmp_type == NM_PLATFORM_IP_ROUTE_CMP_TYPE_SEMANTICALLY)
- NM_CMP_DIRECT_IP4_ADDR_SAME_PREFIX(a->network, b->network, MIN(a->plen, b->plen));
+ NM_CMP_DIRECT_IP4_ADDR_SAME_PREFIX(a->network, b->network, NM_MIN(a->plen, b->plen));
else
NM_CMP_FIELD(a, b, network);
NM_CMP_FIELD(a, b, plen);
@@ -8991,11 +8991,11 @@ nm_platform_ip6_route_cmp(const NMPlatformIP6Route *a,
NM_CMP_FIELD_UNSAFE(a, b, table_any);
NM_CMP_DIRECT(nm_platform_ip_route_get_effective_table(NM_PLATFORM_IP_ROUTE_CAST(a)),
nm_platform_ip_route_get_effective_table(NM_PLATFORM_IP_ROUTE_CAST(b)));
- NM_CMP_DIRECT_IP6_ADDR_SAME_PREFIX(&a->network, &b->network, MIN(a->plen, b->plen));
+ NM_CMP_DIRECT_IP6_ADDR_SAME_PREFIX(&a->network, &b->network, NM_MIN(a->plen, b->plen));
NM_CMP_FIELD(a, b, plen);
NM_CMP_FIELD_UNSAFE(a, b, metric_any);
NM_CMP_FIELD(a, b, metric);
- NM_CMP_DIRECT_IP6_ADDR_SAME_PREFIX(&a->src, &b->src, MIN(a->src_plen, b->src_plen));
+ NM_CMP_DIRECT_IP6_ADDR_SAME_PREFIX(&a->src, &b->src, NM_MIN(a->src_plen, b->src_plen));
NM_CMP_FIELD(a, b, src_plen);
if (cmp_type == NM_PLATFORM_IP_ROUTE_CMP_TYPE_ID) {
NM_CMP_FIELD(a, b, ifindex);
@@ -9014,7 +9014,7 @@ nm_platform_ip6_route_cmp(const NMPlatformIP6Route *a,
NM_CMP_FIELD(a, b, table_coerced);
NM_CMP_FIELD(a, b, ifindex);
if (cmp_type == NM_PLATFORM_IP_ROUTE_CMP_TYPE_SEMANTICALLY)
- NM_CMP_DIRECT_IP6_ADDR_SAME_PREFIX(&a->network, &b->network, MIN(a->plen, b->plen));
+ NM_CMP_DIRECT_IP6_ADDR_SAME_PREFIX(&a->network, &b->network, NM_MIN(a->plen, b->plen));
else
NM_CMP_FIELD_IN6ADDR(a, b, network);
NM_CMP_FIELD(a, b, plen);
@@ -9023,7 +9023,7 @@ nm_platform_ip6_route_cmp(const NMPlatformIP6Route *a,
NM_CMP_FIELD_IN6ADDR(a, b, gateway);
NM_CMP_FIELD_IN6ADDR(a, b, pref_src);
if (cmp_type == NM_PLATFORM_IP_ROUTE_CMP_TYPE_SEMANTICALLY) {
- NM_CMP_DIRECT_IP6_ADDR_SAME_PREFIX(&a->src, &b->src, MIN(a->src_plen, b->src_plen));
+ NM_CMP_DIRECT_IP6_ADDR_SAME_PREFIX(&a->src, &b->src, NM_MIN(a->src_plen, b->src_plen));
NM_CMP_FIELD(a, b, src_plen);
NM_CMP_DIRECT(nmp_utils_ip_config_source_round_trip_rtprot(a->rt_source),
nmp_utils_ip_config_source_round_trip_rtprot(b->rt_source));
diff --git a/src/libnm-platform/nmp-plobj.c b/src/libnm-platform/nmp-plobj.c
index d3643ae1c1..70664634e6 100644
--- a/src/libnm-platform/nmp-plobj.c
+++ b/src/libnm-platform/nmp-plobj.c
@@ -424,7 +424,7 @@ nm_platform_ip4_address_to_string(const NMPlatformIP4Address *address, char *buf
(address->lifetime == address->preferred)
? str_lft_p
: (_lifetime_to_string(address->timestamp,
- address->lifetime ? MIN(address->preferred, address->lifetime)
+ address->lifetime ? NM_MIN(address->preferred, address->lifetime)
: NM_PLATFORM_LIFETIME_PERMANENT,
now,
str_pref,
@@ -522,7 +522,7 @@ nm_platform_ip6_address_to_string(const NMPlatformIP6Address *address, char *buf
(address->lifetime == address->preferred)
? str_lft_p
: (_lifetime_to_string(address->timestamp,
- address->lifetime ? MIN(address->preferred, address->lifetime)
+ address->lifetime ? NM_MIN(address->preferred, address->lifetime)
: NM_PLATFORM_LIFETIME_PERMANENT,
now,
str_pref,
diff --git a/src/libnm-platform/wifi/nm-wifi-utils-wext.c b/src/libnm-platform/wifi/nm-wifi-utils-wext.c
index 5174958c37..16503430bc 100644
--- a/src/libnm-platform/wifi/nm-wifi-utils-wext.c
+++ b/src/libnm-platform/wifi/nm-wifi-utils-wext.c
@@ -548,7 +548,7 @@ wifi_wext_set_mesh_ssid(NMWifiUtils *data, const guint8 *ssid, gsize len)
return FALSE;
memset(buf, 0, sizeof(buf));
- memcpy(buf, ssid, MIN(sizeof(buf) - 1, len));
+ memcpy(buf, ssid, NM_MIN(sizeof(buf) - 1, len));
wrq.u.essid.pointer = (caddr_t) buf;
wrq.u.essid.length = len;
@@ -758,7 +758,7 @@ nm_wifi_utils_wext_new(int ifindex, gboolean check_scan)
wext->max_qual.noise = range.max_qual.noise;
wext->max_qual.updated = range.max_qual.updated;
- wext->num_freqs = MIN(range.num_frequency, (guint) IW_MAX_FREQUENCIES);
+ wext->num_freqs = NM_MIN(range.num_frequency, (guint) IW_MAX_FREQUENCIES);
for (i = 0; i < wext->num_freqs; i++) {
wext->freqs[i] = iw_freq_to_uint32(&range.freq[i]);
freq_valid = TRUE;
diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
index a2605b718c..0e6f21f47b 100644
--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
+++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
@@ -824,7 +824,7 @@ int dhcp6_client_send_message(sd_dhcp6_client *client) {
/* RFC 8415 Section 21.9.
* A client MUST include an Elapsed Time option in messages to indicate how long the client has
* been trying to complete a DHCP message exchange. */
- elapsed_usec = MIN(usec_sub_unsigned(time_now, client->transaction_start) / USEC_PER_MSEC / 10, (usec_t) UINT16_MAX);
+ elapsed_usec = NM_MIN(usec_sub_unsigned(time_now, client->transaction_start) / USEC_PER_MSEC / 10, (usec_t) UINT16_MAX);
elapsed_time = htobe16(elapsed_usec);
r = dhcp6_option_append(&buf, &offset, SD_DHCP6_OPTION_ELAPSED_TIME, sizeof(elapsed_time), &elapsed_time);
if (r < 0)
@@ -1052,7 +1052,7 @@ static int client_enter_bound_state(sd_dhcp6_client *client) {
goto error;
lifetime_t2 = client_timeout_compute_random(lifetime_t2);
- lifetime_t1 = client_timeout_compute_random(MIN(lifetime_t1, lifetime_t2));
+ lifetime_t1 = client_timeout_compute_random(NM_MIN(lifetime_t1, lifetime_t2));
if (lifetime_t1 == USEC_INFINITY) {
log_dhcp6_client(client, "Infinite T1");
diff --git a/src/libnmt-newt/nmt-newt-form.c b/src/libnmt-newt/nmt-newt-form.c
index 91b2a8c260..3565799c6a 100644
--- a/src/libnmt-newt/nmt-newt-form.c
+++ b/src/libnmt-newt/nmt-newt-form.c
@@ -182,9 +182,9 @@ nmt_newt_form_build(NmtNewtForm *form)
newtGetScreenSize(&screen_width, &screen_height);
if (!priv->fixed_width)
- priv->width = MIN(form_width + 2 * ((gint64) priv->padding), screen_width - 2);
+ priv->width = NM_MIN(form_width + 2 * ((gint64) priv->padding), screen_width - 2);
if (!priv->fixed_height)
- priv->height = MIN(form_height + 2 * ((gint64) priv->padding), screen_height - 2);
+ priv->height = NM_MIN(form_height + 2 * ((gint64) priv->padding), screen_height - 2);
if (!priv->fixed_x)
priv->x = (screen_width - form_width) / 2;
diff --git a/src/libnmt-newt/nmt-newt-textbox.c b/src/libnmt-newt/nmt-newt-textbox.c
index 24aae9f9e7..bf9b6a2948 100644
--- a/src/libnmt-newt/nmt-newt-textbox.c
+++ b/src/libnmt-newt/nmt-newt-textbox.c
@@ -95,7 +95,7 @@ nmt_newt_textbox_set_text(NmtNewtTextbox *textbox, const char *text)
priv->width = width;
}
g_free(lines);
- priv->height = MIN(i, 1);
+ priv->height = NM_MIN(i, 1);
g_object_notify(G_OBJECT(textbox), "text");
nmt_newt_widget_needs_rebuild(NMT_NEWT_WIDGET(textbox));
diff --git a/src/nmcli/devices.c b/src/nmcli/devices.c
index 72a0c7443a..40ef536e14 100644
--- a/src/nmcli/devices.c
+++ b/src/nmcli/devices.c
@@ -1347,7 +1347,7 @@ fill_output_access_point(NMAccessPoint *ap, const APInfo *info)
mode = nm_access_point_get_mode(ap);
bitrate = nm_access_point_get_max_bitrate(ap);
bandwidth = nm_access_point_get_bandwidth(ap);
- strength = MIN(nm_access_point_get_strength(ap), 100u);
+ strength = NM_MIN(nm_access_point_get_strength(ap), 100u);
/* Convert to strings */
if (ssid) {