aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2011-04-07 23:52:37 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2011-04-07 23:52:37 +0000
commitb102ea2723be018eeffff9b0479c03318959fb8c (patch)
tree470fc31976ddb9ca090ae942b4418c6110986d3e
parentaed18268f4341f7310ad9fd08fd582e7e4249f47 (diff)
Use a unique variable name. Fixes Coverity CID 593.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36512 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--asn1/snmp/packet-snmp-template.c8
-rw-r--r--epan/dissectors/packet-snmp.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 03839f7660..90e7d59ff4 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -756,7 +756,7 @@ indexing_done:
case BER_CLASS_UNI|(BER_UNI_TAG_INTEGER<<4):
{
gint64 val=0;
- unsigned offset = value_offset;
+ unsigned int_val_offset = value_offset;
unsigned i;
max_len = 5; min_len = 1;
@@ -767,12 +767,12 @@ indexing_done:
if(value_len > 0) {
/* extend sign bit */
- if(tvb_get_guint8(tvb, offset)&0x80) {
+ if(tvb_get_guint8(tvb, int_val_offset)&0x80) {
val=-1;
}
for(i=0;i<value_len;i++) {
- val=(val<<8)|tvb_get_guint8(tvb, offset);
- offset++;
+ val=(val<<8)|tvb_get_guint8(tvb, int_val_offset);
+ int_val_offset++;
}
}
proto_tree_add_int64(pt_varbind, hf_snmp_integer32_value, tvb,value_offset,value_len, val);
diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c
index 3c14c631a9..fe1be7620c 100644
--- a/epan/dissectors/packet-snmp.c
+++ b/epan/dissectors/packet-snmp.c
@@ -1,7 +1,7 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
/* packet-snmp.c */
-/* ../../../tools/asn2wrs.py -b -p snmp -c ../../../asn1/snmp/snmp.cnf -s ../../../asn1/snmp/packet-snmp-template -D ../../../asn1/snmp snmp.asn */
+/* ../../tools/asn2wrs.py -b -p snmp -c ./snmp.cnf -s ./packet-snmp-template -D . snmp.asn */
/* Input file: packet-snmp-template.c */
@@ -858,7 +858,7 @@ indexing_done:
case BER_CLASS_UNI|(BER_UNI_TAG_INTEGER<<4):
{
gint64 val=0;
- unsigned offset = value_offset;
+ unsigned int_val_offset = value_offset;
unsigned i;
max_len = 5; min_len = 1;
@@ -869,12 +869,12 @@ indexing_done:
if(value_len > 0) {
/* extend sign bit */
- if(tvb_get_guint8(tvb, offset)&0x80) {
+ if(tvb_get_guint8(tvb, int_val_offset)&0x80) {
val=-1;
}
for(i=0;i<value_len;i++) {
- val=(val<<8)|tvb_get_guint8(tvb, offset);
- offset++;
+ val=(val<<8)|tvb_get_guint8(tvb, int_val_offset);
+ int_val_offset++;
}
}
proto_tree_add_int64(pt_varbind, hf_snmp_integer32_value, tvb,value_offset,value_len, val);