Author: danielsh
Date: Fri Aug 14 00:32:32 2015
New Revision: 1695804

URL: http://svn.apache.org/r1695804
Log:
On the patch-exec branch: Fix a bug in a "Can't happen" codepath.

* subversion/libsvn_client/patch.c
  (contradictory_executability): Fix the sense of a boolean check.

Modified:
    subversion/branches/patch-exec/subversion/libsvn_client/patch.c

Modified: subversion/branches/patch-exec/subversion/libsvn_client/patch.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/libsvn_client/patch.c?rev=1695804&r1=1695803&r2=1695804&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/patch-exec/subversion/libsvn_client/patch.c Fri Aug 14 
00:32:32 2015
@@ -978,12 +978,14 @@ contradictory_executability(const svn_pa
         /* ### Can this happen? */
         return (patch->old_executable_p != svn_tristate_unknown
                 && patch->new_executable_p != svn_tristate_unknown
-                && patch->old_executable_p == patch->new_executable_p);
+                && patch->old_executable_p != patch->new_executable_p);
 
       case svn_diff_op_modified:
+        /* Can't happen: the property should only ever be added or deleted,
+         * but never modified from one valid value to another. */
         return (patch->old_executable_p != svn_tristate_unknown
                 && patch->new_executable_p != svn_tristate_unknown
-                && patch->old_executable_p != patch->new_executable_p);
+                && patch->old_executable_p == patch->new_executable_p);
 
       default:
         /* Can't happen: the proppatch parser never generates other values. */


Reply via email to