(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-mq.c) |
| |
| 949 | | | dissect_mq_rr(tvbuff_t *tvb, proto_tree *tree, gboolean bLittleEndian, gint offset, gint iNbrRecords, gint offsetRR) |
| 950 | | | { |
| 951 | | | proto_tree *mq_tree = NULL; |
| 952 | | | proto_item *ti = NULL; |
| 953 | | | gint iSizeRR = 0; |
| 954 | | | if (offsetRR != 0) |
| 955 | | | { |
| 956 | | | iSizeRR = iNbrRecords * 8; |
| 957 | | | if (tvb_length_remaining(tvb, offset) >= iSizeRR) |
| 958 | | | { |
| 959 | | | if (tree) |
| 960 | | | { |
| 961 | | | gint iOffsetRR = 0; |
| 962 | | | gint iRecord = 0; |
| 963 | | | for (iRecord = 0; iRecord < iNbrRecords; iRecord++) |
Useless Assignment
This code assigns the variable the same value it already had. |
|
| 964 | | | { |
| 965 | | | ti = proto_tree_add_text(tree, tvb, offset + iOffsetRR, 8, MQ_TEXT_RR); |
| 966 | | | mq_tree = proto_item_add_subtree(ti, ett_mq_rr); |
| 967 | | | proto_tree_add_item(mq_tree, hf_mq_rr_completioncode, tvb, offset + iOffsetRR, 4, bLittleEndian); |
| 968 | | | proto_tree_add_item(mq_tree, hf_mq_rr_reasoncode, tvb, offset + iOffsetRR + 4, 4, bLittleEndian); |
| 969 | | | iOffsetRR += 8; |
| 970 | | | } |
| 971 | | | } |
| 972 | | | } |
| 973 | | | else iSizeRR = 0; |
| 974 | | | } |
| 975 | | | return iSizeRR; |
| 976 | | | } |
| |