Re: svn commit: rev 2216 - trunk/subversion/include trunk/subversion/libsvn_client trunk/subversion/clients/cmdline trunk/subversion/tests/clients/cmdline/getopt_tests_data
From: Greg Stein <gstein_at_lyra.org>
Date: 2002-06-14 21:53:11 CEST
On Fri, Jun 14, 2002 at 01:43:26PM -0500, rooneg@tigris.org wrote:
No need to do this. svn_io_get_dirents() creates and returns one to you.
> + const enum svn_node_kind *type;
We normally move variables to the innermost block possible. Thus: key, val,
(and const for the key, as Philip points out)
>...
'const char *'. By leaving off the const, you imply that you might be
> + if (strlen (item) == sizeof (SVN_WC_ADM_DIR_NAME) - 1
This is rather excessive. You're looping over the string twice. Just do the
>...
No need to make this.
> + const enum svn_node_kind *type;
Moving variables again...
>...
That check is wrong. It will match '.svnfoo'. Just use strcmp().
>...
'const char *'
>...
ditto.
> + entry = NULL;
You shouldn't need to set entry to NULL. svn_wc_entry() will do it.
>...
This subpool covers the whole function. I think you may want to just use the
And in general, a subpool that just wraps what a function does is suspect.
Cheers,
-- Greg Stein, http://www.lyra.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.orgReceived on Fri Jun 14 21:51:48 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.