diff -ru apr/memory/unix/apr_sms.c apr-style/memory/unix/apr_sms.c
--- apr/memory/unix/apr_sms.c	Sun May 20 05:21:56 2001
+++ apr-style/memory/unix/apr_sms.c	Sun May 20 05:45:48 2001
@@ -113,7 +113,7 @@
     if (size == 0)
         return NULL;
 
-    if (!mem_sys->calloc_fn){
+    if (!mem_sys->calloc_fn) {
         /* Assumption - if we don't have calloc we have
          * malloc, might be bogus...
          */
@@ -193,18 +193,18 @@
     mem_sys->accounting_mem_sys = mem_sys;
 
     if (parent_mem_sys != NULL) {
-        if ((mem_sys->sibling_mem_sys = parent_mem_sys->child_mem_sys)!=NULL) {
+        if ((mem_sys->sibling_mem_sys = parent_mem_sys->child_mem_sys) != NULL)
             mem_sys->sibling_mem_sys->ref_mem_sys = &mem_sys->sibling_mem_sys;
-        }
+
         mem_sys->ref_mem_sys = &parent_mem_sys->child_mem_sys;
         parent_mem_sys->child_mem_sys = mem_sys;
     }
     /* This seems a bit redundant, but we're not taking chances */
     else
     {
-        mem_sys->ref_mem_sys = NULL;
+        mem_sys->ref_mem_sys     = NULL;
         mem_sys->sibling_mem_sys = NULL;
-        mem_sys->child_mem_sys = NULL;
+        mem_sys->child_mem_sys   = NULL;
     }
 
     return mem_sys;
@@ -238,7 +238,7 @@
      * is either the memory system itself or a direct child.
      */
     assert(mem_sys->accounting_mem_sys == mem_sys ||
-	 mem_sys->accounting_mem_sys->parent_mem_sys ==  mem_sys);
+           mem_sys->accounting_mem_sys->parent_mem_sys == mem_sys);
 
     /*
      * A non-tracking memory system can be the child of
@@ -250,7 +250,7 @@
         return;
 
     parent = mem_sys
-    while (parent){
+    while (parent) {
         if (apr_sms_is_tracking(parent))
             return; /* Tracking memory system found, return satisfied ;-) */
 
@@ -277,8 +277,7 @@
     struct apr_sms_cleanup *cleanup;
 
     cleanup = mem_sys->cleanups;
-    while (cleanup)
-    {
+    while (cleanup) {
         cleanup->cleanup_fn(cleanup->data);
         cleanup = cleanup->next;
     }
@@ -297,7 +296,7 @@
         return;
 
     mem_sys = mem_sys->child_mem_sys;
-    while (mem_sys){
+    while (mem_sys) {
         apr_sms_do_child_cleanups(mem_sys);
         apr_sms_do_cleanups(mem_sys);
 
@@ -351,7 +350,7 @@
     if (!mem_sys)
         return APR_EMEMSYS;
 
-    if (apr_sms_is_tracking(mem_sys)){
+    if (apr_sms_is_tracking(mem_sys)) {
         /* 
          * Run the cleanups of all child memory systems _including_
          * the accounting memory system.
@@ -361,18 +360,16 @@
         /* Run all cleanups, the memory will be freed by the destroy */
         apr_sms_do_cleanups(mem_sys);
     }
-    else
-    {
-        if (mem_sys->accounting_mem_sys != mem_sys)
-        {
+    else {
+        if (mem_sys->accounting_mem_sys != mem_sys) {
             child_mem_sys = mem_sys->accounting_mem_sys;
-		    
+            
             /* 
              * Remove the accounting memory system from the memory systems 
              * child list (we will explicitly destroy it later in this block).
              */
             if (child_mem_sys->sibling_mem_sys != NULL)
-	            child_mem_sys->sibling_mem_sys->ref_mem_sys = child_mem_sys->ref_mem_sys;
+                child_mem_sys->sibling_mem_sys->ref_mem_sys = child_mem_sys->ref_mem_sys;
 
             *child_mem_sys->ref_mem_sys = child_mem_sys->sibling_mem_sys;
 
@@ -384,7 +381,7 @@
         /* Visit all children and destroy them */
         child_mem_sys = mem_sys->child_mem_sys;
 
-        while (child_mem_sys != NULL){
+        while (child_mem_sys) {
             sibling_mem_sys = child_mem_sys->sibling_mem_sys;
             apr_sms_destroy(child_mem_sys);
             child_mem_sys = sibling_mem_sys;
@@ -394,7 +391,7 @@
          * If the accounting memory system _is_ tracking, we also know that it is
          * not the memory system itself.
          */
-        if (apr_sms_is_tracking(mem_sys->accounting_mem_sys)){
+        if (apr_sms_is_tracking(mem_sys->accounting_mem_sys)) {
             /* 
              * Run all cleanups, the memory will be freed by the destroying of the
              * accounting memory system.
@@ -410,58 +407,57 @@
              */
             mem_sys->accounting_mem_sys = mem_sys;
         }
-        else
-        {
+        else {
             /* Run all cleanups, free'ing memory as we go */
             cleanup = mem_sys->cleanups;
 
-            while (cleanup){
+            while (cleanup) {
                 cleanup->cleanup_fn(cleanup->data);
                 next_cleanup = cleanup->next;
                 apr_sms_free(mem_sys->accounting_mem_sys, cleanup);
                 cleanup = next_cleanup;
             }
 
-            if (mem_sys->accounting_mem_sys != mem_sys)
-            {
+            if (mem_sys->accounting_mem_sys != mem_sys) {
                 /* Destroy the accounting memory system */
                 apr_sms_destroy(mem_sys->accounting_mem_sys);
+                
                 /* 
                  * Set the accounting memory system back to the parent memory system
                  * just in case...
                  */
                 mem_sys->accounting_mem_sys = mem_sys;
             }
-       }
-  }
-
-  /* Remove the memory system from the parent memory systems child list */
-  if (mem_sys->sibling_mem_sys)
-      mem_sys->sibling_mem_sys->ref_mem_sys = mem_sys->ref_mem_sys;
-
-  if (mem_sys->ref_mem_sys)
-      *mem_sys->ref_mem_sys = mem_sys->sibling_mem_sys;
-
-  /* Call the pre-destroy if present */
-  if (mem_sys->pre_destroy_fn)
-      mem_sys->pre_destroy_fn(mem_sys);
+        }
+    }
 
-  /* 1 - If we have a self destruct, use it */
-  if (mem_sys->destroy_fn)
-      return mem_sys->destroy_fn(mem_sys);
+    /* Remove the memory system from the parent memory systems child list */
+    if (mem_sys->sibling_mem_sys)
+        mem_sys->sibling_mem_sys->ref_mem_sys = mem_sys->ref_mem_sys;
+
+    if (mem_sys->ref_mem_sys)
+        *mem_sys->ref_mem_sys = mem_sys->sibling_mem_sys;
+
+    /* Call the pre-destroy if present */
+    if (mem_sys->pre_destroy_fn)
+        mem_sys->pre_destroy_fn(mem_sys);
+
+    /* 1 - If we have a self destruct, use it */
+    if (mem_sys->destroy_fn)
+        return mem_sys->destroy_fn(mem_sys);
 
-  /* 2 - If we don't have a parent, free using ourselves */
-  if (!mem_sys->parent_mem_sys)
-      return mem_sys->free_fn(mem_sys, mem_sys);
+    /* 2 - If we don't have a parent, free using ourselves */
+    if (!mem_sys->parent_mem_sys)
+        return mem_sys->free_fn(mem_sys, mem_sys);
 
-  /* 3 - If we do have a parent and it has a free function, use it */
-  if (mem_sys->parent_mem_sys->free_fn)
-      return apr_sms_free(mem_sys->parent_mem_sys, mem_sys);
+    /* 3 - If we do have a parent and it has a free function, use it */
+    if (mem_sys->parent_mem_sys->free_fn)
+        return apr_sms_free(mem_sys->parent_mem_sys, mem_sys);
 
-  /* 4 - Assume we are the child of a tracking memory system, and do nothing */
+    /* 4 - Assume we are the child of a tracking memory system, and do nothing */
 #ifdef APR_ASSERT_MEMORY
     mem_sys = mem_sys->parent_mem_sys;
-    while (mem_sys){
+    while (mem_sys) {
         if (apr_sms_is_tracking(mem_sys))
             return APR_SUCCESS;
 
@@ -469,6 +465,7 @@
     }
     assert(0); /* Made the wrong assumption, so we assert */
 #endif /* APR_MEMORY_ASSERT */
+    
     return APR_SUCCESS;
 }
 
@@ -531,14 +528,14 @@
         return APR_EMEMSYS;
 
 #ifdef APR_ASSERT_MEMORY
-    assert(mem_sys->accounting_mem_sys != NULL);
+    assert(mem_sys->accounting_mem_sys);
 #endif
     
     if (!cleanup_fn)
         return APR_ENOTIMPL;
 
     cleanup = (struct apr_sms_cleanup *)
-	    apr_sms_malloc(mem_sys->accounting_mem_sys, sizeof(struct apr_sms_cleanup));
+        apr_sms_malloc(mem_sys->accounting_mem_sys, sizeof(struct apr_sms_cleanup));
 
     if (!cleanup)
         return APR_ENOMEM;
@@ -563,13 +560,12 @@
         return APR_EMEMSYS;
 
 #ifdef APR_ASSERT_MEMORY
-    assert(mem_sys->accounting_mem_sys != NULL);
+    assert(mem_sys->accounting_mem_sys);
 #endif
         
     cleanup = mem_sys->cleanups;
     cleanup_ref = &mem_sys->cleanups;
-    while (cleanup)
-    {
+    while (cleanup) {
         if ((type == 0 || cleanup->cleanup_fn == cleanup_fn) &&
             cleanup->data == data && cleanup->cleanup_fn == cleanup_fn) {
             *cleanup_ref = cleanup->next;
@@ -601,7 +597,7 @@
         return APR_EMEMSYS;
         
 #ifdef APR_ASSERT_MEMORY
-    assert(mem_sys->accounting_mem_sys != NULL);
+    assert(mem_sys->accounting_mem_sys);
 #endif
     
     cleanup = mem_sys->cleanups;
@@ -611,7 +607,7 @@
         if (type == 0 || cleanup->type == type) {
             *cleanup_ref = cleanup->next;
 
-            if (mem_sys->free_fn != NULL)
+            if (mem_sys->free_fn)
                 apr_sms_free(mem_sys, cleanup);
 
             cleanup = *cleanup_ref;
@@ -627,9 +623,9 @@
     return rv;
 }
 
-APR_DECLARE(apr_status_t)  apr_sms_cleanup_run(apr_sms_t *mem_sys, apr_int32_t type,
-                                               void *data, 
-			                                   apr_status_t (*cleanup_fn)(void *))
+APR_DECLARE(apr_status_t) apr_sms_cleanup_run(apr_sms_t *mem_sys, apr_int32_t type,
+                                              void *data, 
+                                              apr_status_t (*cleanup_fn)(void *))
 {
     apr_status_t rv;
 
@@ -653,20 +649,19 @@
         return APR_EMEMSYS;
         
 #ifdef APR_ASSERT_MEMORY
-    assert(mem_sys->accounting_mem_sys != NULL);
+    assert(mem_sys->accounting_mem_sys);
 #endif
     
     cleanup = mem_sys->cleanups;
     cleanup_ref = &mem_sys->cleanups;
     mem_sys = mem_sys->accounting_mem_sys;
-    while (cleanup)
-    {
+    while (cleanup) {
         if (type == 0 || cleanup->type == type) {
             *cleanup_ref = cleanup->next;
 
             cleanup->cleanup_fn(cleanup->data);
             
-            if (mem_sys->free_fn != NULL)
+            if (mem_sys->free_fn)
                 apr_sms_free(mem_sys, cleanup);
 
             cleanup = *cleanup_ref;
diff -ru apr/memory/unix/apr_sms_std.c apr-style/memory/unix/apr_sms_std.c
--- apr/memory/unix/apr_sms_std.c	Tue May 15 01:19:46 2001
+++ apr-style/memory/unix/apr_sms_std.c	Sun May 20 05:54:56 2001
@@ -107,14 +107,14 @@
 {
     apr_sms_t *new_mem_sys;
 
-    assert(mem_sys != NULL);
+    assert(mem_sys);
 
     *mem_sys = NULL;
     /* should we be using apr_sms_calloc now we have it??? */
     new_mem_sys = apr_sms_create(malloc(sizeof(apr_sms_t)),
                                  NULL);
 
-    if (new_mem_sys == NULL)
+    if (!new_mem_sys)
         return APR_ENOMEM;
 
     new_mem_sys->malloc_fn  = apr_sms_std_malloc;
@@ -125,6 +125,7 @@
      * track of our allocations, we don't have apr_sms_reset or
      * apr_sms_destroy functions.
      */
+    
     apr_sms_assert(new_mem_sys);
 
     *mem_sys = new_mem_sys;
diff -ru apr/memory/unix/apr_sms_tracking.c apr-style/memory/unix/apr_sms_tracking.c
--- apr/memory/unix/apr_sms_tracking.c	Tue May 15 01:19:47 2001
+++ apr-style/memory/unix/apr_sms_tracking.c	Sun May 20 05:52:44 2001
@@ -91,18 +91,18 @@
     apr_sms_tracking_t *tms;
     apr_track_node_t *node;
   
-    assert (mem_sys != NULL);
+    assert(mem_sys);
 
     tms = (apr_sms_tracking_t *)mem_sys;
     node = apr_sms_malloc(mem_sys->parent_mem_sys,
                           size + sizeof(apr_track_node_t));
-    if (node == NULL)
+    if (!node)
         return NULL;
 
     node->next = tms->nodes;
     tms->nodes = node;
     node->ref = &tms->nodes;
-    if (node->next != NULL)
+    if (node->next)
         node->next->ref = &node->next;
 
     node++;
@@ -110,24 +110,24 @@
     return (void *)node;
 }
 
-static  void * apr_sms_tracking_calloc(apr_sms_t *mem_sys, 
-                                       apr_size_t size)
+static void * apr_sms_tracking_calloc(apr_sms_t *mem_sys, 
+                                      apr_size_t size)
 {
     apr_sms_tracking_t *tms;
     apr_track_node_t *node;
   
-    assert (mem_sys != NULL);
+    assert(mem_sys);
 
     tms = (apr_sms_tracking_t *)mem_sys;
     node = apr_sms_calloc(mem_sys->parent_mem_sys,
                           size + sizeof(apr_track_node_t));
-    if (node == NULL)
+    if (!node)
         return NULL;
 
     node->next = tms->nodes;
     tms->nodes = node;
     node->ref = &tms->nodes;
-    if (node->next != NULL)
+    if (node->next)
         node->next->ref = &node->next;
 
     node++;
@@ -135,18 +135,18 @@
     return (void *)node;
 }
 
-static  void * apr_sms_tracking_realloc(apr_sms_t *mem_sys,
-                                        void *mem, apr_size_t size)
+static void * apr_sms_tracking_realloc(apr_sms_t *mem_sys,
+                                       void *mem, apr_size_t size)
 {
     apr_sms_tracking_t *tms;
     apr_track_node_t *node;
 
-    assert (mem_sys != NULL);
+    assert(mem_sys);
 
     tms = (apr_sms_tracking_t *)mem_sys;
     node = (apr_track_node_t *)mem;
 
-    if (node != NULL)
+    if (node)
     {
         node--;
         *(node->ref) = node->next;
@@ -154,13 +154,13 @@
 
     node = apr_sms_realloc(mem_sys->parent_mem_sys,
                            node, size + sizeof(apr_track_node_t));
-    if (node == NULL)
+    if (!node)
         return NULL;
 
     node->next = tms->nodes;
     tms->nodes = node;
     node->ref = &tms->nodes;
-    if (node->next != NULL)
+    if (node->next)
         node->next->ref = &node->next;
 
     node++;
@@ -168,19 +168,19 @@
     return (void *)node;
 }
 
-static  apr_status_t apr_sms_tracking_free(apr_sms_t *mem_sys,
-                                           void *mem)
+static apr_status_t apr_sms_tracking_free(apr_sms_t *mem_sys,
+                                          void *mem)
 {
     apr_track_node_t *node;
 
-    assert (mem_sys != NULL);
-    assert (mem != NULL);
+    assert(mem_sys);
+    assert(mem);
 
     node = (apr_track_node_t *)mem;
     node--;
 
     *(node->ref) = node->next;
-    if (node->next != NULL)
+    if (node->next)
         node->next->ref = node->ref;
           
     return apr_sms_free(mem_sys->parent_mem_sys, node);
@@ -192,31 +192,32 @@
     apr_track_node_t *node;
     apr_status_t rv;
     
-    assert (mem_sys != NULL);
+    assert(mem_sys);
 
     tms = (apr_sms_tracking_t *)mem_sys;
 
-    while (tms->nodes != NULL)
-    {
+    while (tms->nodes) {
         node = tms->nodes;
         *(node->ref) = node->next;
-        if (node->next != NULL)
+        if (node->next)
             node->next->ref = node->ref;
         if ((rv = apr_sms_free(mem_sys->parent_mem_sys, 
                                node)) != APR_SUCCESS)
             return rv;
     }
+    
     return APR_SUCCESS;
 }
 
 static apr_status_t apr_sms_tracking_destroy(apr_sms_t *mem_sys)
 {
     apr_status_t rv;
+    
     /* If this is NULL we won't blow up as it should be caught at the
      * next level down and then passed back to us...
      */
 #ifdef APR_ASSERT_MEMORY
-    assert (mem_sys->parent_mem_sys != NULL);
+    assert(mem_sys->parent_mem_sys);
 #endif
     
     if (!mem_sys)
@@ -224,6 +225,7 @@
 
     if ((rv = apr_sms_tracking_reset(mem_sys)) != APR_SUCCESS)
         return rv;
+    
     return apr_sms_free(mem_sys->parent_mem_sys, mem_sys);
 }
 
@@ -233,8 +235,9 @@
     apr_sms_t *new_mem_sys, *tmpms;
     apr_sms_tracking_t *tms;
 
-    assert (mem_sys != NULL);
-    assert (pms != NULL);
+    assert(mem_sys);
+    assert(pms);
+    
     *mem_sys = NULL;
     /* changed this to 2 stages to make easier to follow...
      * should we be using apr_sms_calloc now we have it? 
@@ -242,7 +245,7 @@
     tmpms = apr_sms_malloc(pms, sizeof(apr_sms_tracking_t));
     new_mem_sys = apr_sms_create(tmpms, pms);
 
-    if (new_mem_sys == NULL)
+    if (!new_mem_sys)
         return APR_ENOMEM;
 
     new_mem_sys->malloc_fn  = apr_sms_tracking_malloc;
