summaryrefslogtreecommitdiffstats
path: root/net-mgmt/net-snmp/files/patch-hr_system.c
blob: ee1f01228bfd690ee58b5e78708f995c20438d36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- agent/mibgroup/host/hr_system.c.orig	Fri Nov 14 14:45:55 2003
+++ agent/mibgroup/host/hr_system.c	Fri Nov 14 14:46:01 2003
@@ -276,11 +276,10 @@
     struct utmp    *utmp_p;
 #endif
 
+#ifndef UTMP_HAS_NO_TYPE
     setutent();
     while ((utmp_p = getutent()) != NULL) {
-#ifndef UTMP_HAS_NO_TYPE
         if (utmp_p->ut_type == USER_PROCESS) {
-#endif
             /* This block of code fixes zombie user PIDs in the
                utmp/utmpx file that would otherwise be counted as a
                current user */
@@ -293,6 +292,7 @@
         }
     }
     endutent();
+#endif
     return total;
 }
 
OpenPOWER on IntegriCloud