This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git

commit 2278c30c3e22d378d3b4e7b8595c2d413bf73fe7
Author: Christopher Collins <[email protected]>
AuthorDate: Mon Jan 27 11:08:57 2020 -0800

    toolchain: Return nil if no error
    
    The code already handles the `err != nil` case.  If the code gets past
    that check, we can assume that `err == nil`.
---
 newt/toolchain/compiler.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/newt/toolchain/compiler.go b/newt/toolchain/compiler.go
index 05dc424..cf0531a 100644
--- a/newt/toolchain/compiler.go
+++ b/newt/toolchain/compiler.go
@@ -1363,7 +1363,7 @@ func (c *Compiler) ParseLibrary(libraryFile string) 
(error, []byte) {
        if err != nil {
                return err, nil
        }
-       return err, out
+       return nil, out
 }
 
 func (c *Compiler) CopySymbols(infile string, outfile string, sm 
*symbol.SymbolMap) error {
@@ -1373,7 +1373,7 @@ func (c *Compiler) CopySymbols(infile string, outfile 
string, sm *symbol.SymbolM
        if err != nil {
                return err
        }
-       return err
+       return nil
 }
 
 func (c *Compiler) ConvertBinToHex(inFile string, outFile string, baseAddr 
int) error {

Reply via email to