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

RE: svn commit: rev 5259 - trunk/subversion/libsvn_ra_dav

From: Sander Striker <striker_at_apache.org>
Date: 2003-03-10 14:54:42 CET

> From: cmpilato@tigris.org [mailto:cmpilato@tigris.org]
> Sent: Monday, March 10, 2003 2:23 PM

> Author: cmpilato
> Date: Mon Mar 10 07:22:27 2003
> New Revision: 5259
>
> Modified:
> trunk/subversion/libsvn_ra_dav/commit.c
> Log:
> * subversion/libsvn_ra_dav/commit.c
> (add_valid_target): Ensure proper lifetime of the paths in the hash.
>
> Modified: trunk/subversion/libsvn_ra_dav/commit.c
> ==============================================================================
> --- trunk/subversion/libsvn_ra_dav/commit.c (original)
> +++ trunk/subversion/libsvn_ra_dav/commit.c Mon Mar 10 07:22:27 2003
> @@ -661,7 +661,8 @@
> enum svn_recurse_kind kind)
> {
> apr_hash_t *hash = cc->valid_targets;
> - apr_hash_set (hash, path, APR_HASH_KEY_STRING, &kind);
> + svn_string_t *path_str = svn_string_create(path, apr_hash_pool_get(hash));
> + apr_hash_set (hash, path_str->data, path_str->len, &kind);
> }

Why not just like so?

    apr_hash_set (hash, apr_pstrdup (apr_hash_pool_get (hash), path),
                  APR_HASH_KEY_STRING, &kind);

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 10 14:55:26 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.