diff options
author | ahl <none@none> | 2007-06-29 11:12:38 -0700 |
---|---|---|
committer | ahl <none@none> | 2007-06-29 11:12:38 -0700 |
commit | 9e8164f5f5658c6e38a931780d499f5cb622908a (patch) | |
tree | 39ad8fe0df421162aac560afe7525e758e7ec5f9 /usr/src/lib/libdtrace/common/dt_ident.c | |
parent | 750ba2244c23d03e3f43b4967911885b36bbac55 (diff) | |
download | illumos-joyent-9e8164f5f5658c6e38a931780d499f5cb622908a.tar.gz |
PSARC 2007/153 iSCSI target provider
6498786 the iSCSI target's SMF stop method takes too long
6573073 usdt args[] are incorrectly translated
6573074 PSARC 2007/153 iSCSI target provider
6573077 iscsitgtd should be compiled with CTF data
6574850 dt_idhash_iter() needs to cache the array length
Diffstat (limited to 'usr/src/lib/libdtrace/common/dt_ident.c')
-rw-r--r-- | usr/src/lib/libdtrace/common/dt_ident.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/src/lib/libdtrace/common/dt_ident.c b/usr/src/lib/libdtrace/common/dt_ident.c index 50f00026b4..c437e0ab03 100644 --- a/usr/src/lib/libdtrace/common/dt_ident.c +++ b/usr/src/lib/libdtrace/common/dt_ident.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -840,13 +840,14 @@ dt_idhash_iter(dt_idhash_t *dhp, dt_idhash_f *func, void *data) { dt_ident_t **ids; dt_ident_t *idp; - ulong_t i, j; + ulong_t i, j, n; int rv; if (dhp->dh_tmpl != NULL) dt_idhash_populate(dhp); /* fill hash w/ initial population */ - ids = alloca(sizeof (dt_ident_t *) * dhp->dh_nelems); + n = dhp->dh_nelems; + ids = alloca(sizeof (dt_ident_t *) * n); for (i = 0, j = 0; i < dhp->dh_hashsz; i++) { for (idp = dhp->dh_hash[i]; idp != NULL; idp = idp->di_next) @@ -855,7 +856,7 @@ dt_idhash_iter(dt_idhash_t *dhp, dt_idhash_f *func, void *data) qsort(ids, dhp->dh_nelems, sizeof (dt_ident_t *), dt_idhash_comp); - for (i = 0; i < dhp->dh_nelems; i++) { + for (i = 0; i < n; i++) { if ((rv = func(dhp, ids[i], data)) != 0) return (rv); } |