You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2014/07/14 10:13:24 UTC

svn commit: r1610353 - /httpd/httpd/trunk/server/util.c

Author: jailletc36
Date: Mon Jul 14 08:13:24 2014
New Revision: 1610353

URL: http://svn.apache.org/r1610353
Log:
Remove some 'register' in variable declaration.
Save a few cycles by calling 'apr_isalnum' instead of 'apr_isalpha' and 'apr_isdigit'.

Modified:
    httpd/httpd/trunk/server/util.c

Modified: httpd/httpd/trunk/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1610353&r1=1610352&r2=1610353&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util.c (original)
+++ httpd/httpd/trunk/server/util.c Mon Jul 14 08:13:24 2014
@@ -253,7 +253,7 @@ AP_DECLARE(int) ap_os_is_path_absolute(a
 
 AP_DECLARE(int) ap_is_matchexp(const char *str)
 {
-    register int x;
+    int x;
 
     for (x = 0; str[x]; x++)
         if ((str[x] == '*') || (str[x] == '?'))
@@ -529,7 +529,7 @@ AP_DECLARE(void) ap_getparents(char *nam
     while (name[l] != '\0') {
         if (name[l] == '.' && name[l + 1] == '.' && IS_SLASH(name[l + 2])
             && (l == 0 || IS_SLASH(name[l - 1]))) {
-            register int m = l + 3, n;
+            int m = l + 3, n;
 
             l = l - 2;
             if (l >= 0) {
@@ -655,7 +655,7 @@ AP_DECLARE(char *) ap_make_dirstr_parent
 
 AP_DECLARE(int) ap_count_dirs(const char *path)
 {
-    register int x, n;
+    int x, n;
 
     for (x = 0, n = 0; path[x]; x++)
         if (path[x] == '/')
@@ -1586,7 +1586,7 @@ AP_DECLARE(char *) ap_escape_shell_cmd(a
 
 static char x2c(const char *what)
 {
-    register char digit;
+    char digit;
 
 #if !APR_CHARSET_EBCDIC
     digit = ((what[0] >= 'A') ? ((what[0] & 0xdf) - 'A') + 10
@@ -1618,7 +1618,7 @@ static char x2c(const char *what)
 
 static int unescape_url(char *url, const char *forbid, const char *reserved)
 {
-    register int badesc, badpath;
+    int badesc, badpath;
     char *x, *y;
 
     badesc = 0;
@@ -2115,11 +2115,11 @@ AP_DECLARE(char *) ap_make_full_path(apr
  */
 AP_DECLARE(int) ap_is_url(const char *u)
 {
-    register int x;
+    int x;
 
     for (x = 0; u[x] != ':'; x++) {
         if ((!u[x]) ||
-            ((!apr_isalpha(u[x])) && (!apr_isdigit(u[x])) &&
+            ((!apr_isalnum(u[x])) &&
              (u[x] != '+') && (u[x] != '-') && (u[x] != '.'))) {
             return 0;
         }