apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r384926 - /apr/apr/trunk/strings/apr_strnatcmp.c
Date Fri, 10 Mar 2006 21:59:50 GMT
Author: wrowe
Date: Fri Mar 10 13:59:49 2006
New Revision: 384926

URL: http://svn.apache.org/viewcvs?rev=384926&view=rev
Log:

  Restyle this code, slightly, to avoid code-not-reached warnings from
  the optimizer (detected on Solaris cc 5.8)

Modified:
    apr/apr/trunk/strings/apr_strnatcmp.c

Modified: apr/apr/trunk/strings/apr_strnatcmp.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/strings/apr_strnatcmp.c?rev=384926&r1=384925&r2=384926&view=diff
==============================================================================
--- apr/apr/trunk/strings/apr_strnatcmp.c (original)
+++ apr/apr/trunk/strings/apr_strnatcmp.c Fri Mar 10 13:59:49 2006
@@ -44,7 +44,7 @@
 	remember it in BIAS. */
      for (;; a++, b++) {
 	  if (!apr_isdigit(*a)  &&  !apr_isdigit(*b))
-	       return bias;
+	       break;
 	  else if (!apr_isdigit(*a))
 	       return -1;
 	  else if (!apr_isdigit(*b))
@@ -56,10 +56,10 @@
 	       if (!bias)
 		    bias = +1;
 	  } else if (!*a  &&  !*b)
-	       return bias;
+	       break;
      }
 
-     return 0;
+     return bias;
 }
 
 
@@ -70,7 +70,7 @@
         different value wins. */
      for (;; a++, b++) {
 	  if (!apr_isdigit(*a)  &&  !apr_isdigit(*b))
-	       return 0;
+	       break;
 	  else if (!apr_isdigit(*a))
 	       return -1;
 	  else if (!apr_isdigit(*b))



Mime
View raw message