mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-21 23:38:49 -05:00
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:
parent
4838d250e5
commit
16623a7ea5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user