]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/network/networkd-link.c
tree-wide: use UINT64_MAX or friends
[thirdparty/systemd.git] / src / network / networkd-link.c
index 9693e73351a0e986f493332b28ecd78f425ef269..6868a7ccb2c227c6ff3700fd17c66e71f39713ae 100644 (file)
@@ -403,7 +403,7 @@ static int link_new(Manager *manager, sd_netlink_message *message, Link **ret) {
                 .ifindex = ifindex,
                 .iftype = iftype,
 
-                .n_dns = (unsigned) -1,
+                .n_dns = UINT_MAX,
                 .dns_default_route = -1,
                 .llmnr = _RESOLVE_SUPPORT_INVALID,
                 .mdns = _RESOLVE_SUPPORT_INVALID,
@@ -472,11 +472,11 @@ void link_ntp_settings_clear(Link *link) {
 }
 
 void link_dns_settings_clear(Link *link) {
-        if (link->n_dns != (unsigned) -1)
+        if (link->n_dns != UINT_MAX)
                 for (unsigned i = 0; i < link->n_dns; i++)
                         in_addr_full_free(link->dns[i]);
         link->dns = mfree(link->dns);
-        link->n_dns = (unsigned) -1;
+        link->n_dns = UINT_MAX;
 
         link->search_domains = ordered_set_free_free(link->search_domains);
         link->route_domains = ordered_set_free_free(link->route_domains);