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

Re: svn commit: r34540 - trunk/subversion/libsvn_fs_base/bdb

From: Branko Cibej <brane_at_xbc.nu>
Date: Wed, 03 Dec 2008 17:25:36 +0100

C. Michael Pilato wrote:
> Blair, this code you replaced was doing something arguably kinda obscure,
> and certainly not of the sort that is often found in our codebase. Any
> chance the original author might have been trying to accomplish something
> other than just passing a string to a function in the not-so-easiest way?
>

Quite a non-infinitesimal chance there. I didn't have the time to review
Blair's original patch yet; let me do that first, please.

>
> Blair Zajac wrote:
>
>> Author: blair
>> Date: Tue Dec 2 15:56:56 2008
>> New Revision: 34540
>>
>> Log:
>> * subversion/libsvn_fs_base/bdb/env.c
>> (create_env):
>> Instead of relying upon the layout order of a bdb_env_t with the
>> errpfx_string as the first field so that casting a (bdb_env_t *)
>> to a (char *) works, refer to the errpfx_string field by name.
>>
>> Modified:
>> trunk/subversion/libsvn_fs_base/bdb/env.c
>>
>> Modified: trunk/subversion/libsvn_fs_base/bdb/env.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_base/bdb/env.c?pathrev=34540&r1=34539&r2=34540
>> ==============================================================================
>> --- trunk/subversion/libsvn_fs_base/bdb/env.c Tue Dec 2 13:12:13 2008 (r34539)
>> +++ trunk/subversion/libsvn_fs_base/bdb/env.c Tue Dec 2 15:56:56 2008 (r34540)
>> @@ -311,7 +311,7 @@ create_env(bdb_env_t **bdbp, const char
>> db_err = db_env_create(&(bdb->env), 0);
>> if (!db_err)
>> {
>> - bdb->env->set_errpfx(bdb->env, (char *) bdb);
>> + bdb->env->set_errpfx(bdb->env, bdb->errpfx_string);
>> /* bdb_error_gatherer is in parens to stop macro expansion. */
>> bdb->env->set_errcall(bdb->env, (bdb_error_gatherer));
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=978594
>>
>
>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=978956
Received on 2008-12-03 17:31:31 CET

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.