Author: kotkov
Date: Sat Nov 25 19:52:22 2017
New Revision: 1816343

URL: http://svn.apache.org/viewvc?rev=1816343&view=rev
Log:
* subversion/libsvn_fs_fs/low_level.c
  (format_digest): Remove the `is_null` parameter, which is always passed
   in as FALSE by the three calling sites in ...
  (svn_fs_fs__unparse_representation): ...this function.  Note that for
   the SHA1 digest this parameter depends on the `has_sha1` field, but
   the code above tests for the (!rep->has_sha1) case, and thus the
   actual value of the parameter is always FALSE.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/low_level.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/low_level.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/low_level.c?rev=1816343&r1=1816342&r2=1816343&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/low_level.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/low_level.c Sat Nov 25 19:52:22 
2017
@@ -1034,22 +1034,17 @@ svn_fs_fs__read_noderev(node_revision_t
 }
 
 /* Return a textual representation of the DIGEST of given KIND.
- * If IS_NULL is TRUE, no digest is available.
  * Allocate the result in RESULT_POOL.
  */
 static const char *
 format_digest(const unsigned char *digest,
               svn_checksum_kind_t kind,
-              svn_boolean_t is_null,
               apr_pool_t *result_pool)
 {
   svn_checksum_t checksum;
   checksum.digest = digest;
   checksum.kind = kind;
 
-  if (is_null)
-    return "(null)";
-
   return svn_checksum_to_cstring_display(&checksum, result_pool);
 }
 
@@ -1070,8 +1065,7 @@ svn_fs_fs__unparse_representation(repres
              " %" SVN_FILESIZE_T_FMT " %s",
              rep->revision, rep->item_index, rep->size,
              rep->expanded_size,
-             format_digest(rep->md5_digest, svn_checksum_md5, FALSE,
-                           scratch_pool));
+             format_digest(rep->md5_digest, svn_checksum_md5, scratch_pool));
 
   svn__ui64tobase36(buffer, rep->uniquifier.number);
   return svn_stringbuf_createf
@@ -1079,10 +1073,8 @@ svn_fs_fs__unparse_representation(repres
            " %" SVN_FILESIZE_T_FMT " %s %s %s/_%s",
            rep->revision, rep->item_index, rep->size,
            rep->expanded_size,
-           format_digest(rep->md5_digest, svn_checksum_md5,
-                         FALSE, scratch_pool),
-           format_digest(rep->sha1_digest, svn_checksum_sha1,
-                         !rep->has_sha1, scratch_pool),
+           format_digest(rep->md5_digest, svn_checksum_md5, scratch_pool),
+           format_digest(rep->sha1_digest, svn_checksum_sha1, scratch_pool),
            svn_fs_fs__id_txn_unparse(&rep->uniquifier.noderev_txn_id,
                                      scratch_pool),
            buffer);


Reply via email to