diff options
author | ruengeler <ruengeler@wireshark.org> | 2015-12-03 13:47:33 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-12-07 07:14:57 +0000 |
commit | d8bbd232cdd910e70ce15f9a11d0986b6a5c4621 (patch) | |
tree | 41f2a1d31e2da6ab1990af5f2f30e9b5f619c921 /ui/qt/sctp_chunk_statistics_dialog.cpp | |
parent | 9a9b1c9bbaba1e23a17b6a3f06afac7116c6a82b (diff) | |
download | wireshark-d8bbd232cdd910e70ce15f9a11d0986b6a5c4621.tar.gz |
SCTP: Fix warning found by PVS Studio
Change-Id: I713eb6eff3681573baf77274847a32a4cc6b9ee0
Reviewed-on: https://code.wireshark.org/review/12408
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/sctp_chunk_statistics_dialog.cpp')
-rw-r--r-- | ui/qt/sctp_chunk_statistics_dialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/qt/sctp_chunk_statistics_dialog.cpp b/ui/qt/sctp_chunk_statistics_dialog.cpp index 8642a7bd94..9a20381c4c 100644 --- a/ui/qt/sctp_chunk_statistics_dialog.cpp +++ b/ui/qt/sctp_chunk_statistics_dialog.cpp @@ -235,9 +235,11 @@ void SCTPChunkStatisticsDialog::on_pushButton_clicked() fprintf(fp,"# This file is automatically generated, DO NOT MODIFY.\n"); char str[40]; + struct chunkTypes tempChunk; for (int i = 0; i < chunks.size(); i++) { - g_snprintf(str, sizeof str, "\"%d\",\"%s\",\"%s\"\n", chunks.value(i).id, chunks.value(i).name, (chunks.value(i).hide==0?"Show":"Hide")); + tempChunk = chunks.value(i); + g_snprintf(str, sizeof str, "\"%d\",\"%s\",\"%s\"\n", tempChunk.id, tempChunk.name, tempChunk.hide==0?"Show":"Hide"); fputs(str, fp); void *rec = g_malloc0(uat->record_size); uat_add_record(uat, rec, TRUE); |