diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-06-23 16:21:51 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-06-23 16:21:51 +0200 |
| commit | 8e0c064ef49541672a598625155a4fec6f80777c (patch) | |
| tree | 5b075c81443ffb03085dba82476ad510d2f3ef85 /prog/encodingexec.go | |
| parent | e5d10a43278b10875ef0a80be4af2d1b5692c1c9 (diff) | |
prog: simplify execContext.write
Diffstat (limited to 'prog/encodingexec.go')
| -rw-r--r-- | prog/encodingexec.go | 6 |
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:] } |
