summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2014-11-25 07:01:38 +0000
committermarkj <markj@FreeBSD.org>2014-11-25 07:01:38 +0000
commit2908ba9589f4cbb5a2faafeeb724d647610dae05 (patch)
tree4ebdf232e106f38b68209c46e5bbc39476954158 /cddl
parentf9f6c7d3fe74511a721d7c49086c8df9d610aacc (diff)
downloadFreeBSD-src-2908ba9589f4cbb5a2faafeeb724d647610dae05.zip
FreeBSD-src-2908ba9589f4cbb5a2faafeeb724d647610dae05.tar.gz
Adjust some checks missed in r274637, now that pi_rname can be NULL.
Additionally fix a misparenthesization in the same check, noticed while fixing the first bug. This bug only appears to cause problems if the same USDT probe appears twice within a static function. X-MFC-With: r274637
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c
index 6acb86b..cd8ceb6 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c
@@ -545,8 +545,9 @@ dt_probe_define(dt_provider_t *pvp, dt_probe_t *prp,
for (pip = prp->pr_inst; pip != NULL; pip = pip->pi_next) {
if (strcmp(pip->pi_fname, fname) == 0 &&
- ((rname == NULL && pip->pi_rname[0] == '\0') ||
- (rname != NULL && strcmp(pip->pi_rname, rname)) == 0))
+ ((rname == NULL && pip->pi_rname == NULL) ||
+ (rname != NULL && pip->pi_rname != NULL &&
+ strcmp(pip->pi_rname, rname) == 0)))
break;
}
OpenPOWER on IntegriCloud