diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-01-21 00:12:02 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-21 00:12:02 +0000 |
commit | 3343995a4129f2533531e3f81e983b3137338080 (patch) | |
tree | 7f8992f423d1e477af6521714ad3657ccaf67b5d | |
parent | e4466f04ff285d201ee3e54cdf5525c4871734eb (diff) | |
parent | 9af6150b5e36bcc731db6f4693fe8e9c5848a5e3 (diff) |
Merge release-20210112.0-49-g9af6150b5 (automated)
-rw-r--r-- | pkg/sentry/mm/procfs.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkg/sentry/mm/procfs.go b/pkg/sentry/mm/procfs.go index 6efe5102b..73bfbea49 100644 --- a/pkg/sentry/mm/procfs.go +++ b/pkg/sentry/mm/procfs.go @@ -17,7 +17,6 @@ package mm import ( "bytes" "fmt" - "strings" "gvisor.dev/gvisor/pkg/context" "gvisor.dev/gvisor/pkg/sentry/fs/proc/seqfile" @@ -165,12 +164,12 @@ func (mm *MemoryManager) appendVMAMapsEntryLocked(ctx context.Context, vseg vmaI } if s != "" { // Per linux, we pad until the 74th character. - if pad := 73 - lineLen; pad > 0 { - b.WriteString(strings.Repeat(" ", pad)) + for pad := 73 - lineLen; pad > 0; pad-- { + b.WriteByte(' ') } b.WriteString(s) } - b.WriteString("\n") + b.WriteByte('\n') } // ReadSmapsDataInto is called by fsimpl/proc.smapsData.Generate to |