Fix Coverity CID 280019 (formerly 19): "Logically dead code" that abroman previously commited a fix for in r17532, but forgot to also commit a change to asn1/snmp/packet-snmp-template.c as well, so the change was apparently inadvertently reverted the next time that packet-snmp.c was regenerated.

svn path=/trunk/; revision=44179
This commit is contained in:
Chris Maynard 2012-08-01 02:08:29 +00:00
parent dd6ca38fff
commit c38a247faa
2 changed files with 2 additions and 2 deletions

View File

@ -990,7 +990,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
int len_remain = len;
/* first bit: engine id conformance */
if (len_remain<4) return offset;
if (len_remain<1) return offset;
conformance = ((tvb_get_guint8(tvb, offset)>>7) & 0x01);
proto_tree_add_item(tree, hf_snmp_engineid_conform, tvb, offset, 1, ENC_BIG_ENDIAN);

View File

@ -1092,7 +1092,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
int len_remain = len;
/* first bit: engine id conformance */
if (len_remain<4) return offset;
if (len_remain<1) return offset;
conformance = ((tvb_get_guint8(tvb, offset)>>7) & 0x01);
proto_tree_add_item(tree, hf_snmp_engineid_conform, tvb, offset, 1, ENC_BIG_ENDIAN);