summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-09 17:15:22 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-09 17:15:22 +0200
commitb1b8c815c8f548ccd8ad6d6f7783eaf8144be175 (patch)
tree2071690b345891316f8ef4d6dab4f791918f7d8e
parent5fe652bb3422cab731deddae4c25c2f0d6fee885 (diff)
downloadabrt-b1b8c815c8f548ccd8ad6d6f7783eaf8144be175.tar.gz
abrt-b1b8c815c8f548ccd8ad6d6f7783eaf8144be175.tar.xz
abrt-b1b8c815c8f548ccd8ad6d6f7783eaf8144be175.zip
remove unnecessary variable from last commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--lib/Utils/DebugDump.cpp3
1 files changed, 1 insertions, 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);