You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2026/10/22 09:44:18 UTC
(mynewt-newtmgr) 02/03: nmxact/nmxutil: Remove unreachable return in SingleResource.Release
This is an automated email from the ASF dual-hosted git repository.
sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newtmgr.git
commit 9929674af2c00b3fcf19475d2d489c9858a0daf4
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Wed Oct 21 23:29:30 2026 +0200
nmxact/nmxutil: Remove unreachable return in SingleResource.Release
The "return nil" following the panic on release without acquire can
never execute. Drop it; the panic itself is intended as it signals a
programming error.
Assisted-by: Claude:claude-opus-5-5
---
nmxact/nmxutil/sres.go | 1 -
1 file changed, 1 deletion(-)
diff --git a/nmxact/nmxutil/sres.go b/nmxact/nmxutil/sres.go
index 45c9093..5e6027f 100644
--- a/nmxact/nmxutil/sres.go
+++ b/nmxact/nmxutil/sres.go
@@ -76,7 +76,6 @@ func (s *SingleResource) Release() bool {
if !s.acquired {
panic("SingleResource release without acquire")
- return nil
}
if len(s.waitQueue) == 0 {