memtest86+: Wrap BAILOUT and BAILR macros in "do {} while (0)" construct

This makes the code look more C-like, which will assist when doing
automated white space adjustments.

Change-Id: I7eaadb50289fc060ad568568496080f26a354156
Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Reviewed-on: https://review.coreboot.org/13951
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
diff --git a/main.c b/main.c
index 5a8a285..a3b08a7 100644
--- a/main.c
+++ b/main.c
@@ -907,7 +907,7 @@
 			/* Switch patterns */
 			s_barrier();
 			movinv1(c_iter,p2,p1, my_ord);
-			BAILOUT
+			BAILOUT;
 		}
 		break;
 
@@ -945,11 +945,11 @@
 		for (i=0, p1=1; p1; p1=p1<<1, i++) {
 			s_barrier();
 			movinv32(c_iter,p1, 1, 0x80000000, 0, i, my_ord);
-			BAILOUT
+			BAILOUT;
 			s_barrier();
 			movinv32(c_iter,~p1, 0xfffffffe,
 				0x7fffffff, 1, i, my_ord);
-			BAILOUT
+			BAILOUT;
 		}
 		break;
 
@@ -968,12 +968,12 @@
 				p2 = ~p1;
 				s_barrier();
 				modtst(i, 2, p1, p2, my_ord);
-				BAILOUT
+				BAILOUT;
 
 				/* Switch patterns */
 				s_barrier();
 				modtst(i, 2, p2, p1, my_ord);
-				BAILOUT
+				BAILOUT;
 			}
 		}
 		break;
@@ -1018,13 +1018,13 @@
 		for (i=0; i<MOD_SZ; i++) {
 			p2 = ~p1;
 			modtst(i, c_iter, p1, p2, my_ord);
-			BAILOUT
+			BAILOUT;
 
 			/* Switch patterns */
 			p2 = p1;
 			p1 = ~p2;
 			modtst(i, c_iter, p1,p2, my_ord);
-			BAILOUT
+			BAILOUT;
 		}
 		break;
 
@@ -1035,13 +1035,13 @@
 			for (i=0; i<MOD_SZ; i++) {
 				p2 = ~p1;
 				modtst(i, c_iter, p1, p2, my_ord);
-				BAILOUT
+				BAILOUT;
 
 				/* Switch patterns */
 				p2 = p1;
 				p1 = ~p2;
 				modtst(i, c_iter, p1, p2, my_ord);
-				BAILOUT
+				BAILOUT;
 			}
 		}
 		break;
diff --git a/test.c b/test.c
index 16c59d0..838e751 100644
--- a/test.c
+++ b/test.c
@@ -113,7 +113,7 @@
 			} while(mask);
 		}
 		do_tick(me);
-		BAILR
+		BAILR;
 	}
 
 	/* Now check the address bits in each bank */
@@ -168,7 +168,7 @@
 			}
 		}
 		do_tick(me);
-		BAILR
+		BAILR;
 		p1 = ~p1;
 	}
 }
@@ -192,7 +192,7 @@
 		done = 0;
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -237,7 +237,7 @@
 		done = 0;
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -325,7 +325,7 @@
 		done = 0;
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -378,7 +378,7 @@
 			done = 0;
 			do {
 				do_tick(me);
-				BAILR
+				BAILR;
 
 				/* Check for overflow */
 				if (pe + SPINSZ > pe && pe != 0) {
@@ -510,7 +510,7 @@
 		done = 0;
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -554,7 +554,7 @@
 			done = 0;
 			do {
 				do_tick(me);
-				BAILR
+				BAILR;
 
 				/* Check for overflow */
 				if (pe + SPINSZ > pe && pe != 0) {
@@ -622,7 +622,7 @@
 			done = 0;
 			do {
 				do_tick(me);
-				BAILR
+				BAILR;
 
 				/* Check for underflow */
 				if (pe - SPINSZ < pe && pe != 0) {
@@ -709,7 +709,7 @@
 		pat = p1;
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -778,7 +778,7 @@
 			pat = p1;
 			do {
 				do_tick(me);
-				BAILR
+				BAILR;
 
 				/* Check for overflow */
 				if (pe + SPINSZ > pe && pe != 0) {
@@ -884,7 +884,7 @@
 			done = 0;
 			do {
 				do_tick(me);
-				BAILR
+				BAILR;
 
 				/* Check for underflow */
                                 if (pe - SPINSZ < pe && pe != 0) {
@@ -1005,7 +1005,7 @@
 		done = 0;
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -1050,7 +1050,7 @@
 			k = 0;
 			do {
 				do_tick(me);
-				BAILR
+				BAILR;
 
 				/* Check for overflow */
 				if (pe + SPINSZ > pe && pe != 0) {
@@ -1111,7 +1111,7 @@
 		end -= MOD_SZ;	/* adjust the ending address */
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -1194,7 +1194,7 @@
 		done = 0;
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -1291,7 +1291,7 @@
 			len  = ((ulong)pe - (ulong)p) / 8; // Half the size of this block in DWORDS
 			for(i=0; i<iter; i++) {
 				do_tick(me);
-				BAILR
+				BAILR;
 				asm __volatile__ (
 					"cld\n"
 					"jmp L110\n\t"
@@ -1351,7 +1351,7 @@
 		done = 0;
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -1428,7 +1428,7 @@
 		done = 0;
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -1467,7 +1467,7 @@
 		done = 0;
 		do {
 			do_tick(me);
-			BAILR
+			BAILR;
 
 			/* Check for overflow */
 			if (pe + SPINSZ > pe && pe != 0) {
@@ -1537,7 +1537,7 @@
 
 		if (t != ip) {
 			do_tick(me);
-			BAILR
+			BAILR;
 			ip = t;
 		}
 	}
diff --git a/test.h b/test.h
index fc52460..981c0bf 100644
--- a/test.h
+++ b/test.h
@@ -43,8 +43,8 @@
 
 #define SPINSZ		0x4000000	/* 256 MB */
 #define MOD_SZ		20
-#define BAILOUT		if (bail) return(1);
-#define BAILR		if (bail) return;
+#define BAILOUT		do { if (bail) return(1); } while (0)
+#define BAILR		do { if (bail) return; } while (0)
 
 #define RES_START	0xa0000
 #define RES_END		0x100000