git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Expansions: make ${authresults } usable in a named ACL
[exim.git]
/
src
/
src
/
string.c
diff --git
a/src/src/string.c
b/src/src/string.c
index 2e919e6d9761451b7665c7f4643aa929df41a184..50442bced5e052542ed087abf02bfb81d2ae0718 100644
(file)
--- a/
src/src/string.c
+++ b/
src/src/string.c
@@
-2,7
+2,7
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 201
7
*/
+/* Copyright (c) University of Cambridge 1995 - 201
8
*/
/* See the file NOTICE for conditions of use and distribution. */
/* Miscellaneous string-handling functions. Some are not required for
/* See the file NOTICE for conditions of use and distribution. */
/* Miscellaneous string-handling functions. Some are not required for
@@
-1077,7
+1077,13
@@
return g->s;
* Add chars to string *
*************************************************/
* Add chars to string *
*************************************************/
-void
+/* Arguments:
+ g the grawable-string
+ p current end of data
+ count amount to grow by
+*/
+
+static void
gstring_grow(gstring * g, int p, int count)
{
int oldsize = g->size;
gstring_grow(gstring * g, int p, int count)
{
int oldsize = g->size;
@@
-1102,13
+1108,7
@@
was the last item on the dynamic memory stack. This is the case if it matches
store_last_get. */
if (!store_extend(g->s, oldsize, g->size))
store_last_get. */
if (!store_extend(g->s, oldsize, g->size))
- {
- BOOL release_ok = store_last_get[store_pool] == g->s;
- uschar *newstring = store_get(g->size);
- memcpy(newstring, g->s, p);
- if (release_ok) store_release(g->s);
- g->s = newstring;
- }
+ g->s = store_newblock(g->s, g->size, p);
}
}