github-vet / github-vet/rangeloop-pointer-findings
ubports/ubuntu-push: server/api/handlers.go; 15 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [ubports/ubuntu-push](https://www.github.com/ubports/ubuntu-push) at [server/api/handlers.go](https://github.com/ubports/ubuntu-push/blob/2598e4e094270f20b5db2703b500bf4098b5c848/server/api/handlers.go#L498-L512)
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 notif is reassigned at line 511
[Click here to see the code in its original context.](https://github.com/ubports/ubuntu-push/blob/2598e4e094270f20b5db2703b500bf4098b5c848/server/api/handlers.go#L498-L512)
Click here to show the 15 line(s) of Go which triggered the analyzer.
```go
for i, notif := range notifs {
if meta[i].Before(now) {
expired++
continue
}
if notif.AppId == appId {
if replaceTag != "" && replaceTag == meta[i].ReplaceTag {
// this we will scrub
replaceable++
continue
}
forApp++
}
last = ¬if
}
```
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: 2598e4e094270f20b5db2703b500bf4098b5c848
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.