From c3df1ad99d4a150def7a0e789a1f6691eefb6979 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 14 Sep 1999 13:09:30 +0000 Subject: [PATCH] (CHECK_FRAME, CHECK_LIVE_FRAME): Put code in do-while. --- src/frame.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/frame.h b/src/frame.h index 442a0e32ac5..498591106b4 100644 --- a/src/frame.h +++ b/src/frame.h @@ -581,19 +581,18 @@ typedef struct frame *FRAME_PTR; (f)->visible = (f)->async_visible, \ (f)->iconified = (f)->async_iconified) -#define CHECK_FRAME(x, i) \ - if (! FRAMEP (x)) \ - x = wrong_type_argument (Qframep, (x)); \ - else \ - (void) 0 +#define CHECK_FRAME(x, i) \ + do { \ + if (! FRAMEP (x)) \ + x = wrong_type_argument (Qframep, (x)); \ + } while (0) #define CHECK_LIVE_FRAME(x, i) \ - if (! FRAMEP (x) \ - || ! FRAME_LIVE_P (XFRAME (x))) \ - x = wrong_type_argument (Qframe_live_p, (x)); \ - else \ - (void) 0 - + do { \ + if (! FRAMEP (x) \ + || ! FRAME_LIVE_P (XFRAME (x))) \ + x = wrong_type_argument (Qframe_live_p, (x)); \ + } while (0) /* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a `for' loop which iterates over the elements of Vframe_list. The -- 2.39.5