You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2011/07/14 15:42:29 UTC
svn commit: r1146708 -
/subversion/branches/1.7.x-fs-verify/subversion/libsvn_fs_fs/fs_fs.c
Author: danielsh
Date: Thu Jul 14 13:42:28 2011
New Revision: 1146708
URL: http://svn.apache.org/viewvc?rev=1146708&view=rev
Log:
On the 1.7.x-fs-verify branch:
Check for NULL before calling svn_checksum_to_cstring_display(). This will allow
this branch to move forward while the r1146214 group is outstanding (and subject
to possibly being reverted on trunk; in which case, this revision would be merged
to trunk).
* subversion/libsvn_fs_fs/fs_fs.c
(DISPLAY_MAYBE_NULL_CHECKSUM): New macro.
(representation_string):
Check for NULL before calling svn_checksum_to_cstring_display().
Modified:
subversion/branches/1.7.x-fs-verify/subversion/libsvn_fs_fs/fs_fs.c
Modified: subversion/branches/1.7.x-fs-verify/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-fs-verify/subversion/libsvn_fs_fs/fs_fs.c?rev=1146708&r1=1146707&r2=1146708&view=diff
==============================================================================
--- subversion/branches/1.7.x-fs-verify/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/1.7.x-fs-verify/subversion/libsvn_fs_fs/fs_fs.c Thu Jul 14 13:42:28 2011
@@ -2444,23 +2444,28 @@ representation_string(representation_t *
if (rep->txn_id && mutable_rep_truncated)
return "-1";
+#define DISPLAY_MAYBE_NULL_CHECKSUM(checksum) \
+ ((checksum) != NULL \
+ ? svn_checksum_to_cstring_display((checksum), pool) \
+ : "(null)")
+
if (format < SVN_FS_FS__MIN_REP_SHARING_FORMAT || rep->sha1_checksum == NULL)
return apr_psprintf(pool, "%ld %" APR_OFF_T_FMT " %" SVN_FILESIZE_T_FMT
" %" SVN_FILESIZE_T_FMT " %s",
rep->revision, rep->offset, rep->size,
rep->expanded_size,
- svn_checksum_to_cstring_display(rep->md5_checksum,
- pool));
+ DISPLAY_MAYBE_NULL_CHECKSUM(rep->md5_checksum));
return apr_psprintf(pool, "%ld %" APR_OFF_T_FMT " %" SVN_FILESIZE_T_FMT
" %" SVN_FILESIZE_T_FMT " %s %s %s",
rep->revision, rep->offset, rep->size,
rep->expanded_size,
- svn_checksum_to_cstring_display(rep->md5_checksum,
- pool),
- svn_checksum_to_cstring_display(rep->sha1_checksum,
- pool),
+ DISPLAY_MAYBE_NULL_CHECKSUM(rep->md5_checksum),
+ DISPLAY_MAYBE_NULL_CHECKSUM(rep->sha1_checksum),
rep->uniquifier);
+
+#undef DISPLAY_MAYBE_NULL_CHECKSUM
+
}