From 3220018bd73311e03c119bb95c555ca41116d986 Mon Sep 17 00:00:00 2001 From: Nickolay Olshevsky Date: Tue, 23 Jan 2024 15:05:08 +0200 Subject: [PATCH] CID 1530487: use auto & instead of just auto to not copy data. --- src/librepgp/stream-dump.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librepgp/stream-dump.cpp b/src/librepgp/stream-dump.cpp index efa528fefa..67acaf13ec 100644 --- a/src/librepgp/stream-dump.cpp +++ b/src/librepgp/stream-dump.cpp @@ -2480,7 +2480,7 @@ stream_dump_literal_json(pgp_source_t *src, json_object *pkt) return ret; } ret = RNP_ERROR_OUT_OF_MEMORY; - auto lhdr = get_literal_src_hdr(lsrc); + auto &lhdr = get_literal_src_hdr(lsrc); if (!json_add(pkt, "format", (char *) &lhdr.format, 1) || !json_add(pkt, "filename", (char *) lhdr.fname, lhdr.fname_len) || !json_add(pkt, "timestamp", (uint64_t) lhdr.timestamp)) {