From d91800c88d43da53fb8c6c75f693b821da9ed0b1 Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 28 Dec 2012 04:47:50 +0000 Subject: [PATCH] =?UTF-8?q?RT=E2=80=99s=20build=20logs=20show=20that=20do{?= =?UTF-8?q?}while(0)=20is=20better=20than=20functional=20programming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sh.h b/sh.h index 8a3542f..3aeb06e 100644 --- a/sh.h +++ b/sh.h @@ -164,7 +164,7 @@ #endif #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.623 2012/12/28 03:35:34 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.624 2012/12/28 04:47:50 tg Exp $"); #endif #define MKSH_VERSION "R41 2012/12/27" @@ -503,9 +503,9 @@ char *ucstrstr(char *, const char *); #endif #if defined(DEBUG) || defined(__COVERITY__) -#define mkssert(e) ((e) ? (void)0 : exit(255)) +#define mkssert(e) do { if (!(e)) exit(255); } while (/* CONSTCOND */ 0) #else -#define mkssert(e) ((void)0) +#define mkssert(e) do { } while (/* CONSTCOND */ 0) #endif #if (!defined(MKSH_BUILDMAKEFILE4BSD) && !defined(MKSH_BUILDSH)) || (MKSH_BUILD_R != 419)