Skip to content

Commit

Permalink
cmd/asm: optimize if statement to return directly
Browse files Browse the repository at this point in the history
Change-Id: Iddf4d3bcc3bc2badf0d0f6b06375c901e76a40bb
GitHub-Last-Rev: 95586bf
GitHub-Pull-Request: #56268
Reviewed-on: https://go-review.googlesource.com/c/go/+/443315
Run-TryBot: Ian Lance Taylor <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
  • Loading branch information
sourcelliu authored and gopherbot committed Nov 8, 2022
1 parent 9860faa commit 0b7aa9f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cmd/asm/internal/asm/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,7 @@ func (p *Parser) atRegisterExtension() bool {
return false
}
// R1.xxx
if p.peek() == '.' {
return true
}
return false
return p.peek() == '.'
}

// registerReference parses a register given either the name, R10, or a parenthesized form, SPR(10).
Expand Down

0 comments on commit 0b7aa9f

Please sign in to comment.