1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00

ctdb_sys_have_ip: don't overwrite input data (setting port to 0)

metze

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit de71ce2195bb4f6a96b12437a2d4d1424fd1c59c)
This commit is contained in:
Stefan Metzmacher 2009-01-19 13:24:09 +01:00 committed by Michael Adam
parent 3dea35263c
commit bf86562144

View File

@ -413,10 +413,12 @@ int ctdb_sys_send_tcp(const ctdb_sock_addr *dest,
ifname, if non-NULL, will return the name of the interface this ip is tied to
*/
bool ctdb_sys_have_ip(ctdb_sock_addr *addr)
bool ctdb_sys_have_ip(ctdb_sock_addr *_addr)
{
int s;
int ret;
ctdb_sock_addr __addr = *_addr;
ctdb_sock_addr *addr = &__addr;
switch (addr->sa.sa_family) {
case AF_INET: