Skip to content

Commit

Permalink
CID 1530487: use auto & instead of just auto to not copy data.
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 authored and antonsviridenko committed Jan 23, 2024
1 parent cb02965 commit 3220018
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librepgp/stream-dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3220018

Please sign in to comment.