subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1395842 - /subversion/trunk/subversion/libsvn_subr/io.c
Date Tue, 09 Oct 2012 01:56:35 GMT
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,



Mime
View raw message