httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1553532 - in /httpd/httpd/branches/2.4.x: ./ modules/cache/ modules/cluster/ modules/lua/ modules/mappers/ modules/metadata/ modules/proxy/balancers/ modules/session/ os/unix/ server/
Date Thu, 26 Dec 2013 18:08:29 GMT
Author: minfrin
Date: Thu Dec 26 18:08:28 2013
New Revision: 1553532

URL: http://svn.apache.org/r1553532
Log:
* easy proposals to synch 2.4.x and trunk
  - log.c: avoid needless apr_pstrdup()
  - Use apr_pstrmemdup instead of apr_pstrndup when this is safe.
  - Use apr_pstrmemdup instead of apr_pstrndup when this is safe.
  - Remove redundant check
  - 'ap_getword_conf' does not return NULL but an empty string
  - Ease logic around 'ap_getword_conf' and drop useless line of code.
  - 'ap_getword_conf' can not return NULL
  - 'ap_getword_conf' can not return NULL
  - Remove redundant check (already performed the line before)
  - Use 'apr_pstrmemdup' instead of 'apr_pstrndup' when applicable
trunk patches:
  - https://svn.apache.org/viewvc?view=revision&revision=1532122
  - https://svn.apache.org/viewvc?view=revision&revision=1549676
  - https://svn.apache.org/viewvc?view=revision&revision=1549680
  - https://svn.apache.org/viewvc?view=revision&revision=1550651
  - https://svn.apache.org/viewvc?view=revision&revision=1551005
  - https://svn.apache.org/viewvc?view=revision&revision=1551009
  - https://svn.apache.org/viewvc?view=revision&revision=1551010
  - https://svn.apache.org/viewvc?view=revision&revision=1551011
  - https://svn.apache.org/viewvc?view=revision&revision=1551012
  - https://svn.apache.org/viewvc?view=revision&revision=1551013
2.4.x patches: trunk patches work
               http://people.apache.org/~jim/patches/ez-2.4-v2.patch
+1: jailletc36, jim, minfrin

Modified:
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c
    httpd/httpd/branches/2.4.x/modules/cluster/mod_heartmonitor.c
    httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c
    httpd/httpd/branches/2.4.x/modules/mappers/mod_dir.c
    httpd/httpd/branches/2.4.x/modules/metadata/mod_expires.c
    httpd/httpd/branches/2.4.x/modules/metadata/mod_remoteip.c
    httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_heartbeat.c
    httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c
    httpd/httpd/branches/2.4.x/os/unix/unixd.c
    httpd/httpd/branches/2.4.x/server/log.c
    httpd/httpd/branches/2.4.x/server/util_ebcdic.c

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Thu Dec 26 18:08:28 2013
@@ -98,31 +98,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * easy proposals to synch 2.4.x and trunk
-      - log.c: avoid needless apr_pstrdup()
-      - Use apr_pstrmemdup instead of apr_pstrndup when this is safe.
-      - Use apr_pstrmemdup instead of apr_pstrndup when this is safe.
-      - Remove redundant check
-      - 'ap_getword_conf' does not return NULL but an empty string
-      - Ease logic around 'ap_getword_conf' and drop useless line of code.
-      - 'ap_getword_conf' can not return NULL
-      - 'ap_getword_conf' can not return NULL
-      - Remove redundant check (already performed the line before)
-      - Use 'apr_pstrmemdup' instead of 'apr_pstrndup' when applicable
-    trunk patches:
-      - https://svn.apache.org/viewvc?view=revision&revision=1532122
-      - https://svn.apache.org/viewvc?view=revision&revision=1549676
-      - https://svn.apache.org/viewvc?view=revision&revision=1549680
-      - https://svn.apache.org/viewvc?view=revision&revision=1550651
-      - https://svn.apache.org/viewvc?view=revision&revision=1551005
-      - https://svn.apache.org/viewvc?view=revision&revision=1551009
-      - https://svn.apache.org/viewvc?view=revision&revision=1551010
-      - https://svn.apache.org/viewvc?view=revision&revision=1551011
-      - https://svn.apache.org/viewvc?view=revision&revision=1551012
-      - https://svn.apache.org/viewvc?view=revision&revision=1551013
-    2.4.x patches: trunk patches work
-                   http://people.apache.org/~jim/patches/ez-2.4-v2.patch
-    +1: jailletc36, jim, minfrin
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:

Modified: httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c (original)
+++ httpd/httpd/branches/2.4.x/modules/cache/mod_cache_disk.c Thu Dec 26 18:08:28 2013
@@ -381,7 +381,7 @@ static int create_entity(cache_handle_t 
     dobj->name = obj->key;
     dobj->prefix = NULL;
     /* Save the cache root */
-    dobj->root = apr_pstrndup(r->pool, conf->cache_root, conf->cache_root_len);
+    dobj->root = apr_pstrmemdup(r->pool, conf->cache_root, conf->cache_root_len);
     dobj->root_len = conf->cache_root_len;
 
     apr_pool_create(&pool, r->pool);
@@ -441,7 +441,7 @@ static int open_entity(cache_handle_t *h
     dobj->prefix = NULL;
 
     /* Save the cache root */
-    dobj->root = apr_pstrndup(r->pool, conf->cache_root, conf->cache_root_len);
+    dobj->root = apr_pstrmemdup(r->pool, conf->cache_root, conf->cache_root_len);
     dobj->root_len = conf->cache_root_len;
 
     dobj->vary.file = header_file(r->pool, conf, dobj, key);

Modified: httpd/httpd/branches/2.4.x/modules/cluster/mod_heartmonitor.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/cluster/mod_heartmonitor.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/cluster/mod_heartmonitor.c (original)
+++ httpd/httpd/branches/2.4.x/modules/cluster/mod_heartmonitor.c Thu Dec 26 18:08:28 2013
@@ -292,7 +292,7 @@ static apr_status_t hm_file_update_stat(
             buf[bsize - 1] = 0;
             t = strchr(buf, ' ');
             if (t) {
-                ip = apr_pstrndup(pool, buf, t - buf);
+                ip = apr_pstrmemdup(pool, buf, t - buf);
             } else {
                 ip = NULL;
             }

Modified: httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c (original)
+++ httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c Thu Dec 26 18:08:28 2013
@@ -954,11 +954,11 @@ static const char *register_named_block_
     if (line[0]) { 
         const char *word;
         word = ap_getword_conf(cmd->temp_pool, &line);
-        if (word && *word) {
+        if (*word) {
             function = apr_pstrdup(cmd->pool, word);
         }
         word = ap_getword_conf(cmd->temp_pool, &line);
-        if (word && *word) {
+        if (*word) {
             if (!strcasecmp("early", word)) { 
                 when = AP_LUA_HOOK_FIRST;
             }

Modified: httpd/httpd/branches/2.4.x/modules/mappers/mod_dir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/mappers/mod_dir.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/mappers/mod_dir.c (original)
+++ httpd/httpd/branches/2.4.x/modules/mappers/mod_dir.c Thu Dec 26 18:08:28 2013
@@ -66,7 +66,7 @@ static const char *add_index(cmd_parms *
             /* peek to see if "disabled" is first in a series of arguments */
             const char *tt = t;
             const char *ww = ap_getword_conf(cmd->temp_pool, &tt);
-            if (ww == NULL || !ww[0]) {
+            if (ww[0] == '\0') {
                /* "disabled" is first, and alone */
                apr_array_clear(d->index_names); 
                break;

Modified: httpd/httpd/branches/2.4.x/modules/metadata/mod_expires.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/metadata/mod_expires.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/metadata/mod_expires.c (original)
+++ httpd/httpd/branches/2.4.x/modules/metadata/mod_expires.c Thu Dec 26 18:08:28 2013
@@ -267,10 +267,7 @@ static char *check_code(apr_pool_t *p, c
         /* <type>
          */
         word = ap_getword_conf(p, &code);
-        if (word[0]) {
-            /* do nothing */
-        }
-        else {
+        if (word[0] == '\0') {
             return apr_pstrcat(p, "bad expires code, missing <type>", NULL);
         }
 

Modified: httpd/httpd/branches/2.4.x/modules/metadata/mod_remoteip.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/metadata/mod_remoteip.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/metadata/mod_remoteip.c (original)
+++ httpd/httpd/branches/2.4.x/modules/metadata/mod_remoteip.c Thu Dec 26 18:08:28 2013
@@ -198,7 +198,7 @@ static const char *proxylist_read(cmd_pa
     while (!(ap_cfg_getline(lbuf, MAX_STRING_LEN, cfp))) {
         args = lbuf;
         while (*(arg = ap_getword_conf(cmd->temp_pool, &args)) != '\0') {
-            if (*arg == '#' || *arg == '\0') {
+            if (*arg == '#') {
                 break;
             }
             errmsg = proxies_set(cmd, cfg, arg);

Modified: httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_heartbeat.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_heartbeat.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_heartbeat.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/balancers/mod_lbmethod_heartbeat.c Thu Dec 26
18:08:28 2013
@@ -162,7 +162,7 @@ static apr_status_t readfile_heartbeats(
                 continue;
             }
 
-            ip = apr_pstrndup(pool, buf, t - buf);
+            ip = apr_pstrmemdup(pool, buf, t - buf);
             t++;
 
             server = apr_hash_get(servers, ip, APR_HASH_KEY_STRING);

Modified: httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c (original)
+++ httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c Thu Dec 26 18:08:28 2013
@@ -593,7 +593,7 @@ static const char *set_crypto_passphrase
     while (!(ap_cfg_getline(buffer, sizeof(buffer), file))) {
         args = buffer;
         while (*(arg = ap_getword_conf(cmd->pool, &args)) != '\0') {
-            if (*arg == '#' || *arg == 0) {
+            if (*arg == '#') {
                 break;
             }
             set_crypto_passphrase(cmd, config, arg);

Modified: httpd/httpd/branches/2.4.x/os/unix/unixd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/os/unix/unixd.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/os/unix/unixd.c (original)
+++ httpd/httpd/branches/2.4.x/os/unix/unixd.c Thu Dec 26 18:08:28 2013
@@ -74,7 +74,7 @@ AP_DECLARE(void) ap_unixd_set_rlimit(cmd
         return;
     }
 
-    if ((str = ap_getword_conf(cmd->pool, &arg))) {
+    if (*(str = ap_getword_conf(cmd->pool, &arg)) != '\0') {
         if (!strcasecmp(str, "max")) {
             cur = limit->rlim_max;
         }
@@ -88,7 +88,7 @@ AP_DECLARE(void) ap_unixd_set_rlimit(cmd
         return;
     }
 
-    if (arg2 && (str = ap_getword_conf(cmd->pool, &arg2))) {
+    if (arg2 && (*(str = ap_getword_conf(cmd->pool, &arg2)) != '\0')) {
         max = atol(str);
     }
 

Modified: httpd/httpd/branches/2.4.x/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/log.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/log.c (original)
+++ httpd/httpd/branches/2.4.x/server/log.c Thu Dec 26 18:08:28 2013
@@ -331,10 +331,8 @@ static int log_child(apr_pool_t *p, cons
         && ((rc = apr_procattr_child_errfn_set(procattr, log_child_errfn))
                 == APR_SUCCESS)) {
         char **args;
-        const char *pname;
 
         apr_tokenize_to_argv(progname, &args, p);
-        pname = apr_pstrdup(p, args[0]);
         procnew = (apr_proc_t *)apr_pcalloc(p, sizeof(*procnew));
 
         if (dummy_stderr) {
@@ -342,7 +340,7 @@ static int log_child(apr_pool_t *p, cons
                 rc = apr_procattr_child_err_set(procattr, errfile, NULL);
         }
 
-        rc = apr_proc_create(procnew, pname, (const char * const *)args,
+        rc = apr_proc_create(procnew, args[0], (const char * const *)args,
                              NULL, procattr, p);
 
         if (rc == APR_SUCCESS) {
@@ -1566,12 +1564,10 @@ static apr_status_t piped_log_spawn(pipe
     }
     else {
         char **args;
-        const char *pname;
 
         apr_tokenize_to_argv(pl->program, &args, pl->p);
-        pname = apr_pstrdup(pl->p, args[0]);
         procnew = apr_pcalloc(pl->p, sizeof(apr_proc_t));
-        status = apr_proc_create(procnew, pname, (const char * const *) args,
+        status = apr_proc_create(procnew, args[0], (const char * const *) args,
                                  NULL, procattr, pl->p);
 
         if (status == APR_SUCCESS) {

Modified: httpd/httpd/branches/2.4.x/server/util_ebcdic.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/util_ebcdic.c?rev=1553532&r1=1553531&r2=1553532&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/util_ebcdic.c (original)
+++ httpd/httpd/branches/2.4.x/server/util_ebcdic.c Thu Dec 26 18:08:28 2013
@@ -102,7 +102,7 @@ int ap_rvputs_proto_in_ascii(request_rec
         if (s == NULL)
             break;
         len = strlen(s);
-        ascii_s = apr_pstrndup(r->pool, s, len);
+        ascii_s = apr_pstrmemdup(r->pool, s, len);
         ap_xlate_proto_to_ascii(ascii_s, len);
         if (ap_rputs(ascii_s, r) < 0)
             return -1;



Mime
View raw message