From b1b8c815c8f548ccd8ad6d6f7783eaf8144be175 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 9 Sep 2009 17:15:22 +0200 Subject: remove unnecessary variable from last commit Signed-off-by: Denys Vlasenko --- lib/Utils/DebugDump.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp index 98482d40..7e10a87e 100644 --- a/lib/Utils/DebugDump.cpp +++ b/lib/Utils/DebugDump.cpp @@ -89,7 +89,6 @@ static bool ExistFileDir(const char* pPath) static int GetAndSetLock(const char* pLockFile, const char* pPID) { - bool need2lock = true; int fd; while ((fd = open(pLockFile, O_WRONLY | O_CREAT | O_EXCL, 0640)) < 0) @@ -134,7 +133,7 @@ static int GetAndSetLock(const char* pLockFile, const char* pPID) remove(pLockFile); throw CABRTException(EXCEP_DD_OPEN, "GetAndSetLock: can't write a pid"); } - if (need2lock && lockf(fd, F_LOCK, 0) != 0) + if (lockf(fd, F_LOCK, 0) != 0) { close(fd); remove(pLockFile); -- cgit