Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2015-11-12 17:58:01 -0500
committerAllan McRae <allan@archlinux.org>2015-12-05 17:52:16 +1000
commit16623a7ea577309c8cfb90920ca61342c585f73a (patch)
tree099ade545690b766b2f7b7486ee0ecc48fca6129
parent4838d250e5fc258bdd52dc31098ed2ad0e44ee40 (diff)
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>
-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);