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

[PATCH][merge-tracking] code simplification of get_merge_info_for_path

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-10-09 08:30:49 CEST

Hi All,
Find that attached patch and log.

With regards
Kamesh Jayachandran

[[[
Patch by: Kamesh Jayachandran <kamesh@collab.net>

Use strcpy rather than mimicing the behaviour of 'strcpy'.

* subversion/libsvn_fs_util/merge-info-sqlite-index.c
  (get_merge_info_for_path):
   Use strcpy rather than mimicing the behaviour of 'strcpy'.
   
]]]

Index: subversion/libsvn_fs_util/merge-info-sqlite-index.c
===================================================================
--- subversion/libsvn_fs_util/merge-info-sqlite-index.c (revision 21840)
+++ subversion/libsvn_fs_util/merge-info-sqlite-index.c (working copy)
@@ -481,8 +481,6 @@
             apr_hash_set(result, path, APR_HASH_KEY_STRING, NULL);
           else if (cacheresult)
             {
- const char *p;
- int i;
               apr_hash_t *translatedhash;
               char *toappend;
 
@@ -490,8 +488,7 @@
                  path string. */
               toappend = apr_pcalloc(pool,
                                      (strlen(path) - parentpath->len) + 1);
- for (i = 0, p = &path[parentpath->len + 1]; *p; i++, p++)
- *(toappend + i) = *p;
+ strcpy(toappend, path+(parentpath->len + 1));
               append_component_to_paths(&translatedhash, cacheresult,
                                         toappend, pool);
               apr_hash_set(result, path, APR_HASH_KEY_STRING,

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 9 08:30:20 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.