You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/01/03 20:25:26 UTC
svn commit: r1054715 - /subversion/trunk/subversion/svnlook/main.c
Author: hwright
Date: Mon Jan 3 19:25:25 2011
New Revision: 1054715
URL: http://svn.apache.org/viewvc?rev=1054715&view=rev
Log:
Remove an instance of specifying a non-static format string.
* subversion/svnlook/main.c
(display_prop_diffs): Rearrange some variables so as to use a static format
string in a printf.
Modified:
subversion/trunk/subversion/svnlook/main.c
Modified: subversion/trunk/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnlook/main.c?rev=1054715&r1=1054714&r2=1054715&view=diff
==============================================================================
--- subversion/trunk/subversion/svnlook/main.c (original)
+++ subversion/trunk/subversion/svnlook/main.c Mon Jan 3 19:25:25 2011
@@ -821,7 +821,7 @@ display_prop_diffs(const apr_array_heade
for (i = 0; i < prop_diffs->nelts; i++)
{
- const char *header_fmt;
+ const char *header_label;
const svn_string_t *orig_value;
const svn_prop_t *pc = &APR_ARRAY_IDX(prop_diffs, i, svn_prop_t);
@@ -833,12 +833,12 @@ display_prop_diffs(const apr_array_heade
orig_value = NULL;
if (! orig_value)
- header_fmt = "Added: %s\n";
+ header_label = "Added";
else if (! pc->value)
- header_fmt = "Deleted: %s\n";
+ header_label = "Deleted";
else
- header_fmt = "Modified: %s\n";
- SVN_ERR(svn_cmdline_printf(pool, header_fmt, pc->name));
+ header_label = "Modified";
+ SVN_ERR(svn_cmdline_printf(pool, "%s: %s\n", header_label, pc->name));
/* Flush stdout before we open a stream to it below. */
SVN_ERR(svn_cmdline_fflush(stdout));