diff --git a/src/basic/errno-list.c b/src/basic/errno-list.c index c6a01eec8ba..f0b74753fea 100644 --- a/src/basic/errno-list.c +++ b/src/basic/errno-list.c @@ -51,7 +51,3 @@ int errno_from_name(const char *name) { assert(sc->id > 0); return sc->id; } - -int errno_max(void) { - return ELEMENTSOF(errno_names); -} diff --git a/src/basic/errno-list.h b/src/basic/errno-list.h index 4eec0cc7869..c8e52053773 100644 --- a/src/basic/errno-list.h +++ b/src/basic/errno-list.h @@ -19,7 +19,11 @@ along with systemd; If not, see . ***/ +/* + * MAX_ERRNO is defined as 4095 in linux/err.h + * We use the same value here. + */ +#define ERRNO_MAX 4095 + const char *errno_to_name(int id); int errno_from_name(const char *name); - -int errno_max(void);