summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmcstat/pmcstat.c
diff options
context:
space:
mode:
authorfabient <fabient@FreeBSD.org>2010-06-05 22:57:53 +0000
committerfabient <fabient@FreeBSD.org>2010-06-05 22:57:53 +0000
commit0ecf60c0b77f328d007521e54b05d0c3c183a117 (patch)
treede75faa05fc877292b9775274ef012019b77ebe7 /usr.sbin/pmcstat/pmcstat.c
parent28122090a3c8d73d47366b9bce6059f02763a23b (diff)
downloadFreeBSD-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.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