From b2d27b9a463713808c33dc26fafbaf310f23d8ae Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Tue, 25 Aug 2020 22:36:38 +0800 Subject: [PATCH] Fix: static check --- rules/process_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/process_linux.go b/rules/process_linux.go index ff838750..d883b295 100644 --- a/rules/process_linux.go +++ b/rules/process_linux.go @@ -257,7 +257,7 @@ func resolveProcessNameByProcSearch(inode, uid int) (string, error) { continue } - if bytes.Compare(buffer[:n], socket) == 0 { + if bytes.Equal(buffer[:n], socket) { cmdline, err := ioutil.ReadFile(path.Join(processPath, "cmdline")) if err != nil { return "", err