diff options
Diffstat (limited to 'lib-src/update-game-score.c')
-rw-r--r-- | lib-src/update-game-score.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 93aa0393d94..fc6e72838ea 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -499,9 +499,9 @@ unlock_file (const char *filename, void *state) char *lockpath = (char *) state; int saved_errno = errno; int ret = unlink (lockpath); - int unlink_errno = errno; + if (0 <= ret) + errno = saved_errno; free (lockpath); - errno = ret < 0 ? unlink_errno : saved_errno; return ret; } |