summaryrefslogtreecommitdiffstats
path: root/src/libserver/html
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-19 10:30:39 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-19 10:30:39 +0100
commit416da198db9ca6bff6859eb52bd61ad5c261bddd (patch)
treef0f93826a33e6e66e9da4a534edabca72fd19cef /src/libserver/html
parentcd50e7bd57981b7b7a01eec88ae06968c625b2a7 (diff)
downloadrspamd-416da198db9ca6bff6859eb52bd61ad5c261bddd.tar.gz
rspamd-416da198db9ca6bff6859eb52bd61ad5c261bddd.zip
[Minor] Some minor cleanups
Found by: coverity scan
Diffstat (limited to 'src/libserver/html')
-rw-r--r--src/libserver/html/html.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index b9729a71e..c3485b099 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -174,22 +174,22 @@ html_check_balance(struct html_content *hc,
*/
if (hc->all_tags.empty()) {
- auto &&vtag = std::make_unique<html_tag>();
+ hc->all_tags.emplace_back();
+ auto *vtag = hc->all_tags.back().get();
vtag->id = Tag_HTML;
vtag->flags = FL_VIRTUAL;
vtag->tag_start = 0;
vtag->content_offset = 0;
- calculate_content_length(vtag.get());
+ calculate_content_length(vtag);
if (!hc->root_tag) {
- hc->root_tag = vtag.get();
+ hc->root_tag = vtag;
}
else {
vtag->parent = hc->root_tag;
}
- hc->all_tags.emplace_back(std::move(vtag));
- tag->parent = vtag.get();
+ tag->parent = vtag;
/* Recursively call with a virtual <html> tag inserted */
return html_check_balance(hc, tag, tag_start_offset, tag_end_offset);