From eceeb5bdf1c855d0b3c685f10177bbb309108e44 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sat, 12 Nov 2022 20:59:29 +0800 Subject: [PATCH] fix: build error --- component/process/process_freebsd_amd64.go | 6 +++--- component/process/process_other.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/component/process/process_freebsd_amd64.go b/component/process/process_freebsd_amd64.go index ab8bcf69..ffbe1515 100644 --- a/component/process/process_freebsd_amd64.go +++ b/component/process/process_freebsd_amd64.go @@ -51,17 +51,17 @@ func findProcessName(network string, ip netip.Addr, srcPort int) (*uint32, strin value, err := syscall.Sysctl(spath) if err != nil { - return -1, "", err + return nil, "", err } buf := []byte(value) pid, err := defaultSearcher.Search(buf, ip, uint16(srcPort), isTCP) if err != nil { - return -1, "", err + return nil, "", err } pp, err := getExecPathFromPID(pid) - return -1, pp, err + return nil, pp, err } func getExecPathFromPID(pid uint32) (string, error) { diff --git a/component/process/process_other.go b/component/process/process_other.go index e5cc93cc..32614b26 100644 --- a/component/process/process_other.go +++ b/component/process/process_other.go @@ -5,7 +5,7 @@ package process import "net/netip" func findProcessName(network string, ip netip.Addr, srcPort int) (*uint32, string, error) { - return -1, "", ErrPlatformNotSupport + return nil, "", ErrPlatformNotSupport } func resolveSocketByNetlink(network string, ip netip.Addr, srcPort int) (uint32, uint32, error) {