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

Re: svn commit: r33043 - trunk/subversion/libsvn_client

From: Greg Stein <gstein_at_gmail.com>
Date: Sat, 13 Sep 2008 16:26:21 -0700

On Fri, Sep 12, 2008 at 12:10 PM, <hwright_at_tigris.org> wrote:
>...
> +++ trunk/subversion/libsvn_client/commit.c Fri Sep 12 12:10:13 2008 (r33043)
> @@ -151,11 +151,8 @@ send_file_contents(const char *path,
> digest, pool));
>
> /* Close our contents file. */
> - SVN_ERR(svn_io_file_close(f, pool));
> -
> + return svn_io_file_close(f, pool);
> /* The temp file is removed by the pool cleanup run by the caller */
> -
> - return SVN_NO_ERROR;
> }

The comment is left *after* the return statement. Odd placement :-P

>...
> +++ trunk/subversion/libsvn_client/repos_diff.c Fri Sep 12 12:10:13 2008 (r33043)
>...
> @@ -1092,14 +1082,13 @@ svn_client__get_diff_editor(const char *
> tree_editor->absent_directory = absent_directory;
> tree_editor->absent_file = absent_file;
>
> - SVN_ERR(svn_delta_get_cancellation_editor(cancel_func,
> - cancel_baton,
> - tree_editor,
> - eb,
> - editor,
> - edit_baton,
> - pool));
> + return svn_delta_get_cancellation_editor(cancel_func,
> + cancel_baton,
> + tree_editor,
> + eb,
> + editor,
> + edit_baton,
> + pool);
>
> /* We don't destroy subpool, as it's managed by the edit baton. */
> - return SVN_NO_ERROR;
> }

Same here.

>...

And, FWIW, I kinda like the more explicit "return" statements, but
also kinda agree that it introduces a bit of inconsistency in handling
function calls' return values (use SVN_ERR or return them?). But I
could go either way (as it was before, or the new form).

Cheers,
-g

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-14 01:26:39 CEST

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.