Fix logical inversion when checking result from calloc

in snmp_output_err_resp(..)

X-MFC with:	r310987
MFC after:	3 days
Reported by:	Coverity
CID:		1368195
This commit is contained in:
Enji Cooper 2017-01-04 01:44:45 +00:00
parent 1a55af1fb9
commit b85e09dbf1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311222

View File

@ -2011,7 +2011,7 @@ snmp_output_err_resp(struct snmp_toolinfo *snmptoolctx, struct snmp_pdu *pdu)
return;
}
if ((object = calloc(1, sizeof(struct snmp_object))) != NULL) {
if ((object = calloc(1, sizeof(struct snmp_object))) == NULL) {
fprintf(stdout, "calloc: %s", strerror(errno));
return;
}