X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fbuild_assert%2Fbuild_assert.h;h=24e59c44cd930173178ac9b6e101b0af64a879e9;hp=c6ee362f2299933160a552484434f911c713a290;hb=3f4e83d8ac847d6bf0c20e88cdbca535e842a97b;hpb=a1d048552e7c9cbd07092cefb87204563a807608;ds=sidebyside diff --git a/ccan/build_assert/build_assert.h b/ccan/build_assert/build_assert.h index c6ee362f..24e59c44 100644 --- a/ccan/build_assert/build_assert.h +++ b/ccan/build_assert/build_assert.h @@ -22,7 +22,7 @@ do { (void) sizeof(char [1 - 2*!(cond)]); } while(0) /** - * EXPR_BUILD_ASSERT - assert a build-time dependency, as an expression. + * BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression. * @cond: the compile-time condition which must be true. * * Your compile will fail if the condition isn't true, or can't be evaluated @@ -31,9 +31,9 @@ * Example: * #define foo_to_char(foo) \ * ((char *)(foo) \ - * + EXPR_BUILD_ASSERT(offsetof(struct foo, string) == 0)) + * + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0)) */ -#define EXPR_BUILD_ASSERT(cond) \ +#define BUILD_ASSERT_OR_ZERO(cond) \ (sizeof(char [1 - 2*!(cond)]) - 1) #endif /* CCAN_BUILD_ASSERT_H */