diff options
Diffstat (limited to 'src/lib/mhd_assert.h')
-rw-r--r-- | src/lib/mhd_assert.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/mhd_assert.h b/src/lib/mhd_assert.h index c720ce5c..e99632d0 100644 --- a/src/lib/mhd_assert.h +++ b/src/lib/mhd_assert.h | |||
@@ -28,21 +28,21 @@ | |||
28 | 28 | ||
29 | #include "mhd_options.h" | 29 | #include "mhd_options.h" |
30 | #ifdef NDEBUG | 30 | #ifdef NDEBUG |
31 | # define mhd_assert(ignore) ((void)0) | 31 | # define mhd_assert(ignore) ((void) 0) |
32 | #else /* _DEBUG */ | 32 | #else /* _DEBUG */ |
33 | # ifdef HAVE_ASSERT | 33 | # ifdef HAVE_ASSERT |
34 | # include <assert.h> | 34 | # include <assert.h> |
35 | # define mhd_assert(CHK) assert(CHK) | 35 | # define mhd_assert(CHK) assert (CHK) |
36 | # else /* ! HAVE_ASSERT */ | 36 | # else /* ! HAVE_ASSERT */ |
37 | # include <stdio.h> | 37 | # include <stdio.h> |
38 | # include <stdlib.h> | 38 | # include <stdlib.h> |
39 | # define mhd_assert(CHK) \ | 39 | # define mhd_assert(CHK) \ |
40 | do { \ | 40 | do { \ |
41 | if (!(CHK)) { \ | 41 | if (! (CHK)) { \ |
42 | fprintf(stderr, "%s:%u Assertion failed: %s\nProgram aborted.\n", \ | 42 | fprintf (stderr, "%s:%u Assertion failed: %s\nProgram aborted.\n", \ |
43 | __FILE__, (unsigned)__LINE__, #CHK); \ | 43 | __FILE__, (unsigned) __LINE__, #CHK); \ |
44 | fflush(stderr); abort(); } \ | 44 | fflush (stderr); abort (); } \ |
45 | } while(0) | 45 | } while (0) |
46 | # endif /* ! HAVE_ASSERT */ | 46 | # endif /* ! HAVE_ASSERT */ |
47 | #endif /* _DEBUG */ | 47 | #endif /* _DEBUG */ |
48 | 48 | ||