diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 44292c7021..f41afcd0a7 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -321,6 +321,11 @@ typedef enum { VIR_ERR_DEVICE_MISSING = 99, /* fail to find the desired device */ VIR_ERR_INVALID_NWFILTER_BINDING = 100, /* invalid nwfilter binding */ VIR_ERR_NO_NWFILTER_BINDING = 101, /* no nwfilter binding */ + +# ifdef VIR_ENUM_SENTINELS + VIR_ERR_NUMBER_LAST +# endif + } virErrorNumber; /** diff --git a/src/util/virerror.c b/src/util/virerror.c index 736c92fd02..88e6ecef82 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -914,6 +914,7 @@ virErrorMsg(virErrorNumber error, const char *info) const char *errmsg = NULL; switch (error) { + case VIR_ERR_NUMBER_LAST: case VIR_ERR_OK: return NULL; case VIR_ERR_INTERNAL_ERROR: