summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-05-19 10:45:28 +0200
committerMatthew Heon <mheon@redhat.com>2022-06-14 13:47:42 -0400
commit31d310a4b1441fb383d4e1cf1ce6d5b17b4c07b5 (patch)
treefeee10b824c32844405d62e63059ae288e0644a3 /pkg/api
parent74ac2dda297eb315254e805c9a5c9b6a7c3eda89 (diff)
downloadpodman-31d310a4b1441fb383d4e1cf1ce6d5b17b4c07b5.tar.gz
podman-31d310a4b1441fb383d4e1cf1ce6d5b17b4c07b5.tar.bz2
podman-31d310a4b1441fb383d4e1cf1ce6d5b17b4c07b5.zip
linter: enable unconvert linter
Detects unneccessary type conversions and helps in keeping the code base cleaner. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/compat/containers.go6
-rw-r--r--pkg/api/handlers/compat/images_build.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go
index 1c339730e..e3d51fadf 100644
--- a/pkg/api/handlers/compat/containers.go
+++ b/pkg/api/handlers/compat/containers.go
@@ -254,7 +254,7 @@ func KillContainer(w http.ResponseWriter, r *http.Request) {
utils.InternalServerError(w, err)
return
}
- if sig == 0 || syscall.Signal(sig) == syscall.SIGKILL {
+ if sig == 0 || sig == syscall.SIGKILL {
opts := entities.WaitOptions{
Condition: []define.ContainerStatus{define.ContainerStateExited, define.ContainerStateStopped},
Interval: time.Millisecond * 250,
@@ -341,8 +341,8 @@ func LibpodToContainer(l *libpod.Container, sz bool) (*handlers.Container, error
for idx, portMapping := range portMappings {
ports[idx] = types.Port{
IP: portMapping.HostIP,
- PrivatePort: uint16(portMapping.ContainerPort),
- PublicPort: uint16(portMapping.HostPort),
+ PrivatePort: portMapping.ContainerPort,
+ PublicPort: portMapping.HostPort,
Type: portMapping.Protocol,
}
}
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index f0d07f492..da5216040 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -568,7 +568,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
Output: output,
OutputFormat: format,
PullPolicy: pullPolicy,
- PullPushRetryDelay: time.Duration(2 * time.Second),
+ PullPushRetryDelay: 2 * time.Second,
Quiet: query.Quiet,
Registry: registry,
RemoveIntermediateCtrs: query.Rm,