changeset 91617:431b8edb4f39

Use "do...while (0)", not "if (1)..else" in macro definitions.
author Jan Djärv <jan.h.d@swipnet.se>
date Thu, 07 Feb 2008 12:46:29 +0000
parents a2610cd19ac0
children 400a54e167c9
files src/buffer.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.h	Thu Feb 07 06:54:39 2008 +0000
+++ b/src/buffer.h	Thu Feb 07 12:46:29 2008 +0000
@@ -266,7 +266,7 @@
    and store the charpos in CHARPOS and the bytepos in BYTEPOS.  */
 
 #define DECODE_POSITION(charpos, bytepos, pos)			\
-if (1)								\
+do								\
   {								\
     Lisp_Object __pos = (pos);					\
     if (NUMBERP (__pos))					\
@@ -282,7 +282,7 @@
     else							\
       wrong_type_argument (Qinteger_or_marker_p, __pos);	\
   }								\
-else
+while (0)
 
 /* Return the address of byte position N in current buffer.  */