memif: improve error reporting

Type: improvement
Change-Id: I12b120d988347cced3df82810e86dc2fd5cfca80
Signed-off-by: Damjan Marion <dmarion@me.com>
diff --git a/src/vnet/api_errno.h b/src/vnet/api_errno.h
index 4e91e13..60e48f4 100644
--- a/src/vnet/api_errno.h
+++ b/src/vnet/api_errno.h
@@ -35,6 +35,8 @@
 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;