gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-187


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-1871-g96d37ec
Date: Thu, 30 Jun 2016 14:15:25 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/fixtype has been updated
       via  96d37ecb22d847499fbfab80c62894b64249b8c4 (commit)
      from  e81d4c05425ee21c44ecef554c216a6760c34c88 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=96d37ecb22d847499fbfab80c62894b64249b8c4

commit 96d37ecb22d847499fbfab80c62894b64249b8c4
Author: Andrew J. Schorr <address@hidden>
Date:   Thu Jun 30 10:15:07 2016 -0400

    Improve r_force_number coding style.

diff --git a/ChangeLog b/ChangeLog
index a1e2202..0caafa6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-06-30         Arnold D. Robbins     <address@hidden>
+
+       * node.c (r_force_number): Coding style change.
+
 2016-06-30         Andrew J. Schorr     <address@hidden>
 
        * awk.h (STFMT_UNUSED): New define indicating that the string
diff --git a/node.c b/node.c
index 8c5d0c0..bb2fe43 100644
--- a/node.c
+++ b/node.c
@@ -78,15 +78,13 @@ r_force_number(NODE *n)
        n->numbr = 0.0;
 
        /* Trim leading white space, bailing out if there's nothing else */
-       cp = n->stptr;
-       cpend = cp + n->stlen;
-       while (1) {
-               if (cp == cpend)
-                       goto badnum;
-               if (!isspace((unsigned char) *cp))
-                       break;
-               cp++;
-       }
+       for (cp = n->stptr, cpend = cp + n->stlen;
+            cp < cpend && isspace((unsigned char) *cp); cp++)
+               continue;
+
+       if (cp == cpend)
+               goto badnum;
+
        /* At this point, we know the string is not entirely white space */
        /* Trim trailing white space */
        while (isspace((unsigned char) cpend[-1]))

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |    4 ++++
 node.c    |   16 +++++++---------
 2 files changed, 11 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]