From: Mark Wooding Date: Sat, 14 May 2016 18:31:11 +0000 (+0100) Subject: utils/t/exc-test.c: Print null pointers in a consistent way. X-Git-Tag: 2.2.3~4 X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/commitdiff_plain/caef48c75718f52b35665bb80306f8d0ee2e6204 utils/t/exc-test.c: Print null pointers in a consistent way. Cygwin prints `0x0' instead of `(nil)'. Fortunately, this is the only pointer value we can reliably check for, so handle this ourselves. --- diff --git a/utils/t/exc-test.c b/utils/t/exc-test.c index ba74b94..89701bf 100644 --- a/utils/t/exc-test.c +++ b/utils/t/exc-test.c @@ -35,7 +35,10 @@ int main(void) printf("%lu exception (val = %i)\n", exc_type, exc_i); break; } END_TRY; - printf("hello! __exc_list = %p\n", (void *)__exc_list); + printf("hello! __exc_list = "); + if (__exc_list) printf("%p", (void *)__exc_list); + else printf("(nil)"); + putchar('\n'); return (0); }