You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/10/09 03:56:35 UTC
svn commit: r1395842 - /subversion/trunk/subversion/libsvn_subr/io.c
Author: hwright
Date: Tue Oct 9 01:56:34 2012
New Revision: 1395842
URL: http://svn.apache.org/viewvc?rev=1395842&view=rev
Log:
Avoid an unneeded if when locking files (with an explanitory comment as
to why).
* subversion/libsvn_subr/io.c
(svn_io_file_lock2): Comment out a currently-unneed if-block.
Modified:
subversion/trunk/subversion/libsvn_subr/io.c
Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1395842&r1=1395841&r2=1395842&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Tue Oct 9 01:56:34 2012
@@ -2058,8 +2058,12 @@ svn_io_file_lock2(const char *lock_file,
if (locktype == APR_FLOCK_EXCLUSIVE)
flags |= APR_WRITE;
+ /* locktype is never read after this block, so we don't need to bother
+ setting it. If that were to ever change, uncomment the following
+ block.
if (nonblocking)
locktype |= APR_FLOCK_NONBLOCK;
+ */
SVN_ERR(svn_io_file_open(&lockfile_handle, lock_file, flags,
APR_OS_DEFAULT,