summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/mm/procfs.go7
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