mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 10:19:04 +00:00
lockstat: Fix construction of comparision predicates
Passing "0x%p" to sprintf results in double "0x" being printed.
This causes a dtrace script compilation failure when "-d" flag
is specified.
Fix that by removing the extraneous "0x".
Reviewed by: markj
Approved by: mw(mentor)
Obtained from: Semihalf
Sponsored by: Alstom
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35690
(cherry picked from commit 9dbacce2d4
)
This commit is contained in:
parent
0627a69cd8
commit
f470bff421
|
@ -606,14 +606,14 @@ predicate_add(char **pred, char *what, char *cmp, uintptr_t value)
|
|||
|
||||
if (*pred[0] != '\0') {
|
||||
if (cmp != NULL) {
|
||||
(void) sprintf(new, "(%s) && (%s %s 0x%p)",
|
||||
(void) sprintf(new, "(%s) && (%s %s %p)",
|
||||
*pred, what, cmp, (void *)value);
|
||||
} else {
|
||||
(void) sprintf(new, "(%s) && (%s)", *pred, what);
|
||||
}
|
||||
} else {
|
||||
if (cmp != NULL) {
|
||||
(void) sprintf(new, "%s %s 0x%p",
|
||||
(void) sprintf(new, "%s %s %p",
|
||||
what, cmp, (void *)value);
|
||||
} else {
|
||||
(void) sprintf(new, "%s", what);
|
||||
|
|
Loading…
Reference in a new issue