summaryrefslogtreecommitdiff
path: root/src/configparser.y
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2018-11-23 01:19:14 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2018-11-25 19:51:07 -0500
commit449274903ca8f8c8227059698a9324d55167396b (patch)
treec4fd52ca48e66f1ac869f87c6ecd1cf95cc655bf /src/configparser.y
parentef1fdcd9103b01bf7435bdb57f41d593b0a20f45 (diff)
downloadlighttpd-git-449274903ca8f8c8227059698a9324d55167396b.tar.gz
[core] perf: simplify buffer_move()
require src and dest to be non-NULL change no longer releases large swapped buffers with buffer_reset()
Diffstat (limited to 'src/configparser.y')
-rw-r--r--src/configparser.y6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/configparser.y b/src/configparser.y
index e7b67ef5..9e49ad73 100644
--- a/src/configparser.y
+++ b/src/configparser.y
@@ -317,9 +317,11 @@ value(A) ::= key(B). {
}
value(A) ::= STRING(B). {
+ buffer *b;
A = (data_unset *)data_string_init();
- buffer_move(((data_string *)(A))->value, B);
- buffer_free(B);
+ b = ((data_string *)(A))->value;
+ buffer_free(b);
+ ((data_string *)(A))->value = B;
B = NULL;
}