subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1653802 - in /subversion/trunk/subversion/bindings/javahl/native: CreateJ.cpp RemoteSession.cpp
Date Thu, 22 Jan 2015 10:29:35 GMT
Author: julianfoad
Date: Thu Jan 22 10:29:34 2015
New Revision: 1653802

URL: http://svn.apache.org/r1653802
Log:
* subversion/bindings/javahl/native/CreateJ.cpp
  (fill_property_map,
   property_map): Simplify assertion conditions.

* subversion/bindings/javahl/native/RemoteSession.cpp
  (RemoteSession::open): Same.

Found by GCC compiler warnings about mixing && and ||.

Modified:
    subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp
    subversion/trunk/subversion/bindings/javahl/native/RemoteSession.cpp

Modified: subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp?rev=1653802&r1=1653801&r2=1653802&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp Thu Jan 22 10:29:34 2015
@@ -1096,8 +1096,7 @@ void fill_property_map(jobject map,
                        apr_hash_t* prop_hash, apr_array_header_t* prop_diffs,
                        apr_pool_t* scratch_pool, jmethodID put_mid)
 {
-  SVN_ERR_ASSERT_NO_RETURN(!prop_hash != !prop_diffs
-                           || !prop_hash && !prop_diffs);
+  SVN_ERR_ASSERT_NO_RETURN(!(prop_hash && prop_diffs));
 
   if (!map || (prop_hash == NULL && prop_diffs == NULL))
     return;
@@ -1189,8 +1188,7 @@ void fill_property_map(jobject map,
 jobject property_map(apr_hash_t *prop_hash, apr_array_header_t* prop_diffs,
                      apr_pool_t* scratch_pool)
 {
-  SVN_ERR_ASSERT_NO_RETURN(!prop_hash != !prop_diffs
-                           || !prop_hash && !prop_diffs);
+  SVN_ERR_ASSERT_NO_RETURN(!(prop_hash && prop_diffs));
 
   if (prop_hash == NULL && prop_diffs == NULL)
     return NULL;

Modified: subversion/trunk/subversion/bindings/javahl/native/RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/RemoteSession.cpp?rev=1653802&r1=1653801&r2=1653802&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/RemoteSession.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/RemoteSession.cpp Thu Jan 22 10:29:34
2015
@@ -71,8 +71,7 @@ RemoteSession::open(jint jretryAttempts,
                     jobject jprompter, jobject jdeprecatedPrompter,
                     jobject jprogress, jobject jcfgcb, jobject jtunnelcb)
 {
-  SVN_ERR_ASSERT_NO_RETURN(!jprompter != !jdeprecatedPrompter
-                           || !jprompter && !jdeprecatedPrompter);
+  SVN_ERR_ASSERT_NO_RETURN(!(jprompter && jdeprecatedPrompter));
 
   SVN::Pool requestPool;
   URL url(jurl, requestPool);



Mime
View raw message