X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest_override.h;h=a97d4e1723654fc5c5efa8e3b15491446a3e1c7e;hp=236441fcfc78e74c6dd632308d5bed7eaf4f5223;hb=98ba6e4755c71587feffeacf43f996a22a8e0689;hpb=6c02fd599f5b3f925197c3161ee186a3305fc963 diff --git a/ccan/failtest/failtest_override.h b/ccan/failtest/failtest_override.h index 236441fc..a97d4e17 100644 --- a/ccan/failtest/failtest_override.h +++ b/ccan/failtest/failtest_override.h @@ -17,6 +17,10 @@ #define realloc(ptr, size) \ failtest_realloc((ptr), (size), __FILE__, __LINE__) +#undef free +#define free(ptr) \ + failtest_free(ptr) + /* Replacement of I/O. */ #include #include @@ -48,7 +52,7 @@ failtest_pwrite((fd), (buf), (count), (off), __FILE__, __LINE__) #undef close -#define close(fd) failtest_close(fd) +#define close(fd) failtest_close(fd, __FILE__, __LINE__) #undef fcntl #define fcntl(fd, ...) failtest_fcntl((fd), __FILE__, __LINE__, __VA_ARGS__)