aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/common
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2021-03-28 00:36:44 +0000
committerMark Johnston <markj@FreeBSD.org>2021-03-28 00:37:12 +0000
commit3c065eeaa7a5ebb56991f5c8123e343a83bf0f0d (patch)
tree14b61d17d386ab00af51f58c4d6eccd3c179ddcb /cddl/contrib/opensolaris/common
parent6a762cfae145625e491528531709145c76228870 (diff)
downloadsrc-3c065eeaa7a5ebb56991f5c8123e343a83bf0f0d.tar.gz
src-3c065eeaa7a5ebb56991f5c8123e343a83bf0f0d.zip
libctf: Adjust logic to match upstream after 410556f1f
No functional change intended. Suggested by: jrtc27 MFC after: 1 week
Diffstat (limited to 'cddl/contrib/opensolaris/common')
-rw-r--r--cddl/contrib/opensolaris/common/ctf/ctf_lookup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cddl/contrib/opensolaris/common/ctf/ctf_lookup.c b/cddl/contrib/opensolaris/common/ctf/ctf_lookup.c
index 5912cc1a36e8..cd9c71436938 100644
--- a/cddl/contrib/opensolaris/common/ctf/ctf_lookup.c
+++ b/cddl/contrib/opensolaris/common/ctf/ctf_lookup.c
@@ -132,9 +132,9 @@ ctf_lookup_by_name(ctf_file_t *fp, const char *name)
continue; /* skip qualifier keyword */
for (lp = fp->ctf_lookups; lp->ctl_prefix != NULL; lp++) {
- if ((size_t)(q - p) >= lp->ctl_len &&
- (lp->ctl_prefix[0] == '\0' ||
- strncmp(p, lp->ctl_prefix, (size_t)(q - p)) == 0)) {
+ if (lp->ctl_prefix[0] == '\0' ||
+ ((size_t)(q - p) >= lp->ctl_len && strncmp(p,
+ lp->ctl_prefix, (size_t)(q - p)) == 0)) {
for (p += lp->ctl_len; isspace(*p); p++)
continue; /* skip prefix and next ws */