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>
This commit is contained in:
Andrew Gregory 2015-11-12 17:58:01 -05:00 committed by Allan McRae
parent 4838d250e5
commit 16623a7ea5
1 changed files with 1 additions and 1 deletions

View File

@ -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);