Hi Daniel, On Tue, Mar 15, 2011 at 10:17 AM, Daniel Shahaf <d...@daniel.shahaf.name> wrote: >> Modified: subversion/trunk/subversion/libsvn_diff/parse-diff.c >> URL: >> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/parse-diff.c?rev=1079686&r1=1079685&r2=1079686&view=diff >> ============================================================================== >> --- subversion/trunk/subversion/libsvn_diff/parse-diff.c (original) >> +++ subversion/trunk/subversion/libsvn_diff/parse-diff.c Wed Mar 9 07:40:38 >> 2011 >> @@ -287,18 +287,15 @@ scan_eol(const char **eol, apr_file_t *f >> { >> char buf[256]; >> apr_size_t len; >> - svn_error_t *err; >> + svn_boolean_t eof = FALSE; >> > > You don't need to initialize EOF.
Done. > Also, you don't actually *read* that variable anywhere, so you should > drop it entirely :-) If I drop this variable and pass a NULL to the new API then I need to handle "APR_STATUS_IS_EOF" with an 'if...else' as done before. I think this is more simple and avoids conditional checks. >> if (total_len >= max_len) >> break; >> >> len = sizeof(buf) - 1 < (max_len - total_len) ? sizeof(buf) - 1 >> : (max_len - total_len); >> - err = svn_io_file_read_full(file, buf, sizeof(buf) - 1, &len, pool); >> - if (err && APR_STATUS_IS_EOF(err->apr_err)) >> - svn_error_clear(err); >> - else >> - SVN_ERR(err); >> + SVN_ERR(svn_io_file_read_full2(file, buf, sizeof(buf) - 1, &len, &eof, >> + pool)); > > sizeof(buf)-1 or sizeof(buf)? The next call passes sizeof(c) (which, > there, is a char). Yes agreed. Done the changes in r1082838. Thank You. -- Senthil Kumaran S http://www.stylesen.org/ http://www.sasenthilkumaran.com/