Date: Tue, 29 May 2018 20:09:35 +0000 (UTC) From: Matt Macy <mmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334349 - head/lib/libpmc Message-ID: <201805292009.w4TK9Zft034722@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmacy Date: Tue May 29 20:09:35 2018 New Revision: 334349 URL: https://svnweb.freebsd.org/changeset/base/334349 Log: libpmc: don't return -1 on success in pmc_allocate Modified: head/lib/libpmc/libpmc.c Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Tue May 29 20:03:24 2018 (r334348) +++ head/lib/libpmc/libpmc.c Tue May 29 20:09:35 2018 (r334349) @@ -2796,9 +2796,9 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, ctrname = strsep(&r, ","); if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) { if (PMC_CALL(PMCALLOCATE, &pmc_config) < 0) { - retval = errno; goto out; } + retval = 0; *pmcid = pmc_config.pm_pmcid; goto out; } else {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805292009.w4TK9Zft034722>