From 5ae22f41a8e2152c8618227a0cc45b9de61a0f70 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Sun, 25 Feb 2018 11:04:39 +0100 Subject: Add a status exit code to the function ndo_error() The status are defined in an enum in status-exit-codes.h. Moreover: Use ndo_error() instead of ndo_warning() for malloc() errors in print-esp.c. --- print-decnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'print-decnet.c') diff --git a/print-decnet.c b/print-decnet.c index ef610767..253d133d 100644 --- a/print-decnet.c +++ b/print-decnet.c @@ -1246,7 +1246,7 @@ dnnum_string(netdissect_options *ndo, u_short dnaddr) /* malloc() return used by the 'dnaddrtable' hash table: do not free() */ str = (char *)malloc(siz = sizeof("00.0000")); if (str == NULL) - (*ndo->ndo_error)(ndo, "dnnum_string: malloc"); + (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC, "dnnum_string: malloc"); nd_snprintf(str, siz, "%u.%u", area, node); return(str); } -- cgit v1.2.1