subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Shahaf <danie...@elego.de>
Subject Re: svn commit: r1325899 - in /subversion/trunk/subversion/libsvn_ra_svn: marshal.c ra_svn.h
Date Thu, 26 Apr 2012 09:05:39 GMT
stefan2@apache.org wrote on Fri, Apr 13, 2012 at 18:36:46 -0000:
> Author: stefan2
> Date: Fri Apr 13 18:36:46 2012
> New Revision: 1325899
> 
> URL: http://svn.apache.org/viewvc?rev=1325899&view=rev
> Log:
> Various performance improvements to the ra_svn marshaller.
> The total effect is roughly a duplication in throughput.
> 
>  /* --- WRITING DATA ITEMS --- */
>  
> +static svn_error_t *write_number(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
> +                                 apr_uint64_t number, char follow)
> +{
> +  apr_size_t written;
> +
> +  if (conn->write_pos + SVN_INT64_BUFFER_SIZE >= sizeof(conn->write_buf))

Off-by-one?  You don't check for room for the character FOLLOW.

> +    SVN_ERR(writebuf_flush(conn, pool));
> +
> +  written = svn__ui64toa(conn->write_buf + conn->write_pos, number);
> +  conn->write_buf[conn->write_pos + written] = follow;
> +  conn->write_pos += written + 1;
> +
> +  return SVN_NO_ERROR;
> +}

Mime
View raw message