subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@wandisco.com>
Subject Re: svn commit: r1563991 - /subversion/trunk/subversion/libsvn_ra_serf/update.c
Date Tue, 04 Feb 2014 11:43:14 GMT
On 03.02.2014 19:07, breser@apache.org wrote:
> Author: breser
> Date: Mon Feb  3 18:07:55 2014
> New Revision: 1563991
>
> URL: http://svn.apache.org/r1563991
> Log:
> Fix a compiler warning by removing some pointless code.
>
> * subversion/libsvn_ra_serf/update.c
>   (body_allocate_all): Remove test for sz >= 0, apr_size_t is not signed so it
>     will always be true.

Well, yes, but I guess the original intent was to "optimize" the code by
not performing a no-op memcpy. Now you can decide to go the academic
route and replace the "sz >= 0" with "sz > 0", or be more practical and
assume the compiler will inline memcpy anyway, and the additional check
of the size will get optimized out.

-- Brane

-- 
Branko ─îibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com

Mime
View raw message