Blame SOURCES/net-snmp-5.7.2-proc-whitespace.patch

965de0
diff -urNp a/agent/mibgroup/host/data_access/swrun_procfs_status.c b/agent/mibgroup/host/data_access/swrun_procfs_status.c
965de0
--- a/agent/mibgroup/host/data_access/swrun_procfs_status.c	2020-06-04 13:58:26.944876713 +0200
965de0
+++ b/agent/mibgroup/host/data_access/swrun_procfs_status.c	2020-06-04 14:01:36.146665629 +0200
965de0
@@ -57,7 +57,7 @@ netsnmp_arch_swrun_container_load( netsn
965de0
     FILE                *fp;
965de0
     int                  pid, i;
965de0
     unsigned long long   cpu;
965de0
-    char                 buf[BUFSIZ], buf2[BUFSIZ], *cp;
965de0
+    char                 buf[BUFSIZ], buf2[BUFSIZ], *cp, *cp1;
965de0
     netsnmp_swrun_entry *entry;
965de0
     
965de0
     procdir = opendir("/proc");
965de0
@@ -169,8 +169,12 @@ netsnmp_arch_swrun_container_load( netsn
965de0
         cp = buf;
965de0
         while ( ' ' != *(cp++))    /* Skip first field */
965de0
             ;
965de0
-        while ( ' ' != *(cp++))    /* Skip second field */
965de0
-            ;
965de0
+        cp1 = cp;                  /* Skip second field */
965de0
+        while (*cp1) {
965de0
+            if (*cp1 == ')') cp = cp1;
965de0
+            cp1++;
965de0
+        }
965de0
+        cp += 2;
965de0
         
965de0
         switch (*cp) {
965de0
         case 'R':  entry->hrSWRunStatus = HRSWRUNSTATUS_RUNNING;