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

[PATCH] avoid memory reallocation

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-07-23 09:50:25 CEST

Hi,

This is really a *very* little thing:

The CL client uses an array to store all the auth providers. The initial
size of that array is set to 10, but on Windows, there's one auth
provider more so the array is always reallocated (or I'm counting wrong,
could happen too).
This very little patch takes care of this.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org

[[[
Avoid reallocation of array holding the auth providers on Windows.

* subversion/clients/cmdline/main.c
  (main): Increase the initial array size by one.
]]]

Index: subversion/clients/cmdline/main.c
===================================================================
--- subversion/clients/cmdline/main.c (Revision 15391)
+++ subversion/clients/cmdline/main.c (Arbeitskopie)
@@ -1332,7 +1332,7 @@
 
     /* The whole list of registered providers */
     apr_array_header_t *providers
- = apr_array_make (pool, 10, sizeof (svn_auth_provider_object_t *));
+ = apr_array_make (pool, 11, sizeof (svn_auth_provider_object_t *));
 
     /* The main disk-caching auth providers, for both
        'username/password' creds and 'username' creds. */

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 23 09:51:24 2005

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.