diff options
author | Thomas Haller <thaller@redhat.com> | 2020-09-14 16:54:00 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-09-15 15:08:02 +0200 |
commit | f295e1313a5f8b866efb5e6ee5800e2cd2afe9ea (patch) | |
tree | c3294e20308bc2910f6138abc8a91bdfc5eb451f | |
parent | 026389fc1f14ed7a121a89f409e919582b88af5b (diff) | |
download | NetworkManager-f295e1313a5f8b866efb5e6ee5800e2cd2afe9ea.tar.gz |
core: use _nm_utils_inet4_ntop() instead of nm_utils_inet4_ntop()
nm_utils_inet4_ntop() is public API of libnm. Also, it accepts a
%NULL buffer to use a static buffer. That is error prone and we
should not use such convenience behavior for our own code.
-rw-r--r-- | src/nm-l3cfg.c | 4 | ||||
-rw-r--r-- | src/platform/nm-platform.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nm-l3cfg.c b/src/nm-l3cfg.c index 5354a5dbbf..6de3a95848 100644 --- a/src/nm-l3cfg.c +++ b/src/nm-l3cfg.c @@ -980,7 +980,7 @@ _l3_acd_nacd_event (int fd, n_acd_probe_get_userdata (event->_acd_event_payload.probe, (void **) &acd_data); _LOGT_acd (acd_data, "address %s %s from %s", - (addr_str = nm_utils_inet4_ntop (acd_data->addr, sbuf_addr)), + (addr_str = _nm_utils_inet4_ntop (acd_data->addr, sbuf_addr)), event->event == N_ACD_EVENT_DEFENDED ? "defended" : "conflict detected", @@ -993,7 +993,7 @@ _l3_acd_nacd_event (int fd, _LOGW ("IPv4 address collision detection sees conflict on interface %i%s%s%s for address %s from host %s", self->priv.ifindex, NM_PRINT_FMT_QUOTED (self->priv.pllink, " (", NMP_OBJECT_CAST_LINK (self->priv.pllink)->name, ")", ""), - addr_str ?: nm_utils_inet4_ntop (acd_data->addr, sbuf_addr), + addr_str ?: _nm_utils_inet4_ntop (acd_data->addr, sbuf_addr), sender_str ?: (sender_str = nm_utils_bin2hexstr_full (event->_acd_event_payload.sender, event->_acd_event_payload.n_sender, diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 83e9c1021d..5a842d8778 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -6047,7 +6047,7 @@ nm_platform_ip4_address_to_string (const NMPlatformIP4Address *address, char *bu "", s_address, address->plen, broadcast_address ? " brd " : "", - broadcast_address ? nm_utils_inet4_ntop (broadcast_address, str_broadcast) : "", + broadcast_address ? _nm_utils_inet4_ntop (broadcast_address, str_broadcast) : "", str_lft_p, str_pref_p, str_time_p, |