Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/usr.bin/rcs/lib Second try to sort out the dangling else...



details:   https://anonhg.NetBSD.org/src/rev/2c76ec2190f6
branches:  trunk
changeset: 772694:2c76ec2190f6
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Jan 12 14:10:56 2012 +0000

description:
Second try to sort out the dangling elses. Just use {} markers.
Produces identical on amd64.

diffstat:

 gnu/usr.bin/rcs/lib/rcsbase.h |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r 60dece2c7c44 -r 2c76ec2190f6 gnu/usr.bin/rcs/lib/rcsbase.h
--- a/gnu/usr.bin/rcs/lib/rcsbase.h     Thu Jan 12 13:28:54 2012 +0000
+++ b/gnu/usr.bin/rcs/lib/rcsbase.h     Thu Jan 12 14:10:56 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcsbase.h,v 1.11 2012/01/08 13:57:31 tron Exp $        */
+/*     $NetBSD: rcsbase.h,v 1.12 2012/01/12 14:10:56 joerg Exp $       */
 
 /* RCS common definitions and data structures */
 
@@ -33,6 +33,10 @@
 
 /*
  * $Log: rcsbase.h,v $
+ * Revision 1.12  2012/01/12 14:10:56  joerg
+ * Second try to sort out the dangling elses. Just use {} markers.
+ * Produces identical on amd64.
+ *
  * Revision 1.11  2012/01/08 13:57:31  tron
  * Revert last change. The extra while loop intruced by the macro changes
  * causes an end-less loop in ci(1) which uses "break" inside one of the
@@ -291,14 +295,14 @@
 #      if maps_memory
 #              define declarecache register Iptr_type ptr, lim
 #              define setupcache(f) (lim = (f)->lim)
-#              define Igeteof_(f,c,s) if ((f)->ptr==(f)->lim) s else (c)= *(f)->ptr++;
-#              define cachegeteof_(c,s) if (ptr==lim) s else (c)= *ptr++;
+#              define Igeteof_(f,c,s) { if ((f)->ptr==(f)->lim) s else (c)= *(f)->ptr++; }
+#              define cachegeteof_(c,s) { if (ptr==lim) s else (c)= *ptr++; }
 #      else
                int Igetmore P((RILE*));
 #              define declarecache register Iptr_type ptr; register RILE *rRILE
 #              define setupcache(f) (rRILE = (f))
-#              define Igeteof_(f,c,s) if ((f)->ptr==(f)->readlim && !Igetmore(f)) s else (c)= *(f)->ptr++;
-#              define cachegeteof_(c,s) if (ptr==rRILE->readlim && !Igetmore(rRILE)) s else (c)= *ptr++;
+#              define Igeteof_(f,c,s) { if ((f)->ptr==(f)->readlim && !Igetmore(f)) s else (c)= *(f)->ptr++; }
+#              define cachegeteof_(c,s) { if (ptr==rRILE->readlim && !Igetmore(rRILE)) s else (c)= *ptr++; }
 #      endif
 #      define uncache(f) ((f)->ptr = ptr)
 #      define cache(f) (ptr = (f)->ptr)



Home | Main Index | Thread Index | Old Index