diff options
author | Colin Cross <ccross@android.com> | 2018-02-21 16:30:17 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2018-02-22 14:54:47 -0800 |
commit | 3fad895e756e9483fd3eee210d14a43f936703dd (patch) | |
tree | fa6a6313f77966502f31c768622cb9f3f2d73cae /androidmk | |
parent | fabb608b27878dd76b1bbb49eff03467ec4688ac (diff) | |
download | build_soong-3fad895e756e9483fd3eee210d14a43f936703dd.tar.gz build_soong-3fad895e756e9483fd3eee210d14a43f936703dd.tar.bz2 build_soong-3fad895e756e9483fd3eee210d14a43f936703dd.zip |
Don't pretend *parser.List is immutable
The functions in bpfix that take a *parser.List and return a
modified *parser.List are always returning the same pointer
and mutating the target of the pointer. Remove the extra
unnecessary return value.
Also extract the getLiteralListProperty function.
Test: androidmk_test.go
Change-Id: I08d8aff955c72b7916741cda8083974a49af4d6f
Diffstat (limited to 'androidmk')
-rw-r--r-- | androidmk/cmd/androidmk/androidmk.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/androidmk/cmd/androidmk/androidmk.go b/androidmk/cmd/androidmk/androidmk.go index 385690c2..6e0b474b 100644 --- a/androidmk/cmd/androidmk/androidmk.go +++ b/androidmk/cmd/androidmk/androidmk.go @@ -239,12 +239,12 @@ func convertFile(filename string, buffer *bytes.Buffer) (string, []error) { } // check for common supported but undesirable structures and clean them up - fixed, err := bpfix.FixTree(tree, bpfix.NewFixRequest().AddAll()) + err := bpfix.FixTree(tree, bpfix.NewFixRequest().AddAll()) if err != nil { return "", []error{err} } - out, err := bpparser.Print(fixed) + out, err := bpparser.Print(tree) if err != nil { return "", []error{err} } |