Skip to content

Commit

Permalink
fix(market): don't reference loop variables via pointer! (#95)
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian authored Nov 20, 2023
1 parent dc61fbe commit cf0cd3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/node/market/v1beta4/bid.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ func (s ResourcesOffer) MatchGSpec(gspec dtypes.GroupSpec) bool {

ru := make(map[uint32]*dtypes.ResourceUnit)

for _, res := range gspec.Resources {
ru[res.ID] = &res
for idx := range gspec.Resources {
ru[gspec.Resources[idx].ID] = &gspec.Resources[idx]
}

for _, ro := range s {
Expand Down

0 comments on commit cf0cd3a

Please sign in to comment.