You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2002/05/14 07:10:08 UTC

Re: svn commit: rev 1886 - trunk/subversion/libsvn_fs

On Mon, May 06, 2002 at 01:27:58PM -0500, cmpilato@tigris.org wrote:
>...
> +++ trunk/subversion/libsvn_fs/fs_skels.c	Mon May  6 13:27:57 2002
>...
> +is_valid_node_revision_header_skel (skel_t *skel, skel_t **kind_p)
> +{
> +  if (svn_fs__list_length (skel) >= 2)
> +    {
> +      if (skel->children->is_atom && skel->children->next->is_atom)
> +        {
> +          skel_t *option = skel->children->next->next;
> +
> +          for ( ; option; option = option->next)
> +            {
> +              if (! ((svn_fs__list_length (option) == 3)
> +                     && svn_fs__matches_atom (option->children, "copy")
> +                     && option->children->next->is_atom
> +                     && option->children->next->next->is_atom))
> +                return 0;
> +            }

This loop does not match the contenst of libsvn_fs/structure. It only
defines an optional "copy" item, not a whole list of options. Further, the
parse function and the related structure does not consider the multiple
options embodied by the code in this function.

>...
> +svn_error_t *
> +svn_fs__parse_entries_skel (apr_hash_t **entries_p,
>...
> +          /* Get the entry's name and ID. */
> +          name = apr_pstrndup (pool, elt->children->data, elt->children->len);
> +          id = svn_fs_parse_id (elt->children->next->data, 
> +                                elt->children->next->len, pool);
> +
> +          /* Add the entry to the hash. */
> +          apr_hash_set (entries, name, APR_HASH_KEY_STRING, (void *) id);

elt->children->len can be used rather than APR_HAS_KEY_STRING.

>... (in fs_skels.h) ...

> +svn_error_t *
> +svn_fs__unparse_node_revision_skel (skel_t **skel_p,
> +                                    svn_fs__node_revision_t *rep,

should be 'const'

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