aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/pprof
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2018-03-24 15:49:43 +0000
committerDaniel Martí <mvdan@mvdan.cc>2018-03-24 19:44:47 +0000
commit8da180f6cac51f6cb8a316b962f797dbaf7ee96f (patch)
tree0dc75b1158d5c984d8c70e42228297fc75e97be6 /src/runtime/pprof
parentb1892d740eaeddc46a0c735b472718149c438844 (diff)
downloadgo-8da180f6cac51f6cb8a316b962f797dbaf7ee96f.tar.xz
all: remove some unused return parameters
As found by unparam. Picked the low-hanging fruit, consisting only of errors that were always nil and results that were never used. Left out those that were useful for consistency with other func signatures. Change-Id: I06b52bbd3541f8a5d66659c909bd93cb3e172018 Reviewed-on: https://go-review.googlesource.com/102418 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/pprof')
-rw-r--r--src/runtime/pprof/proto.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/runtime/pprof/proto.go b/src/runtime/pprof/proto.go
index 9e16e580ee..ff75537889 100644
--- a/src/runtime/pprof/proto.go
+++ b/src/runtime/pprof/proto.go
@@ -343,7 +343,7 @@ func (b *profileBuilder) addCPUData(data []uint64, tags []unsafe.Pointer) error
}
// build completes and returns the constructed profile.
-func (b *profileBuilder) build() error {
+func (b *profileBuilder) build() {
b.end = time.Now()
b.pb.int64Opt(tagProfile_TimeNanos, b.start.UnixNano())
@@ -396,7 +396,6 @@ func (b *profileBuilder) build() error {
b.pb.strings(tagProfile_StringTable, b.strings)
b.zw.Write(b.pb.data)
b.zw.Close()
- return nil
}
// readMapping reads /proc/self/maps and writes mappings to b.pb.