diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-22 22:06:04 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-22 22:06:04 +0000 |
commit | aa56341042bf18dfb4754e0910113e8e059acc82 (patch) | |
tree | 147fc294556751cc24df552768b29a173a22c924 /ace/SV_Semaphore_Complex.cpp | |
parent | f13a60d21d6b6971654b1b2737dd09fafdbef944 (diff) | |
download | ATCD-aa56341042bf18dfb4754e0910113e8e059acc82.tar.gz |
foo
Diffstat (limited to 'ace/SV_Semaphore_Complex.cpp')
-rw-r--r-- | ace/SV_Semaphore_Complex.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ace/SV_Semaphore_Complex.cpp b/ace/SV_Semaphore_Complex.cpp index 09aac60b0bf..1bcd3d64cec 100644 --- a/ace/SV_Semaphore_Complex.cpp +++ b/ace/SV_Semaphore_Complex.cpp @@ -103,12 +103,11 @@ ACE_SV_Semaphore_Complex::open (key_t k, // Get the value of the process counter. If it equals 0, then no // one has initialized the ACE_SV_Semaphore yet. - int semval; + int semval = ACE_SV_Semaphore_Simple::control (GETVAL, 0, 1); - if ((semval = ACE_SV_Semaphore_Simple::control (GETVAL, 0, 1)) < 0) + if (semval == -1) return this->init (); - - if (semval == 0) + else if (semval == 0) { // We should initialize by doing a SETALL, but that would // clear the adjust value that we set when we locked the |