changeset 253:f671aebbfcaa

assertions don't have error messages, so set errno=0
author mortenp
date Mon, 21 Jun 2004 03:26:27 +1000
parents cb82e382abae
children 31a34f710c27
files include/mlmmj.h
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/include/mlmmj.h	Mon Jun 21 03:21:07 2004 +1000
+++ b/include/mlmmj.h	Mon Jun 21 03:26:27 2004 +1000
@@ -56,6 +56,7 @@
 void print_version(const char *prg);
 
 #define MY_ASSERT(expression) if (!(expression)) { \
+			errno = 0; \
 			log_error(LOG_ARGS, "assertion failed"); \
 			exit(EXIT_FAILURE); \
 		}