From 16623a7ea577309c8cfb90920ca61342c585f73a Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Thu, 12 Nov 2015 17:58:01 -0500 Subject: 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 Signed-off-by: Allan McRae --- lib/libalpm/handle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3-70-g09d2