diff options
author | fabient <fabient@FreeBSD.org> | 2010-06-05 22:57:53 +0000 |
---|---|---|
committer | fabient <fabient@FreeBSD.org> | 2010-06-05 22:57:53 +0000 |
commit | 0ecf60c0b77f328d007521e54b05d0c3c183a117 (patch) | |
tree | de75faa05fc877292b9775274ef012019b77ebe7 /usr.sbin/pmcstat/pmcstat.c | |
parent | 28122090a3c8d73d47366b9bce6059f02763a23b (diff) | |
download | FreeBSD-src-0ecf60c0b77f328d007521e54b05d0c3c183a117.zip FreeBSD-src-0ecf60c0b77f328d007521e54b05d0c3c183a117.tar.gz |
Fix warnings found by Coverity.
Found with: Coverity Prevent(tm)
MFC after: 1 month
Diffstat (limited to 'usr.sbin/pmcstat/pmcstat.c')
-rw-r--r-- | usr.sbin/pmcstat/pmcstat.c | 3 |
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(®, spec, REG_EXTENDED|REG_NOSUB)) != 0) { regerror(rv, ®, errbuf, sizeof(errbuf)); |