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

Re: svn commit: r22646 - branches/ra_dav-refactoring/subversion/libsvn_ra_dav

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-12-11 20:43:02 CET

On Mon, 11 Dec 2006, dionisos@tigris.org wrote:

> Author: dionisos
> Date: Mon Dec 11 10:24:05 2006
> New Revision: 22646
>
> Log:
> ra_dav-refactoring: Assert the Neon request creation succeeded. This
> op can only fail when we're short on memory and creating an error means
> allocating memory - which we don't have...
>
> * subversion/libsvn_ra_dav/util.c
> (svn_ra_dav__request_create): Assert that the request was
> succesfully created.
>
> * subversion/libsvn_ra_dav/fetch.c
> * subversion/libsvn_ra_dav/commit.c
> No longer create errors when the result from svn_ra_dav__request_create()
> is NULL; it won't.
...
> --- branches/ra_dav-refactoring/subversion/libsvn_ra_dav/util.c (original)
> +++ branches/ra_dav-refactoring/subversion/libsvn_ra_dav/util.c Mon Dec 11 10:24:05 2006
> @@ -35,7 +35,7 @@
> #include "svn_private_config.h"
>
> #include "ra_dav.h"
> -
> +#include <assert.h>
>
>
>
> @@ -244,6 +244,7 @@
> req->method = apr_pstrdup(req->pool, method);
> req->url = apr_pstrdup(req->pool, url);
>
> + assert(req != NULL);
> apr_pool_cleanup_register(reqpool, req,
> dav_request_cleanup,
> apr_pool_cleanup_null);

How about an inline comment indicating why we expect that req might be
null (e.g. out of memory)?

  • application/pgp-signature attachment: stored
Received on Mon Dec 11 20:36:59 2006

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