From 5ed952368e3777845afd934e38219c5567b09cc4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Tue, 7 Mar 2017 16:05:40 +0000 Subject: [PATCH] runtime/pprof: actually use tag parameter It's only ever called with the value it was using, but the code was counterintuitive. Use the parameter instead, like the other funcs near it. Found by github.com/mvdan/unparam. Change-Id: I45855e11d749380b9b2a28e6dd1d5dedf119a19b Reviewed-on: https://go-review.googlesource.com/37893 Reviewed-by: Russ Cox Run-TryBot: Russ Cox TryBot-Result: Gobot Gobot --- src/runtime/pprof/proto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/pprof/proto.go b/src/runtime/pprof/proto.go index 2a5f572c64..dd3d5c3b0b 100644 --- a/src/runtime/pprof/proto.go +++ b/src/runtime/pprof/proto.go @@ -178,7 +178,7 @@ func (b *profileBuilder) pbMapping(tag int, id, base, limit, offset uint64, file b.pb.int64Opt(tagMapping_Filename, b.stringIndex(file)) // TODO: Set any of HasInlineFrames, HasFunctions, HasFilenames, HasLineNumbers? // It seems like they should all be true, but they've never been set. - b.pb.endMessage(tagProfile_Mapping, start) + b.pb.endMessage(tag, start) } // locForPC returns the location ID for addr. -- 2.48.1