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

Re: CVS update: subversion/subversion/libsvn_fs dag.c

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-02-22 04:57:39 CET

On Wed, Feb 21, 2001 at 09:15:41PM -0000, sussman@tigris.org wrote:
>...
> --- dag.c 2001/02/21 20:22:36 1.24
> +++ dag.c 2001/02/21 21:15:41 1.25
> @@ -153,6 +153,31 @@
> }
>
>
> +int svn_fs__dag_is_mutable (dag_node_t *node)
> +{
> + /* The node "header" is the first element of a node-revision skel,
> + itself a list. */
> + skel_t *header = node->contents->children;
> +
> + /* The 3nd element of the header, IF it exists, is the header's
> + first `flag'. It could be NULL. */
> + skel_t *flag = header->children->next->next;
> +
> + while (flag)
> + {
> + /* If current flag is a list... */
> + if (flag->children)
> + if (! memcmp (flag->children->data, "mutable", flag->children->len))
> + return TRUE;

Similar problem here, as I described in my previous email.

Note that you can save yourself a lot of headache, and add clarity by simply
using svn_fs__is_atom() :-)

It even checks for NULL, so you could do:

    if (svn_fs__is_atom(flag->children, "mutable"))
      return TRUE;

whee! :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:23 2006

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.