Skip to content

Misc modernize fixes#881

Open
kolyshkin wants to merge 5 commits into
podman-container-tools:mainfrom
kolyshkin:modernize
Open

Misc modernize fixes#881
kolyshkin wants to merge 5 commits into
podman-container-tools:mainfrom
kolyshkin:modernize

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

See individual commit for details. Mostly generated by modernize -fix with some manual fixes on top.

kolyshkin added 5 commits May 27, 2026 13:16
Suggested by modernize tool.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Generated by modernize.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Suggested by modernize with manual test fixes on top.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@github-actions github-actions Bot added storage Related to "storage" package image Related to "image" package labels May 27, 2026
Copy link
Copy Markdown
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

mergedEntries[i].EndOffset = lastOffset
for _, entry := range slices.Backward(mergedEntries) {
if entry.EndOffset == 0 {
entry.EndOffset = lastOffset
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think this works, entry is a copy by value.

lastChunkOffset := entry.EndOffset
for _, v := range slices.Backward(entry.chunks) {
v.EndOffset = lastChunkOffset
v.Size = v.EndOffset - v.Offset
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

image Related to "image" package storage Related to "storage" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants