chiark
/
gitweb
/
~mdw
/
mLib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
47aaceb
)
utils/t/exc-test.c: Print null pointers in a consistent way.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 14 May 2016 18:31:11 +0000
(19:31 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 16 May 2016 00:32:29 +0000
(
01:32
+0100)
Cygwin prints `0x0' instead of `(nil)'. Fortunately, this is the only
pointer value we can reliably check for, so handle this ourselves.
utils/t/exc-test.c
patch
|
blob
|
blame
|
history
diff --git
a/utils/t/exc-test.c
b/utils/t/exc-test.c
index ba74b949ebec62ace0d85d72bc169d3faa4d0807..89701bfd223b66580e69901bf450fa38aa61acd7 100644
(file)
--- 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);
}