diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2018-11-23 01:19:14 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2018-11-25 19:51:07 -0500 |
commit | 449274903ca8f8c8227059698a9324d55167396b (patch) | |
tree | c4fd52ca48e66f1ac869f87c6ecd1cf95cc655bf /src/configparser.y | |
parent | ef1fdcd9103b01bf7435bdb57f41d593b0a20f45 (diff) | |
download | lighttpd-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.y | 6 |
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; } |