mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user