Make sure EXIT() can always be used as one statement.
authorRichard Levitte <levitte@openssl.org>
Thu, 28 Nov 2002 18:52:18 +0000 (18:52 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 28 Nov 2002 18:52:18 +0000 (18:52 +0000)
e_os.h

diff --git a/e_os.h b/e_os.h
index d49c6ef7e739c7868be280a2117641186de88873..30008fa781ad63d21fe1b50c3a8da68d5b335bb9 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -220,9 +220,9 @@ extern "C" {
 #  endif
 
 #  if defined(WIN16) && !defined(MONOLITH) && defined(SSLEAY) && defined(_WINEXITNOPERSIST)
-#    define EXIT(n) { if (n == 0) _wsetexit(_WINEXITNOPERSIST); return(n); }
+#    define EXIT(n) do { if (n == 0) _wsetexit(_WINEXITNOPERSIST); return(n); } while(0)
 #  else
-#    define EXIT(n)            return(n);
+#    define EXIT(n)            return(n)
 #  endif
 #  define LIST_SEPARATOR_CHAR ';'
 #  ifndef X_OK
@@ -318,7 +318,7 @@ extern "C" {
 #    define LIST_SEPARATOR_CHAR ':'
 #    define NUL_DEV            "/dev/null"
 #    ifndef MONOLITH
-#      define EXIT(n)          exit(n); return(n)
+#      define EXIT(n)          do { exit(n); return(n); } while(0)
 #    else
 #      define EXIT(n)          return(n)
 #    endif