mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
netdev: Use the correct pointer type for virSocketAddrFormat()
virSocketAddrFormat() wants a single pointer, not a double pointer. Fixes the following compilation error on FreeBSD: util/virnetdev.c:1448:72: error: incompatible pointer types passing 'virSocketAddr **' to parameter of type 'const virSocketAddr *'; remove & [-Werror,-Wincompatible-pointer-types] if (VIR_SOCKET_ADDR_VALID(peer) && !(peerstr = virSocketAddrFormat(&peer))) ^~~~~ ./util/virsocketaddr.h:92:48: note: passing argument to parameter 'addr' here char *virSocketAddrFormat(const virSocketAddr *addr); ^
This commit is contained in:
parent
6c209a90f9
commit
4572997aca
@ -1445,7 +1445,7 @@ int virNetDevSetIPAddress(const char *ifname,
|
||||
if (!(addrstr = virSocketAddrFormat(addr)))
|
||||
goto cleanup;
|
||||
|
||||
if (VIR_SOCKET_ADDR_VALID(peer) && !(peerstr = virSocketAddrFormat(&peer)))
|
||||
if (VIR_SOCKET_ADDR_VALID(peer) && !(peerstr = virSocketAddrFormat(peer)))
|
||||
goto cleanup;
|
||||
|
||||
/* format up a broadcast address if this is IPv4 */
|
||||
|
Loading…
Reference in New Issue
Block a user