linter: enable unconvert linter

Detects unneccessary type conversions and helps in keeping the code base
cleaner.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-05-19 10:45:28 +02:00
parent 7093885df7
commit b22143267b
22 changed files with 38 additions and 39 deletions

View File

@ -192,7 +192,7 @@ func moveProcessPIDFileToScope(pidPath, slice, scope string) error {
}
func moveProcessToScope(pid int, slice, scope string) error {
err := RunUnderSystemdScope(int(pid), slice, scope)
err := RunUnderSystemdScope(pid, slice, scope)
// If the PID is not valid anymore, do not return an error.
if dbusErr, ok := err.(dbus.Error); ok {
if dbusErr.Name == "org.freedesktop.DBus.Error.UnixProcessIdUnknown" {