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.
This commit is contained in:
Thomas Haller 2020-09-14 16:54:00 +02:00
parent 026389fc1f
commit f295e1313a
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 3 additions and 3 deletions

View file

@ -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,

View file

@ -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,