From 235d7abc8e825c66c642023ff6290ae83f6dac86 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 18 Mar 2011 09:39:15 -0700 Subject: [PATCH] * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". --- src/ChangeLog | 2 ++ src/intervals.h | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 576bbf50157..89e054f62b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-18 Paul Eggert + * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". + * atimer.c (start_atimer, append_atimer_lists, set_alarm): Rename locals to avoid shadowing. diff --git a/src/intervals.h b/src/intervals.h index f6c1c002ce0..d7c34012e1f 100644 --- a/src/intervals.h +++ b/src/intervals.h @@ -161,8 +161,13 @@ struct interval (INTERVAL_HAS_PARENT (i) ? INTERVAL_PARENT (i) : 0) /* Abort if interval I's size is negative. */ -#define CHECK_TOTAL_LENGTH(i) \ - if ((int) (i)->total_length < 0) abort (); else +#define CHECK_TOTAL_LENGTH(i) \ + do \ + { \ + if ((int) (i)->total_length < 0) \ + abort (); \ + } \ + while (0) /* Reset this interval to its vanilla, or no-property state. */ #define RESET_INTERVAL(i) \ @@ -339,4 +344,3 @@ extern Lisp_Object get_pos_property (Lisp_Object pos, Lisp_Object prop, extern void syms_of_textprop (void); #include "composite.h" - -- 2.39.2