igt: Tweak the igt_assert_cmpint macro

Minor tweak to embed the constant format string rather than passing it
to the vararg printf.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-08-29 17:30:40 +01:00
parent fbfa754e8d
commit d28b9d27bf

View File

@ -281,7 +281,7 @@ void igt_exit(void) __attribute__((noreturn));
if (__n1 cmp __n2) ; else \
__igt_fail_assert(99, __FILE__, __LINE__, __func__, \
#n1 " " #cmp " " #n2, \
"error: %d %s %d\n", __n1, #ncmp, __n2); \
"error: %d " #ncmp " %d\n", __n1, __n2); \
} while (0)
#define igt_assert_cmpuint(n1, cmp, ncmp, n2) \
@ -290,7 +290,7 @@ void igt_exit(void) __attribute__((noreturn));
if (__n1 cmp __n2) ; else \
__igt_fail_assert(99, __FILE__, __LINE__, __func__, \
#n1 " " #cmp " " #n2, \
"error: %#x %s %#x\n", __n1, #ncmp, __n2); \
"error: %#x " #ncmp " %#x\n", __n1, __n2); \
} while (0)
/**