X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fstr%2Fstr.h;h=d919b84d49be3cf3a7c7435ffd9822fc17632363;hb=e16fc94bd8f80800d5203d9182cb3c5224528b0a;hp=f9326085ae8da0a2c7bfcff51a8855570d1eb7e8;hpb=39150ca863ea2aed45f732346aa23714009a034b;p=ccan diff --git a/ccan/str/str.h b/ccan/str/str.h index f9326085..d919b84d 100644 --- a/ccan/str/str.h +++ b/ccan/str/str.h @@ -1,4 +1,4 @@ -/* Placed into the public domain. */ +/* CC0 (Public domain) - see LICENSE file for details */ #ifndef CCAN_STR_H #define CCAN_STR_H #include "config.h" @@ -94,7 +94,7 @@ size_t strcount(const char *haystack, const char *needle); #if HAVE_TYPEOF /* Only a simple type can have 0 assigned, so test that. */ #define STR_MAX_CHARS_TCHECK_(type_or_expr) \ - ({ typeof(type_or_expr) x = 0; (void)x; 0; }) + (sizeof(({ typeof(type_or_expr) x = 0; x; }))*0) #else #define STR_MAX_CHARS_TCHECK_(type_or_expr) 0 #endif