@@ -682,7 +682,7 @@ func (c *HostCollector) GetSystemInfo() (*collector.SystemInfo, error) {
682682 lines := strings .Split (string (data ), "\n " )
683683 for i , line := range lines {
684684 // Find the Tcp: header line
685- if strings .HasPrefix (line , "Tcp:" ) && ! strings .Contains (line , " " ) == false {
685+ if strings .HasPrefix (line , "Tcp:" ) && strings .Contains (line , " " ) {
686686 // Check if this is the header line (contains column names)
687687 if strings .Contains (line , "RtoAlgorithm" ) {
688688 // Next line contains values
@@ -831,12 +831,10 @@ func (c *HostCollector) GetSystemInfo() (*collector.SystemInfo, error) {
831831
832832 // System calls - aggregate from all processes' /proc/[pid]/io
833833 // This counts read (syscr) and write (syscw) system calls
834- if procs != nil {
835- for _ , p := range procs {
836- ioCounters , err := p .IOCounters ()
837- if err == nil {
838- info .SystemCalls += ioCounters .ReadCount + ioCounters .WriteCount
839- }
834+ for _ , p := range procs {
835+ ioCounters , err := p .IOCounters ()
836+ if err == nil {
837+ info .SystemCalls += ioCounters .ReadCount + ioCounters .WriteCount
840838 }
841839 }
842840 }
0 commit comments