1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Fix the -Wconversion warnings produced when compiling the SNMP agent.

This commit is contained in:
Shteryana Shopova 2013-10-17 12:03:17 +00:00
parent 0698344859
commit 546401ce54
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=256680

View File

@ -276,7 +276,12 @@ snmp_get(struct snmp_pdu *pdu, struct asn_buf *resp_b,
}
}
return (snmp_fix_encoding(resp_b, resp));
if (snmp_fix_encoding(resp_b, resp) != SNMP_CODE_OK) {
snmp_debug("get: failed to encode PDU");
return (SNMP_RET_ERR);
}
return (SNMP_RET_OK);
}
static struct snmp_node *
@ -438,7 +443,13 @@ snmp_getnext(struct snmp_pdu *pdu, struct asn_buf *resp_b,
return (SNMP_RET_ERR);
}
}
return (snmp_fix_encoding(resp_b, resp));
if (snmp_fix_encoding(resp_b, resp) != SNMP_CODE_OK) {
snmp_debug("getnext: failed to encode PDU");
return (SNMP_RET_ERR);
}
return (SNMP_RET_OK);
}
enum snmp_ret
@ -537,7 +548,12 @@ snmp_getbulk(struct snmp_pdu *pdu, struct asn_buf *resp_b,
}
done:
return (snmp_fix_encoding(resp_b, resp));
if (snmp_fix_encoding(resp_b, resp) != SNMP_CODE_OK) {
snmp_debug("getnext: failed to encode PDU");
return (SNMP_RET_ERR);
}
return (SNMP_RET_OK);
}
/*