]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/internal/obj/riscv: clean up error checking for encoding
authorJoel Sing <joel@sing.id.au>
Sun, 27 Aug 2023 14:13:34 +0000 (00:13 +1000)
committerJoel Sing <joel@sing.id.au>
Fri, 8 Sep 2023 04:21:30 +0000 (04:21 +0000)
commit7f574998534548220ae31597a5a942db2ed548c6
tree0049375bb9e994aa5ce84cb3fd80d5b17bd7fde2
parent216c512198dfe5d81f1a035c1a27c3eac08db310
cmd/internal/obj/riscv: clean up error checking for encoding

Replace a "fixme" with a more appropriate error. Also invert the condition
so that the error returns early, which is more Go idiomatic.

Change-Id: I03006572c4010fb47037bed3ee1fd7f92bfc20d3
Reviewed-on: https://go-review.googlesource.com/c/go/+/523457
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: M Zhuo <mzh@golangcn.org>
src/cmd/internal/obj/riscv/obj.go