From a56bdff50b87f9c4da77a20cf0757f61107d969c Mon Sep 17 00:00:00 2001 From: Troy Karan Harrison Date: Mon, 7 Aug 2023 12:36:10 +0200 Subject: [PATCH] [DCT-6]: Use `append_literal_to_payload` in `append_to_payload` --- src/ddsrt/src/xmlparser.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ddsrt/src/xmlparser.c b/src/ddsrt/src/xmlparser.c index 2625913aa4..61ae5b19b3 100644 --- a/src/ddsrt/src/xmlparser.c +++ b/src/ddsrt/src/xmlparser.c @@ -396,12 +396,8 @@ static int append_to_payload (struct ddsrt_xmlp_state *st, int c) } st->tpp = st->tpescp + n; } - st->tp[st->tpp++] = (char) c; + append_literal_to_payload (st, c); st->tpescp = st->tpp; - if (st->tpp == st->tpsz) { - st->tpsz += 1024; - st->tp = ddsrt_realloc (st->tp, st->tpsz); - } return 0; }