diff options
author | Dean Deng <deandeng@google.com> | 2020-10-05 19:03:04 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-05 19:05:26 -0700 |
commit | a1df7f2ed1be5cb170218c3e127a9b5f51a314fd (patch) | |
tree | 350991a1c2dba70306fb8544bfab862707b234f6 /pkg/sentry/kernel/kcov.go | |
parent | 9e64b9f3a5c162e8cb79096fef9e502d7e9af463 (diff) |
Simplify nil assignment in kcov.
PiperOrigin-RevId: 335548610
Diffstat (limited to 'pkg/sentry/kernel/kcov.go')
-rw-r--r-- | pkg/sentry/kernel/kcov.go | 4 |
1 files changed, 1 insertions, 3 deletions
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 |