From: Jaroslav Kysela Date: Fri, 8 Jan 2021 17:07:57 +0000 (+0100) Subject: alsactl: daemon - read_pid_file() fix the returned code on read error X-Git-Tag: v1.2.5~94 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=42ca978078e09eb7e0044d2d8453b1a9cb69d9fe;p=alsa-utils.git alsactl: daemon - read_pid_file() fix the returned code on read error Signed-off-by: Jaroslav Kysela --- diff --git a/alsactl/daemon.c b/alsactl/daemon.c index 65f7ac1..ee03991 100644 --- a/alsactl/daemon.c +++ b/alsactl/daemon.c @@ -284,7 +284,7 @@ static long read_pid_file(const char *pidfile) err = err < 0 ? -errno : -EIO; close(fd); pid_txt[11] = '\0'; - return atol(pid_txt); + return err < 0 ? err : atol(pid_txt); } else { return -errno; }