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
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ int _alpm_handle_lock(alpm_handle_t *handle)
|
||||||
/** Remove a lock file */
|
/** Remove a lock file */
|
||||||
int _alpm_handle_unlock(alpm_handle_t *handle)
|
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);
|
ASSERT(handle->lockfd >= 0, return 0);
|
||||||
|
|
||||||
close(handle->lockfd);
|
close(handle->lockfd);
|
||||||
|
|
Loading…
Add table
Reference in a new issue