From a1df7f2ed1be5cb170218c3e127a9b5f51a314fd Mon Sep 17 00:00:00 2001 From: Dean Deng Date: Mon, 5 Oct 2020 19:03:04 -0700 Subject: Simplify nil assignment in kcov. PiperOrigin-RevId: 335548610 --- pkg/sentry/kernel/kcov.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pkg') diff --git a/pkg/sentry/kernel/kcov.go b/pkg/sentry/kernel/kcov.go index 90ceb5ef5..060c056df 100644 --- a/pkg/sentry/kernel/kcov.go +++ b/pkg/sentry/kernel/kcov.go @@ -215,9 +215,7 @@ func (kcov *Kcov) Clear() { func (kcov *Kcov) clearLocked() { kcov.mode = linux.KCOV_MODE_INIT kcov.owningTask = nil - if kcov.mappable != nil { - kcov.mappable = nil - } + kcov.mappable = nil } // OnTaskExit is called when the owning task exits. It is similar to -- cgit v1.2.3