explicit empty while loops
Robin Barker [Wed, 29 Oct 2008 13:22:04 +0000 (13:22 +0000)]
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <46A0F33545E63740BC7563DE59CA9C6D4E2FD9@exchsvr2.npl.ad.local>

p4raw-id: //depot/perl@34695

op.c
pp_sort.c

diff --git a/op.c b/op.c
index 19d834f..525b159 100644 (file)
--- a/op.c
+++ b/op.c
@@ -8084,7 +8084,7 @@ Perl_ck_subr(pTHX_ OP *o)
                         const char *p = proto;
                         const char *const end = proto;
                         contextclass = 0;
-                        while (*--p != '[');
+                        while (*--p != '[') {}
                         bad_type(arg, Perl_form(aTHX_ "one of %.*s",
                                                 (int)(end - p), p),
                                  gv_ename(namegv), o3);
index a75eab7..e917c5e 100644 (file)
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -204,7 +204,7 @@ dynprep(pTHX_ gptr *list1, gptr *list2, size_t nmemb, const SVCOMPARE_t cmp)
            if (r >= t) p = r = t;      /* too short to care about */
            else {
                while (((cmp(aTHX_ *(p-1), *p) > 0) == sense) &&
-                      ((p -= 2) > q));
+                      ((p -= 2) > q)) {}
                if (p <= q) {
                    /* b through r is a (long) run.
                    ** Extend it as far as possible.