]> granicus.if.org Git - strace/commitdiff
util: check dflt argument for NULL in printxvals
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sun, 27 Nov 2016 15:03:38 +0000 (18:03 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 29 Nov 2016 00:22:05 +0000 (00:22 +0000)
This is necessary for the upcoming change in the output format
of the val3 argument of the FUTEX_WAKE_OP futex command.

* util.c (printxvals): Do not print dflt if it is NULL.

util.c

diff --git a/util.c b/util.c
index f80fd6e95e2d224ed4995e17b2a9a946df34c16d..57557f3963d32e99a155a5a42cfcdd5129cc88fe 100644 (file)
--- a/util.c
+++ b/util.c
@@ -238,7 +238,9 @@ printxvals(const uint64_t val, const char *dflt, const struct xlat *xlat, ...)
                }
        }
        /* No hits -- print raw # instead. */
-       tprintf("%#" PRIx64 " /* %s */", val, dflt);
+       tprintf("%#" PRIx64, val);
+       if (dflt)
+               tprintf(" /* %s */", dflt);
 
        va_end(args);
 }