[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 2115 - trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_subr trunk/subversion/libsvn_client trunk/subversion/tests/clients/cmdline

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-06-07 23:02:02 CEST

On Fri, Jun 07, 2002 at 03:11:59PM -0500, Karl Fogel wrote:
> > > + if (hash_b)
> > > + for (hi = apr_hash_first (pool, hash_b); hi; hi = apr_hash_next (hi))
> > > + {
> > > + const void *key;
> > > + apr_ssize_t klen;
> > > +
> > > + apr_hash_this (hi, &key, &klen, NULL);
> > > +
> > > + if (! (hash_a && apr_hash_get (hash_a, key, klen)))
> > > + SVN_ERR ((*diff_func) (key, klen, svn_hash_diff_key_b,
> > > + diff_func_baton));
> > > + }
> >
> > The condition should be: if (hash_b != NULL && hash_a != NULL)
> >
> > The code block does nothing if hash_a is NULL, so no reason to iterate over
> > hash_b.
>
> Which condition (the first `if', or the second)?

I meant the first 'if', but that doesn't make sense. I misread the second
'if' as "if hash_a is NULL, then don't call the diff_func". But the behavior
is opposite that: if hash_a is NULL, then the diff_func is *always* called.

Ignore me. Brain fart.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 7 23:01:16 2002

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.