httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r791409 - /httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
Date Mon, 06 Jul 2009 08:39:44 GMT
Author: jfclere
Date: Mon Jul  6 08:39:44 2009
New Revision: 791409

URL: http://svn.apache.org/viewvc?rev=791409&view=rev
Log:
Arrange the slotmem chain logic.

Modified:
    httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c

Modified: httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c?rev=791409&r1=791408&r2=791409&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c (original)
+++ httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c Mon Jul  6 08:39:44 2009
@@ -251,13 +251,18 @@
         }
 
         /* first try to attach to existing slotmem */
-        while (next) {
-            if (strcmp(next->name, fname) == 0) {
-                /* we already have it */
-                *new = next;
-                return APR_SUCCESS;
+        if (next) {
+            for (;;) {
+                if (strcmp(next->name, fname) == 0) {
+                    /* we already have it */
+                    *new = next;
+                    return APR_SUCCESS;
+                }
+                if (!next->next) {
+                     break;
+                }
+                next = next->next;
             }
-            next = next->next;
         }
     }
     else {



Mime
View raw message