From d74dad79b7770725090e1eb2a015cbd6f88aed66 Mon Sep 17 00:00:00 2001 From: Helder Martins Date: Mon, 29 Aug 2011 22:07:26 +0100 Subject: lib/libalpm/handle.c: Removed redundant if condition Signed-off-by: Helder Martins Signed-off-by: Dan McGee --- lib/libalpm/handle.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 266b4bc8..b9d71db8 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -132,10 +132,9 @@ int _alpm_handle_unlock(alpm_handle_t *handle) ASSERT(handle->lockfile != NULL, return -1); ASSERT(handle->lckstream != NULL, return 0); - if(handle->lckstream != NULL) { - fclose(handle->lckstream); - handle->lckstream = NULL; - } + fclose(handle->lckstream); + handle->lckstream = NULL; + if(unlink(handle->lockfile) && errno != ENOENT) { return -1; } -- cgit v1.2.3-70-g09d2