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

Re: svn commit: r1696626 - /subversion/trunk/subversion/libsvn_ra_serf/util.c

From: Branko ─îibej <brane_at_wandisco.com>
Date: Wed, 19 Aug 2015 19:57:46 +0200

On 19.08.2015 18:26, stefan2_at_apache.org wrote:
> Author: stefan2
> Date: Wed Aug 19 16:26:05 2015
> New Revision: 1696626
>
> URL: http://svn.apache.org/r1696626
> Log:
> * subversion/libsvn_ra_serf/util.c
> (ssl_convert_serf_failures): When doing array size calculations, refer to
> the array object only.
>
> Modified:
> subversion/trunk/subversion/libsvn_ra_serf/util.c
>
> Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1696626&r1=1696625&r2=1696626&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_serf/util.c Wed Aug 19 16:26:05 2015
> @@ -65,7 +65,9 @@ ssl_convert_serf_failures(int failures)
> apr_uint32_t svn_failures = 0;
> apr_size_t i;
>
> - for (i = 0; i < sizeof(serf_failure_map) / (2 * sizeof(apr_uint32_t)); ++i)
> + for (i = 0;
> + i < sizeof(serf_failure_map) / (sizeof(serf_failure_map[0]));
> + ++i)
> {
> if (failures & serf_failure_map[i][0])
> {

This one would've been better served by introducing a constant for the
array size ...

-- Brane
Received on 2015-08-19 19:57:57 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.