From 636cbcb842d9735421d95f613a50be094b547bd9 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Tue, 24 Feb 1998 23:43:22 +0000 Subject: [PATCH] assertions --- snmplib/parse.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/snmplib/parse.c b/snmplib/parse.c index ee4b47bb35..1c2769f207 100644 --- a/snmplib/parse.c +++ b/snmplib/parse.c @@ -71,6 +71,10 @@ SOFTWARE. #if HAVE_NETDB_H #include #endif +#if HAVE_ASSERT_H +#include +#endif + #include "asn1.h" #include "snmp_vars.h" @@ -256,7 +260,9 @@ print_error(string, token, type) char *token; int type; { - if (type == ENDOFFILE && snmplib_debug) + assert(string != NULL); + assert(snmplib_debug != NULL); + if (type == ENDOFFILE) snmplib_debug(0, "%s(EOF): On or around line %d\n", string, Line); else if (token) snmplib_debug(0, "%s(%s): On or around line %d\n", string, token, Line); -- 2.47.3