Skip to content

Commit

Permalink
misc: fix hypothetical implicit memory aliasing
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Oct 9, 2023
1 parent c56b99a commit 9cfb8f1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions internal/controller/helmchart_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1129,9 +1129,9 @@ func (r *HelmChartReconciler) requestsForHelmRepositoryChange(ctx context.Contex
}

var reqs []reconcile.Request
for _, i := range list.Items {
if i.Status.ObservedSourceArtifactRevision != repo.GetArtifact().Revision {
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&i)})
for i, v := range list.Items {
if v.Status.ObservedSourceArtifactRevision != repo.GetArtifact().Revision {
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&list.Items[i])})
}
}
return reqs
Expand Down Expand Up @@ -1159,9 +1159,9 @@ func (r *HelmChartReconciler) requestsForGitRepositoryChange(ctx context.Context
}

var reqs []reconcile.Request
for _, i := range list.Items {
if !repo.GetArtifact().HasRevision(i.Status.ObservedSourceArtifactRevision) {
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&i)})
for i, v := range list.Items {
if !repo.GetArtifact().HasRevision(v.Status.ObservedSourceArtifactRevision) {
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&list.Items[i])})
}
}
return reqs
Expand Down Expand Up @@ -1189,9 +1189,9 @@ func (r *HelmChartReconciler) requestsForBucketChange(ctx context.Context, o cli
}

var reqs []reconcile.Request
for _, i := range list.Items {
if !bucket.GetArtifact().HasRevision(i.Status.ObservedSourceArtifactRevision) {
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&i)})
for i, v := range list.Items {
if !bucket.GetArtifact().HasRevision(v.Status.ObservedSourceArtifactRevision) {
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&list.Items[i])})
}
}
return reqs
Expand Down

0 comments on commit 9cfb8f1

Please sign in to comment.