Skip to content

Commit

Permalink
fix Implicit memory aliasing in for loop
Browse files Browse the repository at this point in the history
Signed-off-by: ningmingxiao <[email protected]>
  • Loading branch information
ningmingxiao committed Dec 6, 2021
1 parent 292b0c1 commit 54e95e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions containerstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ func containersFromProto(containerspb []containersapi.Container) []containers.Co
var containers []containers.Container

for _, container := range containerspb {
container := container
containers = append(containers, containerFromProto(&container))
}

Expand Down
1 change: 1 addition & 0 deletions image_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func imagesFromProto(imagespb []imagesapi.Image) []images.Image {
var images []images.Image

for _, image := range imagespb {
image := image
images = append(images, imageFromProto(&image))
}

Expand Down

0 comments on commit 54e95e6

Please sign in to comment.