subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r932603 - in /subversion/trunk/subversion/libsvn_client: mergeinfo.c prop_commands.c switch.c
Date Fri, 09 Apr 2010 20:52:13 GMT
Author: hwright
Date: Fri Apr  9 20:52:12 2010
New Revision: 932603

URL: http://svn.apache.org/viewvc?rev=932603&view=rev
Log:
Remove a couple of unneeded if statements by directly assigning booleans,
rather than doing so inside the if.

* subversion/libsvn_client/switch.c
  (svn_client__switch_internal): Directly assign a boolean, and clear the
    error.

* subversion/libsvn_client/prop_commands.c
  (svn_client_proplist3): Directly assign a boolean.

* subversion/libsvn_client/mergeinfo.c
  (should_elide_mergeinfo): Same.

Modified:
    subversion/trunk/subversion/libsvn_client/mergeinfo.c
    subversion/trunk/subversion/libsvn_client/prop_commands.c
    subversion/trunk/subversion/libsvn_client/switch.c

Modified: subversion/trunk/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mergeinfo.c?rev=932603&r1=932602&r2=932603&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_client/mergeinfo.c Fri Apr  9 20:52:12 2010
@@ -787,10 +787,7 @@ should_elide_mergeinfo(svn_boolean_t *el
       /* Empty mergeinfo elides to empty mergeinfo or to "nothing",
          i.e. it isn't overriding any parent. Otherwise it doesn't
          elide. */
-      if (!parent_mergeinfo || apr_hash_count(parent_mergeinfo) == 0)
-        *elides = TRUE;
-      else
-        *elides = FALSE;
+      *elides = (!parent_mergeinfo || apr_hash_count(parent_mergeinfo) == 0);
     }
   else if (!parent_mergeinfo || apr_hash_count(parent_mergeinfo) == 0)
     {

Modified: subversion/trunk/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/prop_commands.c?rev=932603&r1=932602&r2=932603&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/prop_commands.c Fri Apr  9 20:52:12 2010
@@ -1195,15 +1195,8 @@ svn_client_proplist3(const char *path_or
       else
         SVN_ERR(err);
 
-      if ((revision->kind == svn_opt_revision_committed)
-          || (revision->kind == svn_opt_revision_base))
-        {
-          pristine = TRUE;
-        }
-      else  /* must be the working revision */
-        {
-          pristine = FALSE;
-        }
+      pristine = ((revision->kind == svn_opt_revision_committed)
+                    || (revision->kind == svn_opt_revision_base));
 
       if (changelists && changelists->nelts)
         SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash,

Modified: subversion/trunk/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/switch.c?rev=932603&r1=932602&r2=932603&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/switch.c (original)
+++ subversion/trunk/subversion/libsvn_client/switch.c Fri Apr  9 20:52:12 2010
@@ -301,13 +301,9 @@ svn_client__switch_internal(svn_revnum_t
                                    local_abspath, pool, pool);
   if (err && err->apr_err != SVN_ERR_WC_LOCKED)
     return svn_error_return(err);
-  else if (err)
-    {
-      svn_error_clear(err);
-      acquired_lock = FALSE;
-    }
-  else
-    acquired_lock = TRUE;
+
+  acquired_lock = (err == SVN_NO_ERROR);
+  svn_error_clear(err);
 
   err1 = switch_internal(result_rev, path, local_abspath, anchor_abspath,
                          switch_url, peg_revision, revision,



Mime
View raw message