From ab0fdfef52b4770f8039c0871ff514e079a09a4c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 21 Jun 2013 10:02:26 -0700 Subject: [PATCH] Fix ASSERT0 and VERIFY0 macro typo Ensure the value is cast to a 'long long' for printing purposes. The expectation is that ASSERT0/VERIFY0 are mostly used for validating return values and thus may commonly be negative. Signed-off-by: Brian Behlendorf Issue #246 --- include/sys/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index ac716c9a0..f3f3529a9 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -81,7 +81,7 @@ do { \ #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ (unsigned long long)) #define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) -#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (uint64_t)) +#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long)) #define ASSERT3S(x,y,z) ((void)0) #define ASSERT3U(x,y,z) ((void)0) @@ -134,7 +134,7 @@ do { \ #define VERIFY3U(x,y,z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \ (unsigned long long)) #define VERIFY3P(x,y,z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *)) -#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (uint64_t)) +#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long)) #define ASSERT3S(x,y,z) VERIFY3S(x, y, z) #define ASSERT3U(x,y,z) VERIFY3U(x, y, z) -- 2.40.0