Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
db2fa0cd
Commit
db2fa0cd
authored
May 24, 2012
by
Mukund Sivaraman
Browse files
[1704] fd_ cannot be -1 here
parent
09e8c9e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/util/interprocess_sync_file.cc
View file @
db2fa0cd
...
...
@@ -87,7 +87,7 @@ InterprocessSyncFile::lock() {
return
(
true
);
}
if
(
(
fd_
!=
-
1
)
&&
do_lock
(
fd_
,
F_SETLKW
,
F_WRLCK
))
{
if
(
do_lock
(
fd_
,
F_SETLKW
,
F_WRLCK
))
{
is_locked_
=
true
;
return
(
true
);
}
...
...
@@ -101,7 +101,7 @@ InterprocessSyncFile::tryLock() {
return
(
true
);
}
if
(
(
fd_
!=
-
1
)
&&
do_lock
(
fd_
,
F_SETLK
,
F_WRLCK
))
{
if
(
do_lock
(
fd_
,
F_SETLK
,
F_WRLCK
))
{
is_locked_
=
true
;
return
(
true
);
}
...
...
@@ -115,7 +115,7 @@ InterprocessSyncFile::unlock() {
return
(
true
);
}
if
(
(
fd_
!=
-
1
)
&&
do_lock
(
fd_
,
F_SETLKW
,
F_UNLCK
))
{
if
(
do_lock
(
fd_
,
F_SETLKW
,
F_UNLCK
))
{
is_locked_
=
false
;
return
(
true
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment