summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi
diff options
context:
space:
mode:
authorPeter Hunt <pehunt@redhat.com>2019-07-22 16:10:02 -0400
committerPeter Hunt <pehunt@redhat.com>2019-07-23 13:29:33 -0400
commit638b73a046e21a2a033e9831cf622e96aa1c8fc9 (patch)
treeda2550fa145ca341a7bd7051ee29ba0e5befc75a /pkg/varlinkapi
parent5bf99a82ff48cd5097182c55fe1347daf793324b (diff)
downloadpodman-638b73a046e21a2a033e9831cf622e96aa1c8fc9.tar.gz
podman-638b73a046e21a2a033e9831cf622e96aa1c8fc9.tar.bz2
podman-638b73a046e21a2a033e9831cf622e96aa1c8fc9.zip
remove unnecessary conversions
Signed-off-by: Peter Hunt <pehunt@redhat.com>
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r--pkg/varlinkapi/containers.go5
-rw-r--r--pkg/varlinkapi/virtwriter/virtwriter.go4
2 files changed, 4 insertions, 5 deletions
diff --git a/pkg/varlinkapi/containers.go b/pkg/varlinkapi/containers.go
index 97eb36014..6e2b26c0e 100644
--- a/pkg/varlinkapi/containers.go
+++ b/pkg/varlinkapi/containers.go
@@ -808,7 +808,7 @@ func (i *LibpodAPI) ExecContainer(call iopodman.VarlinkCall, opts iopodman.ExecO
resizeChan := make(chan remotecommand.TerminalSize)
reader, writer, _, pipeWriter, streams := setupStreams(call)
- //reader, _, _, pipeWriter, streams := setupStreams(call)
+
type ExitCodeError struct {
ExitCode uint32
Error error
@@ -837,8 +837,7 @@ func (i *LibpodAPI) ExecContainer(call iopodman.VarlinkCall, opts iopodman.ExecO
ecErr := <-ecErrChan
- // TODO FIXME prevent all of these conversions
- exitCode := int(ecErr.ExitCode)
+ exitCode := ecErr.ExitCode
if errors.Cause(ecErr.Error) == define.ErrOCIRuntimePermissionDenied {
exitCode = define.ExecErrorCodeCannotInvoke
}
diff --git a/pkg/varlinkapi/virtwriter/virtwriter.go b/pkg/varlinkapi/virtwriter/virtwriter.go
index 8cdedeed8..bde3107df 100644
--- a/pkg/varlinkapi/virtwriter/virtwriter.go
+++ b/pkg/varlinkapi/virtwriter/virtwriter.go
@@ -171,11 +171,11 @@ func Reader(r *bufio.Reader, output, errput, input io.Writer, resize chan remote
}
// HangUp sends message to peer to close connection
-func HangUp(writer *bufio.Writer, ec int) (err error) {
+func HangUp(writer *bufio.Writer, ec uint32) (err error) {
n := 0
msg := make([]byte, 4)
- binary.BigEndian.PutUint32(msg, uint32(ec))
+ binary.BigEndian.PutUint32(msg, ec)
writeQuit := NewVirtWriteCloser(writer, Quit)
if n, err = writeQuit.Write(msg); err != nil {