summaryrefslogtreecommitdiffstats
path: root/src/vnet/api_errno.h
diff options
context:
space:
mode:
authorDamjan Marion <dmarion@me.com>2023-01-31 20:14:13 +0100
committerDave Wallace <dwallacelf@gmail.com>2023-02-01 14:50:33 +0000
commitab4d9174d890bff4c07b44957a20eacb33c88172 (patch)
treed45c2579c3948a9b1b080cff0dcb09468e1cbebe /src/vnet/api_errno.h
parent4d290c3aa74c7bd346b311940e5feb399464057e (diff)
memif: improve error reporting
Type: improvement Change-Id: I12b120d988347cced3df82810e86dc2fd5cfca80 Signed-off-by: Damjan Marion <dmarion@me.com>
Diffstat (limited to 'src/vnet/api_errno.h')
-rw-r--r--src/vnet/api_errno.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/api_errno.h b/src/vnet/api_errno.h
index 4e91e132b89..60e48f4a779 100644
--- a/src/vnet/api_errno.h
+++ b/src/vnet/api_errno.h
@@ -35,6 +35,8 @@ format_function_t format_vnet_api_errno;
static_always_inline vnet_api_error_t
vnet_api_error (clib_error_t *err)
{
+ if (err == 0)
+ return 0;
if (err->code >= 0)
return VNET_API_ERROR_BUG;
return err->code;