You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2011/05/18 15:22:30 UTC

svn commit: r1124254 - /subversion/trunk/subversion/libsvn_subr/cache-inprocess.c

Author: danielsh
Date: Wed May 18 13:22:29 2011
New Revision: 1124254

URL: http://svn.apache.org/viewvc?rev=1124254&view=rev
Log:
cache_inprocess.c =~ s/assert/SVN_ERR_ASSERT/

* subversion/libsvn_subr/cache-inprocess.c
  (move_page_to_front): Change return type and s/assert/SVN_ERR_ASSERT/.
  (inprocess_cache_t, inprocess_cache_get, inprocess_cache_set,
   inprocess_cache_get_partial, inprocess_cache_set_partial):
     Track change.

Modified:
    subversion/trunk/subversion/libsvn_subr/cache-inprocess.c

Modified: subversion/trunk/subversion/libsvn_subr/cache-inprocess.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-inprocess.c?rev=1124254&r1=1124253&r2=1124254&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/cache-inprocess.c (original)
+++ subversion/trunk/subversion/libsvn_subr/cache-inprocess.c Wed May 18 13:22:29 2011
@@ -148,11 +148,11 @@ insert_page(inprocess_cache_t *cache,
 
 /* If PAGE is in the circularly linked list (eg, its NEXT isn't NULL),
  * move it to the front of the list. */
-static void
+static svn_error_t *
 move_page_to_front(inprocess_cache_t *cache,
                    struct cache_page *page)
 {
-  assert(page != cache->sentinel);
+  SVN_ERR_ASSERT(page != cache->sentinel);
 
   if (! page->next)
     return;
@@ -230,7 +230,7 @@ inprocess_cache_get(void **value_p,
       return unlock_cache(cache, SVN_NO_ERROR);
     }
 
-  move_page_to_front(cache, entry->page);
+  SVN_ERR(move_page_to_front(cache, entry->page));
 
   /* duplicate the buffer entry */
   buffer = apr_palloc(pool, entry->size);
@@ -321,7 +321,7 @@ inprocess_cache_set(void *cache_void,
     {
       struct cache_page *page = existing_entry->page;
 
-      move_page_to_front(cache, page);
+      SVN_ERR(move_page_to_front(cache, page));
       cache->data_size -= existing_entry->size;
       if (value)
         {
@@ -474,7 +474,7 @@ inprocess_cache_get_partial(void **value
       return unlock_cache(cache, SVN_NO_ERROR);
     }
 
-  move_page_to_front(cache, entry->page);
+  SVN_ERR(move_page_to_front(cache, entry->page));
 
   *found = TRUE;
   return unlock_cache(cache,
@@ -498,7 +498,7 @@ inprocess_cache_set_partial(void *cache_
   if (! entry)
     return unlock_cache(cache, err);
 
-  move_page_to_front(cache, entry->page);
+  SVN_ERR(move_page_to_front(cache, entry->page));
 
   cache->data_size -= entry->size;
   err = func((char **)&entry->value,



Re: svn commit: r1124254 - /subversion/trunk/subversion/libsvn_subr/cache-inprocess.c

Posted by Daniel Shahaf <da...@apache.org>.
danielsh@apache.org wrote on Wed, May 18, 2011 at 13:22:30 -0000:
> Author: danielsh
> Date: Wed May 18 13:22:29 2011
> New Revision: 1124254
> 
> URL: http://svn.apache.org/viewvc?rev=1124254&view=rev
> Log:
> cache_inprocess.c =~ s/assert/SVN_ERR_ASSERT/
> 
> * subversion/libsvn_subr/cache-inprocess.c
>   (move_page_to_front): Change return type and s/assert/SVN_ERR_ASSERT/.
>   (inprocess_cache_t, inprocess_cache_get, inprocess_cache_set,
>    inprocess_cache_get_partial, inprocess_cache_set_partial):
>      Track change.
> 
> Modified:
>     subversion/trunk/subversion/libsvn_subr/cache-inprocess.c
> 
> Modified: subversion/trunk/subversion/libsvn_subr/cache-inprocess.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-inprocess.c?rev=1124254&r1=1124253&r2=1124254&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_subr/cache-inprocess.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/cache-inprocess.c Wed May 18 13:22:29 2011
> @@ -148,11 +148,11 @@ insert_page(inprocess_cache_t *cache,
>  
>  /* If PAGE is in the circularly linked list (eg, its NEXT isn't NULL),
>   * move it to the front of the list. */
> -static void
> +static svn_error_t *
>  move_page_to_front(inprocess_cache_t *cache,
>                     struct cache_page *page)
>  {
> -  assert(page != cache->sentinel);
> +  SVN_ERR_ASSERT(page != cache->sentinel);
>  
>    if (! page->next)
>      return;

This broke two bots (so far):

[[[
16:28:27 < subversion-bot> build #4181 of svn-slik-w2k3-x64-local is complete: Failure [failed Test 
                           fsfs+local Test Bindings]  Build details are at 
                           http://ci.apache.org/builders/svn-slik-w2k3-x64-local/builds/4181  
                           blamelist: danielsh
16:28:58 < subversion-bot> build #4120 of svn-debian-x64-32-shared-gcc is complete: Failure [failed 
                           Test fsfs+ra_svn]  Build details are at 
                           http://ci.apache.org/builders/svn-debian-x64-32-shared-gcc/builds/4120  
                           blamelist: danielsh
]]]

I'd be happy if whoever added that assert() could look into that... (but
if not I'm happy to try and have a look --- once I've become familiar
with this part of the code)