subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kot...@apache.org
Subject svn commit: r1806043 - /subversion/trunk/subversion/libsvn_ra_serf/merge.c
Date Thu, 24 Aug 2017 13:19:24 GMT
Author: kotkov
Date: Thu Aug 24 13:19:23 2017
New Revision: 1806043

URL: http://svn.apache.org/viewvc?rev=1806043&view=rev
Log:
* subversion/libsvn_ra_serf/merge.c
  (setup_merge_headers): Reimplement this function using svn_cstring_join2(),
   instead of constructing the header value manually.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/merge.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/merge.c?rev=1806043&r1=1806042&r2=1806043&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/merge.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/merge.c Thu Aug 24 13:19:23 2017
@@ -276,21 +276,16 @@ setup_merge_headers(serf_bucket_t *heade
                     apr_pool_t *scratch_pool)
 {
   merge_context_t *ctx = baton;
-  svn_stringbuf_t *val = svn_stringbuf_create_empty(scratch_pool);
+  apr_array_header_t *vals = apr_array_make(scratch_pool, 2,
+                                            sizeof(const char *));
 
   if (!ctx->keep_locks)
-    {
-      svn_stringbuf_appendcstr(val, SVN_DAV_OPTION_RELEASE_LOCKS);
-    }
-
+    APR_ARRAY_PUSH(vals, const char *) = SVN_DAV_OPTION_RELEASE_LOCKS;
   if (ctx->disable_merge_response)
-    {
-      if (val->len > 0)
-        svn_stringbuf_appendcstr(val, " ");
-      svn_stringbuf_appendcstr(val, SVN_DAV_OPTION_NO_MERGE_RESPONSE);
-    }
+    APR_ARRAY_PUSH(vals, const char *) = SVN_DAV_OPTION_NO_MERGE_RESPONSE;
 
-  serf_bucket_headers_set(headers, SVN_DAV_OPTIONS_HEADER, val->data);
+  serf_bucket_headers_set(headers, SVN_DAV_OPTIONS_HEADER,
+                          svn_cstring_join2(vals, " ", FALSE, scratch_pool));
 
   return SVN_NO_ERROR;
 }



Mime
View raw message