From e5baae9bd07181f9e640eac87acf6cf6117f576f Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 23 Aug 2023 14:50:04 +0200 Subject: [PATCH] Implement review suggestions --- network/dns.go | 2 +- process/process.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/network/dns.go b/network/dns.go index b1f729c7..4f481b32 100644 --- a/network/dns.go +++ b/network/dns.go @@ -87,7 +87,7 @@ func GetDNSRequestConnection(packetInfo *packet.Info) (conn *Connection, ok bool defer dnsRequestConnectionsLock.RUnlock() conn, ok = dnsRequestConnections[key] - return + return conn, ok } // deleteDNSRequestConnection removes a connection from the dns request connections. diff --git a/process/process.go b/process/process.go index 934c195c..cb34ae32 100644 --- a/process/process.go +++ b/process/process.go @@ -112,8 +112,8 @@ func (p *Process) IsIdentified() bool { } } -// IsLocal returns whether the process has been identified as a local process. -func (p *Process) IsLocal() bool { +// HasValidPID returns whether the process has valid PID of an actual process. +func (p *Process) HasValidPID() bool { // Check if process exists. if p == nil { return false