提交 4572997a 编写于 作者: A Andrea Bolognani

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);
                                                 ^
上级 6c209a90
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册