diff options
Diffstat (limited to 'src/cmd/cgo/ast.go')
| -rw-r--r-- | src/cmd/cgo/ast.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/cgo/ast.go b/src/cmd/cgo/ast.go index 3cbbeafdca..861479db7a 100644 --- a/src/cmd/cgo/ast.go +++ b/src/cmd/cgo/ast.go @@ -181,7 +181,7 @@ func (f *File) ParseGo(abspath string, src []byte) { // Like ast.CommentGroup's Text method but preserves // leading blank lines, so that line numbers line up. func commentText(g *ast.CommentGroup) string { - var pieces []string + pieces := make([]string, 0, len(g.List)) for _, com := range g.List { c := com.Text // Remove comment markers. |
