From: Takashi Iwai Date: Fri, 11 Dec 2020 22:41:59 +0000 (+0100) Subject: alsactl: Fix double decrease of lock timeout X-Git-Tag: v1.2.5~100 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=878e1a7c0f03233530e7675ae015aced069c971d;p=alsa-utils.git alsactl: Fix double decrease of lock timeout The state_lock() has a loop to wait for the lock file creation, and the timeout value gets decremented twice mistakenly, which leads to a half timeout (5 seconds) than expected 10 seconds. Fix it. Signed-off-by: Takashi Iwai --- diff --git a/alsactl/lock.c b/alsactl/lock.c index 4a48539..05f6e4d 100644 --- a/alsactl/lock.c +++ b/alsactl/lock.c @@ -63,7 +63,6 @@ static int state_lock_(const char *file, int lock, int timeout, int _fd) if (fd < 0) { if (errno == EBUSY || errno == EAGAIN) { sleep(1); - timeout--; } else { err = -errno; goto out;