basic: introduce *_to_string_with_check() functions
They are used in later commits.
This commit is contained in:
@@ -283,7 +283,8 @@ int parse_errno(const char *t) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (e < 0 || e > ERRNO_MAX)
|
||||
/* 0 is also allowed here */
|
||||
if (!errno_is_valid(e) && e != 0)
|
||||
return -ERANGE;
|
||||
|
||||
return e;
|
||||
|
||||
Reference in New Issue
Block a user