[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] subversion/libsvn_wc/props.c

From: Sander Striker <striker_at_apache.org>
Date: 2002-03-19 10:32:07 CET

Hi,

This trigger for doing this patch was a post from Micheal
Wood: <20020319085958.GA2396@marmite.its.uct.ac.za>.
Decided to clean the variable up while I was there.

Sander

Log:
Submitted by: Michael Wood <mwood@its.uct.ac.za>

* subversion/libsvn_wc/props.c

  (expand_keyword): Pass in the correct variable for author
    expansion. Remove the "value" variable, since it is
    only used in two places, one of which uninitialized.

Index: ./subversion/libsvn_wc/props.c
===================================================================
--- ./subversion/libsvn_wc/props.c
+++ ./subversion/libsvn_wc/props.c Tue Mar 19 10:14:54 2002
@@ -1191,7 +1191,6 @@
                 apr_pool_t *pool)
 {
   svn_wc_entry_t *entry;
- svn_stringbuf_t *value = NULL;

   SVN_ERR (svn_wc_entry (&entry, svn_stringbuf_create (path, pool), pool));

@@ -1231,20 +1230,17 @@
            || (! strcasecmp (keyword, SVN_KEYWORD_AUTHOR_SHORT)))
     {
       if (entry && (entry->cmt_author))
- keywords->author = svn_string_create_from_buf (value, pool);
+ keywords->author = svn_string_create_from_buf (entry->cmt_author, pool);
       else
         keywords->author = svn_string_create ("", pool);
     }
   else if ((! strcmp (keyword, SVN_KEYWORD_URL_LONG))
            || (! strcasecmp (keyword, SVN_KEYWORD_URL_SHORT)))
     {
- if (entry)
- value = entry->url;
-
- if (! value)
- keywords->url = svn_string_create ("", pool);
+ if (entry && (entry->url))
+ keywords->url = svn_string_create_from_buf (entry->url, pool);
       else
- keywords->url = svn_string_create_from_buf (value, pool);
+ keywords->url = svn_string_create ("", pool);
     }
   else
     *is_valid_p = FALSE;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 19 10:27:48 2002

This is an archived mail posted to the Subversion Dev mailing list.