diff --git a/cmd/auth-rpc-client.go b/cmd/auth-rpc-client.go index cb5cad7b4..c397de20b 100644 --- a/cmd/auth-rpc-client.go +++ b/cmd/auth-rpc-client.go @@ -180,7 +180,7 @@ func (authClient *AuthRPCClient) Call(serviceMethod string, args interface { err = authClient.rpc.Call(serviceMethod, args, reply) // Invalidate token, and mark it for re-login on subsequent reconnect. - if err != nil && err == rpc.ErrShutdown { + if err == rpc.ErrShutdown { authClient.mu.Lock() authClient.isLoggedIn = false authClient.mu.Unlock() diff --git a/cmd/posix-errors.go b/cmd/posix-errors.go index 74dbea72c..deed81c5a 100644 --- a/cmd/posix-errors.go +++ b/cmd/posix-errors.go @@ -24,22 +24,22 @@ import ( // Function not implemented error func isSysErrNoSys(err error) bool { - return err != nil && err == syscall.ENOSYS + return err == syscall.ENOSYS } // Not supported error func isSysErrOpNotSupported(err error) bool { - return err != nil && err == syscall.EOPNOTSUPP + return err == syscall.EOPNOTSUPP } // No space left on device error func isSysErrNoSpace(err error) bool { - return err != nil && err == syscall.ENOSPC + return err == syscall.ENOSPC } // Input/output error func isSysErrIO(err error) bool { - return err != nil && err == syscall.EIO + return err == syscall.EIO } // Check if the given error corresponds to ENOTDIR (is not a directory).