summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmcstat/pmcstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pmcstat/pmcstat.c')
-rw-r--r--usr.sbin/pmcstat/pmcstat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index 89ec8f0..9587529 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -292,7 +292,8 @@ pmcstat_find_targets(const char *spec)
0, &nproc)) == NULL)
err(EX_OSERR, "ERROR: Cannot get process list: %s",
kvm_geterr(pmcstat_kvm));
- }
+ } else
+ nproc = 0;
if ((rv = regcomp(&reg, spec, REG_EXTENDED|REG_NOSUB)) != 0) {
regerror(rv, &reg, errbuf, sizeof(errbuf));
OpenPOWER on IntegriCloud