X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fcheck_type%2Fcheck_type.h;h=371fb66471d18149297142298ef281575e1ac34c;hp=884056719cc718eb075acd1a8848c8aef8640265;hb=56023cca5f66a40646a1e807c3d10af6e5913623;hpb=da72623aec30213a593bd23dca80c89416598f75 diff --git a/ccan/check_type/check_type.h b/ccan/check_type/check_type.h index 88405671..371fb664 100644 --- a/ccan/check_type/check_type.h +++ b/ccan/check_type/check_type.h @@ -11,7 +11,7 @@ * argument is of the expected type. No type promotion of the expression is * done: an unsigned int is not the same as an int! * - * check_type() always evaluates to 1. + * check_type() always evaluates to 0. * * If your compiler does not support typeof, then the best we can do is fail * to compile if the sizes of the types are unequal (a less complete check). @@ -54,10 +54,10 @@ #include /* Without typeof, we can only test the sizes. */ #define check_type(expr, type) \ - EXPR_BUILD_ASSERT(sizeof(expr) == sizeof(type)) + BUILD_ASSERT_OR_ZERO(sizeof(expr) == sizeof(type)) #define check_types_match(expr1, expr2) \ - EXPR_BUILD_ASSERT(sizeof(expr1) == sizeof(expr2)) + BUILD_ASSERT_OR_ZERO(sizeof(expr1) == sizeof(expr2)) #endif /* HAVE_TYPEOF */ #endif /* CCAN_CHECK_TYPE_H */