mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-13 00:36:28 +00:00
Avoids taking the address of the same variable twice.
This commit is contained in:
parent
5118538179
commit
c42c0e7ceb
@ -178,10 +178,10 @@ func (t *tcpListener) WANAddresses() []*url.URL {
|
|||||||
// For every address with a specified IP, add one without an IP,
|
// For every address with a specified IP, add one without an IP,
|
||||||
// just in case the specified IP is still internal (router behind DMZ).
|
// just in case the specified IP is still internal (router behind DMZ).
|
||||||
if len(addr.IP) != 0 && !addr.IP.IsUnspecified() {
|
if len(addr.IP) != 0 && !addr.IP.IsUnspecified() {
|
||||||
uri = *t.uri
|
zeroUri := *t.uri
|
||||||
addr.IP = nil
|
addr.IP = nil
|
||||||
uri.Host = addr.String()
|
zeroUri.Host = addr.String()
|
||||||
uris = append(uris, &uri)
|
uris = append(uris, &zeroUri)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user