From: Paul Eggert Date: Fri, 18 Mar 2011 16:39:15 +0000 (-0700) Subject: * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~513^2~49 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=235d7abc8e825c66c642023ff6290ae83f6dac86;p=emacs.git * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". --- 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" -