From bf510fee517063d080a664a61f4abf0417c25acd Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 4 May 2017 15:06:13 +0800 Subject: [PATCH] SNMP: Cleanup unreachable code Signed-off-by: Axel Lin Signed-off-by: Dirk Ziegelmeier --- src/apps/snmp/snmp_msg.c | 1 - src/apps/snmp/snmp_snmpv2_usm.c | 1 - 2 files changed, 2 deletions(-) diff --git a/src/apps/snmp/snmp_msg.c b/src/apps/snmp/snmp_msg.c index faa5a5b4..77d952cf 100644 --- a/src/apps/snmp/snmp_msg.c +++ b/src/apps/snmp/snmp_msg.c @@ -1187,7 +1187,6 @@ snmp_parse_inbound_frame(struct snmp_request *request) /* unsupported input PDU for this agent (no parse error) */ LWIP_DEBUGF(SNMP_DEBUG, ("Unknown/Invalid SNMP PDU type received: %d", tlv.type)); \ return ERR_ARG; - break; } request->request_type = tlv.type & SNMP_ASN1_DATATYPE_MASK; request->request_out_type = (SNMP_ASN1_CLASS_CONTEXT | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_CONTEXT_PDU_GET_RESP); diff --git a/src/apps/snmp/snmp_snmpv2_usm.c b/src/apps/snmp/snmp_snmpv2_usm.c index 9a5534fe..3f8880d9 100644 --- a/src/apps/snmp/snmp_snmpv2_usm.c +++ b/src/apps/snmp/snmp_snmpv2_usm.c @@ -288,7 +288,6 @@ static s16_t usmusertable_get_value(struct snmp_node_instance *cell_instance, vo case 3: /* usmUserSecurityName */ MEMCPY(value, cell_instance->reference.ptr, cell_instance->reference_len); return (s16_t)cell_instance->reference_len; - break; case 4: /* usmUserCloneFrom */ MEMCPY(value, snmp_zero_dot_zero.id, snmp_zero_dot_zero.len * sizeof(u32_t)); return snmp_zero_dot_zero.len * sizeof(u32_t);