[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] ra_dav error handling tweaks

From: Joe Orton <jorton_at_redhat.com>
Date: 2005-06-14 10:43:34 CEST

A couple of minor tweaks to error handling in ra_dav; this has passed
davautocheck:

* subversion/libsvn_ra_dav/fetch.c (svn_ra_dav__get_locks): Clear
error returned by svn_ra_dav__parsed_request if returning the error
stored in the baton. Return SVN_NO_ERROR for the non-error case
where err is guaranteed to be NULL by the preceding code.
(custom_get_request): Collapse a redundant conditional.

Index: subversion/libsvn_ra_dav/fetch.c
===================================================================
--- subversion/libsvn_ra_dav/fetch.c (revision 15052)
+++ subversion/libsvn_ra_dav/fetch.c (working copy)
@@ -522,10 +522,7 @@
     }
 #endif /* ! SVN_NEON_0_25_0 */
 
- if (err)
- return err;
-
- return SVN_NO_ERROR;
+ return err;
 }
 
 /* This implements the ne_block_reader() callback interface. */
@@ -1633,7 +1630,12 @@
                                    FALSE,
                                    pool);
   if (baton.err)
- return baton.err;
+ {
+ if (err)
+ svn_error_clear(err);
+
+ return baton.err;
+ }
 
   /* Map status 501: Method Not Implemented to our not implemented error.
      1.0.x servers and older don't support this report. */
@@ -1651,7 +1653,7 @@
   svn_pool_destroy(baton.scratchpool);
 
   *locks = baton.lock_hash;
- return err;
+ return SVN_NO_ERROR;
 }
 
 /* ------------------------------------------------------------------------- */

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 14 10:44:45 2005

This is an archived mail posted to the Subversion Dev mailing list.