diff options
| author | William Casarin <jb55@jb55.com> | 2018-07-09 22:28:25 -0700 |
|---|---|---|
| committer | William Casarin <jb55@jb55.com> | 2018-07-09 22:31:48 -0700 |
| commit | 9593fc545950782ed75f12f53238b07885559b2b (patch) | |
| tree | 9c7c2f7cbb427c54e9184cb61eedce737a6cbc6f /ccan/tal/test/run-free.c | |
| parent | bd8c223756d2f912526ecef53bae0cc8e0c63442 (diff) | |
remove ccan for now
Diffstat (limited to 'ccan/tal/test/run-free.c')
| -rw-r--r-- | ccan/tal/test/run-free.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/ccan/tal/test/run-free.c b/ccan/tal/test/run-free.c deleted file mode 100644 index 37d03cd..0000000 --- a/ccan/tal/test/run-free.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <ccan/tal/tal.h> -#include <ccan/tal/tal.c> -#include <ccan/tap/tap.h> - -static void destroy_errno(char *p UNNEEDED) -{ - /* Errno restored for all the destructors. */ - ok1(errno == EINVAL); - errno = ENOENT; -} - -int main(void) -{ - char *p; - - plan_tests(5); - - p = tal(NULL, char); - ok1(tal_add_destructor(p, destroy_errno)); - ok1(tal_add_destructor(p, destroy_errno)); - - /* Errno save/restored across free. */ - errno = EINVAL; - tal_free(p); - ok1(errno == EINVAL); - - tal_cleanup(); - return exit_status(); -} |
