From c9735ef75b428876c2a7c7a561a7a178edded73e Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> 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 ff83875..d883b29 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