From 5bc766bce29ca069432f1f5a92d3ac328001d14a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 17 Mar 2012 11:41:04 +0100 Subject: [PATCH] processes plugin: Minimize whitespace-only changes. --- src/processes.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/processes.c b/src/processes.c index 3822d42c..518419f4 100644 --- a/src/processes.c +++ b/src/processes.c @@ -1580,11 +1580,10 @@ static int ps_read (void) kvm_t *kd; char errbuf[1024]; struct kinfo_proc *procs; /* array of processes */ + struct kinfo_proc *proc_ptr = NULL; int count; /* returns number of processes */ int i; - struct kinfo_proc *proc_ptr = NULL; - procstat_t *ps_ptr; procstat_entry_t pse; @@ -1598,6 +1597,7 @@ static int ps_read (void) errbuf); return (0); } + /* Get the list of processes. */ procs = kvm_getprocs(kd, KERN_PROC_ALL, 0, &count); if (procs == NULL) @@ -1696,10 +1696,10 @@ static int ps_read (void) case SLOCK: blocked++; break; case SZOMB: zombies++; break; } - } kvm_close(kd); + ps_submit_state ("running", running); ps_submit_state ("sleeping", sleeping); ps_submit_state ("zombies", zombies); @@ -1707,6 +1707,7 @@ static int ps_read (void) ps_submit_state ("blocked", blocked); ps_submit_state ("idle", idle); ps_submit_state ("wait", wait); + for (ps_ptr = list_head_g; ps_ptr != NULL; ps_ptr = ps_ptr->next) ps_submit_proc_list (ps_ptr); /* #endif HAVE_LIBKVM_GETPROCS && HAVE_STRUCT_KINFO_PROC_FREEBSD */ -- 2.11.0