mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
Fix follow-up to [bug #52315] Minor typo in output of MIB compiler
LWIP_SNMP_OBJ_ID_LEN -> SNMP_MAX_OBJ_ID_LEN
This commit is contained in:
parent
849dfb17c7
commit
7eb462867b
@ -544,7 +544,7 @@ snmp_oid_to_ip_port(const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port)
|
|||||||
void
|
void
|
||||||
snmp_oid_assign(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
|
snmp_oid_assign(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
|
||||||
{
|
{
|
||||||
LWIP_ASSERT("oid_len <= LWIP_SNMP_OBJ_ID_LEN", oid_len <= SNMP_MAX_OBJ_ID_LEN);
|
LWIP_ASSERT("oid_len <= SNMP_MAX_OBJ_ID_LEN", oid_len <= SNMP_MAX_OBJ_ID_LEN);
|
||||||
|
|
||||||
target->len = oid_len;
|
target->len = oid_len;
|
||||||
|
|
||||||
@ -562,7 +562,7 @@ snmp_oid_assign(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
|
|||||||
void
|
void
|
||||||
snmp_oid_prefix(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
|
snmp_oid_prefix(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
|
||||||
{
|
{
|
||||||
LWIP_ASSERT("target->len + oid_len <= LWIP_SNMP_OBJ_ID_LEN", (target->len + oid_len) <= SNMP_MAX_OBJ_ID_LEN);
|
LWIP_ASSERT("target->len + oid_len <= SNMP_MAX_OBJ_ID_LEN", (target->len + oid_len) <= SNMP_MAX_OBJ_ID_LEN);
|
||||||
|
|
||||||
if (oid_len > 0) {
|
if (oid_len > 0) {
|
||||||
/* move existing OID to make room at the beginning for OID to insert */
|
/* move existing OID to make room at the beginning for OID to insert */
|
||||||
@ -600,7 +600,7 @@ snmp_oid_combine(struct snmp_obj_id *target, const u32_t *oid1, u8_t oid1_len, c
|
|||||||
void
|
void
|
||||||
snmp_oid_append(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
|
snmp_oid_append(struct snmp_obj_id *target, const u32_t *oid, u8_t oid_len)
|
||||||
{
|
{
|
||||||
LWIP_ASSERT("offset + oid_len <= LWIP_SNMP_OBJ_ID_LEN", (target->len + oid_len) <= SNMP_MAX_OBJ_ID_LEN);
|
LWIP_ASSERT("offset + oid_len <= SNMP_MAX_OBJ_ID_LEN", (target->len + oid_len) <= SNMP_MAX_OBJ_ID_LEN);
|
||||||
|
|
||||||
if (oid_len > 0) {
|
if (oid_len > 0) {
|
||||||
MEMCPY(&target->id[target->len], oid, oid_len * sizeof(u32_t));
|
MEMCPY(&target->id[target->len], oid, oid_len * sizeof(u32_t));
|
||||||
|
Loading…
Reference in New Issue
Block a user