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
This commit is contained in:
parent
db4ce668b2
commit
37bf6a2cb7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user