tidying
[exim.git] / src / src / string.c
index 2e919e6d9761451b7665c7f4643aa929df41a184..63ea88eec0b75e5d553df6de9e35b9345b05a4fc 100644 (file)
@@ -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);
 }