X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsrc%2Fstring.c;h=63ea88eec0b75e5d553df6de9e35b9345b05a4fc;hb=06fdb9f73dedfffc8b8613017ec1bb23f970b246;hp=ee5731999854c986cd4f61b4df11097708afb5a2;hpb=acec9514b1006e352ef283f205ecec75a9b6ff0d;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/string.c b/src/src/string.c index ee5731999..63ea88eec 100644 --- a/src/src/string.c +++ b/src/src/string.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2016 */ +/* Copyright (c) University of Cambridge 1995 - 2017 */ /* 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 * *************************************************/ -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; @@ -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)) - { - 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); }