diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-06 14:11:08 +0900 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-05-08 09:49:55 +0200 |
commit | d2132d3d8d68e4f5dbe935c8af7a50eb124bcb8e (patch) | |
tree | ec6007448f51b50b356fd2116f298327977dab56 /src/notify | |
parent | b3d12ac0da2a8b25abc9052a4f350f1ea1108985 (diff) | |
download | systemd-d2132d3d8d68e4f5dbe935c8af7a50eb124bcb8e.tar.gz |
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/notify')
-rw-r--r-- | src/notify/notify.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/notify/notify.c b/src/notify/notify.c index 8d8e6db072..1aecd0e781 100644 --- a/src/notify/notify.c +++ b/src/notify/notify.c @@ -216,8 +216,6 @@ static int parse_argv(int argc, char *argv[]) { int fdnr; fdnr = parse_fd(optarg); - if (fdnr == -ERANGE) - return log_error_errno(fdnr, "File descriptor can't be negative: %s", optarg); if (fdnr < 0) return log_error_errno(fdnr, "Failed to parse file descriptor: %s", optarg); |