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 Hudson <gh...@MIT.EDU> on 2004/07/12 01:20:14 UTC
Re: svn commit: r10242 - trunk/subversion/libsvn_repos
On Sun, 2004-07-11 at 18:07, rooneg@tigris.org wrote:
> - if (src_rev_from_map = apr_hash_get (pb->rev_map, &nb->copyfrom_rev,
> - sizeof(nb->copyfrom_rev)))
> + if ((src_rev_from_map = apr_hash_get (pb->rev_map, &nb->copyfrom_rev,
> + sizeof(nb->copyfrom_rev))))
Normally we would write this as an assignment statement followed by "if
(src_rev_from_map)", as recommended by the Gnu coding style (which we
admittedly only follow loosely).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r10242 - trunk/subversion/libsvn_repos
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Greg Hudson wrote:
> On Sun, 2004-07-11 at 18:07, rooneg@tigris.org wrote:
>
>>- if (src_rev_from_map = apr_hash_get (pb->rev_map, &nb->copyfrom_rev,
>>- sizeof(nb->copyfrom_rev)))
>>+ if ((src_rev_from_map = apr_hash_get (pb->rev_map, &nb->copyfrom_rev,
>>+ sizeof(nb->copyfrom_rev))))
>
>
> Normally we would write this as an assignment statement followed by "if
> (src_rev_from_map)", as recommended by the Gnu coding style (which we
> admittedly only follow loosely).
I don't have any particular objection to your suggestion, other than the
fact that the 'if ((foo = blah()))' style is already scattered
throughout this particular file (see svn_repos_parse_dumpstream2,
make_node_baton, make_revision_baton, and probably other places). If
someone wants to go through and 'correct' all of those, then fine, more
power to them, but for now I just did the 'smallest thing that would
stop the warning'.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org