diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-06 07:11:08 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-05-08 09:49:55 +0200 |
commit | d2132d3d8d68e4f5dbe935c8af7a50eb124bcb8e (patch) | |
tree | ec6007448f51b50b356fd2116f298327977dab56 /src/basic/parse-util.c | |
parent | zsh: add service-log-{level,target} completions for systemctl (diff) | |
download | systemd-d2132d3d8d68e4f5dbe935c8af7a50eb124bcb8e.tar.xz systemd-d2132d3d8d68e4f5dbe935c8af7a50eb124bcb8e.zip |
parse-util: make parse_fd() return -EBADF
The previous error code -ERANGE is slightly ambiguous, and use more
specific one. This also drops unnecessary error handlings.
Follow-up for 754d8b9c330150fdb3767491e24975f7dfe2a203 and
e652663a043cb80936bb12ad5c87766fc5150c24.
Diffstat (limited to 'src/basic/parse-util.c')
-rw-r--r-- | src/basic/parse-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c index d6138f0295..cbe5ad6a32 100644 --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c @@ -343,7 +343,7 @@ int parse_fd(const char *t) { return r; if (fd < 0) - return -ERANGE; + return -EBADF; return fd; } |