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

Re: svn commit: r9697 - in trunk/subversion: clients/cmdline include libsvn_client libsvn_subr

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-05-14 02:53:16 CEST

On Wed, 2004-05-12 at 18:57, brane@tigris.org wrote:
> + svn_error_t *err = SVN_NO_ERROR;
> + int i;
> +
> + for (i = 0; checklist[i].label != NULL; ++i)
> + {
> + const svn_version_t *lib_version = checklist[i].version_query();
> + if (!svn_ver_compatible (my_version, lib_version))
> + err = mismatch_error (checklist[i].label, lib_version, err);
> + }
> +
> + return err;

This could leak errors. Hardly a big deal in practice, but adding "&&
!err" to the loop condition, or a break to the body of the if statement,
would make the code more correct.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 14 02:53:34 2004

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.