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?
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
--
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=978871
Received on 2008-12-03 14:06:35 CET