summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2015-11-12 23:58:01 +0100
committerAllan McRae <allan@archlinux.org>2015-12-05 08:52:16 +0100
commit16623a7ea577309c8cfb90920ca61342c585f73a (patch)
tree099ade545690b766b2f7b7486ee0ecc48fca6129 /lib/libalpm
parent4838d250e5fc258bdd52dc31098ed2ad0e44ee40 (diff)
downloadpacman-16623a7ea577309c8cfb90920ca61342c585f73a.tar.gz
pacman-16623a7ea577309c8cfb90920ca61342c585f73a.tar.xz
handle_unlock: return 0 if lockfile == NULL
Returning -1 is useless since we don't provide any way to determine why it failed. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/handle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 98420b07..b2a10c86 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -129,7 +129,7 @@ int _alpm_handle_lock(alpm_handle_t *handle)
/** Remove a lock file */
int _alpm_handle_unlock(alpm_handle_t *handle)
{
- ASSERT(handle->lockfile != NULL, return -1);
+ ASSERT(handle->lockfile != NULL, return 0);
ASSERT(handle->lockfd >= 0, return 0);
close(handle->lockfd);