aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsoypat <[email protected]>2022-10-21 14:55:36 -0300
committerRon Evans <[email protected]>2022-10-26 23:27:28 +0200
commitdd3ad57efbc84c040ca16b3d324837c060de4891 (patch)
treefe308000c00b54a6e83c985957db0df9391049eb
parent89facf834f1772d333565795d5992d2ab4c06465 (diff)
downloadtinygo-dd3ad57efbc84c040ca16b3d324837c060de4891.tar.gz
tinygo-dd3ad57efbc84c040ca16b3d324837c060de4891.zip
avoid allocating clock on heap
-rw-r--r--src/machine/machine_rp2040_clocks.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/machine/machine_rp2040_clocks.go b/src/machine/machine_rp2040_clocks.go
index 8fcc4e81a..eed86f8e0 100644
--- a/src/machine/machine_rp2040_clocks.go
+++ b/src/machine/machine_rp2040_clocks.go
@@ -83,8 +83,8 @@ type clock struct {
}
// clock returns the clock identified by cix.
-func (clks *clocksType) clock(cix clockIndex) *clock {
- return &clock{
+func (clks *clocksType) clock(cix clockIndex) clock {
+ return clock{
&clks.clk[cix],
cix,
}