Use a unique variable name. Fixes Coverity CID 593.
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 7 Apr 2011 23:52:37 +0000 (23:52 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 7 Apr 2011 23:52:37 +0000 (23:52 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36512 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/snmp/packet-snmp-template.c
epan/dissectors/packet-snmp.c

index 03839f76608ae1a0096cc39969ecd28e2e24f64b..90e7d59ff404fc50bed29dc041a5850bb1cb01da 100644 (file)
@@ -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);
index 3c14c631a975b7d9b38f6a46f295b219ea9968e2..fe1be7620c41212b0b076df1ef4dd997a8930a94 100644 (file)
@@ -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);