From 57730252f03322912e6d37cfb96233863b464495 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Sat, 6 Jan 2024 22:26:22 +0300 Subject: [PATCH] reverse-ramdisk.c: define `DBG_PRINT` if `TEST` is defined --- c-programming/reverse-ramdisk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/c-programming/reverse-ramdisk.c b/c-programming/reverse-ramdisk.c index da5a4d1..4177401 100644 --- a/c-programming/reverse-ramdisk.c +++ b/c-programming/reverse-ramdisk.c @@ -32,12 +32,16 @@ #ifdef DEBUG # define LINE_FAIL(x) printf("failed on line %d\n", __LINE__ + x) +#else +# define LINE_FAIL(x) +#endif + +#if defined(DEBUG) || defined(TEST) # define DBG_PRINT(...) do { \ printf(__VA_ARGS__); \ fflush(stdout); \ } while (0) #else -# define LINE_FAIL(x) # define DBG_PRINT(...) #endif