github-vet / github-vet/rangeloop-pointer-findings
arodc/docker-ce: components/engine/vendor/github.com/docker/libnetwork/networkdb/delegate.go; 18 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [arodc/docker-ce](https://www.github.com/arodc/docker-ce) at [components/engine/vendor/github.com/docker/libnetwork/networkdb/delegate.go](https://github.com/arodc/docker-ce/blob/4cbf52bf35a7a20d00ec5f96bb66387ad25c9a48/components/engine/vendor/github.com/docker/libnetwork/networkdb/delegate.go#L26-L43)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
> reference to nodes is reassigned at line 32
[Click here to see the code in its original context.](https://github.com/arodc/docker-ce/blob/4cbf52bf35a7a20d00ec5f96bb66387ad25c9a48/components/engine/vendor/github.com/docker/libnetwork/networkdb/delegate.go#L26-L43)
Click here to show the 18 line(s) of Go which triggered the analyzer.
```go
for _, nodes := range []map[string]*node{
nDB.failedNodes,
nDB.leftNodes,
nDB.nodes,
} {
if n, ok := nodes[nEvent.NodeName]; ok {
active = &nodes == &nDB.nodes
left = &nodes == &nDB.leftNodes
failed = &nodes == &nDB.failedNodes
if n.ltime >= nEvent.LTime {
return active, left, failed, nil
}
if extract {
delete(nodes, n.Name)
}
return active, left, failed, n
}
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: 4cbf52bf35a7a20d00ec5f96bb66387ad25c9a48
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.