diff options
Diffstat (limited to 'vm')
| -rw-r--r-- | vm/proxyapp/proxyappclient.go | 4 | ||||
| -rw-r--r-- | vm/qemu/qemu.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vm/proxyapp/proxyappclient.go b/vm/proxyapp/proxyappclient.go index 32a0b0b96..cbd731550 100644 --- a/vm/proxyapp/proxyappclient.go +++ b/vm/proxyapp/proxyappclient.go @@ -335,7 +335,7 @@ func (proxy *ProxyApp) doLogPooling(writer io.Writer) { return } if log.V(reply.Verbosity) { - writer.Write([]byte(fmt.Sprintf("ProxyAppLog: %v", reply.Log))) + fmt.Fprintf(writer, "ProxyAppLog: %v", reply.Log) } } } @@ -591,7 +591,7 @@ type stdInOutCloser struct { func clientErrorf(writer io.Writer) func(fmt string, s ...interface{}) { return func(f string, s ...interface{}) { - writer.Write([]byte(fmt.Sprintf(f, s...))) + fmt.Fprintf(writer, f, s) writer.Write([]byte("\nSYZFAIL: proxy app plugin error\n")) } } diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go index ba1ecf979..3bf546aa2 100644 --- a/vm/qemu/qemu.go +++ b/vm/qemu/qemu.go @@ -335,7 +335,7 @@ func (pool *Pool) Create(workdir string, index int) (vmimpl.Instance, error) { return nil, err } initFile := filepath.Join(workdir, "init.sh") - if err := osutil.WriteExecFile(initFile, []byte(strings.Replace(initScript, "{{KEY}}", sshkey, -1))); err != nil { + if err := osutil.WriteExecFile(initFile, []byte(strings.ReplaceAll(initScript, "{{KEY}}", sshkey))); err != nil { return nil, fmt.Errorf("failed to create init file: %w", err) } } |
