aboutsummaryrefslogtreecommitdiffstats
path: root/prog/encodingexec.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-06-23 16:21:51 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-06-23 16:21:51 +0200
commit8e0c064ef49541672a598625155a4fec6f80777c (patch)
tree5b075c81443ffb03085dba82476ad510d2f3ef85 /prog/encodingexec.go
parente5d10a43278b10875ef0a80be4af2d1b5692c1c9 (diff)
prog: simplify execContext.write
Diffstat (limited to 'prog/encodingexec.go')
-rw-r--r--prog/encodingexec.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/prog/encodingexec.go b/prog/encodingexec.go
index 2295bb72e..e97ea610c 100644
--- a/prog/encodingexec.go
+++ b/prog/encodingexec.go
@@ -20,8 +20,6 @@
package prog
import (
- "bytes"
- "encoding/binary"
"fmt"
"sort"
)
@@ -223,9 +221,7 @@ func (w *execContext) write(v uint64) {
w.eof = true
return
}
- buf := new(bytes.Buffer)
- binary.Write(buf, HostEndian, v)
- copy(w.buf, buf.Bytes())
+ HostEndian.PutUint64(w.buf, v)
w.buf = w.buf[8:]
}