diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-10-04 17:18:01 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-10-04 17:18:01 +0000 |
commit | 9f535c225adfa5ed49d9d30746fc6673c3f60c79 (patch) | |
tree | 041fc3a56b900787325413c568dacca48b2a3b81 /ace/SV_Semaphore_Simple.cpp | |
parent | a664b03104413dbcf885a6b64b34989ec747491d (diff) | |
download | ATCD-9f535c225adfa5ed49d9d30746fc6673c3f60c79.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/SV_Semaphore_Simple.cpp')
-rw-r--r-- | ace/SV_Semaphore_Simple.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ace/SV_Semaphore_Simple.cpp b/ace/SV_Semaphore_Simple.cpp index f7a6809dbb2..fb41901c07c 100644 --- a/ace/SV_Semaphore_Simple.cpp +++ b/ace/SV_Semaphore_Simple.cpp @@ -86,12 +86,10 @@ ACE_SV_Semaphore_Simple::open (key_t k, if (this->internal_id_ == -1) return -1; - if (flags == IPC_CREAT) - { - for (int i = 0; i < n; i++) - if (ACE_OS::semctl (this->internal_id_, i, SETVAL, ivalue) == -1) - return -1; - } + if (ACE_BIT_ENABLED (flags, IPC_CREAT)) + for (int i = 0; i < n; i++) + if (ACE_OS::semctl (this->internal_id_, i, SETVAL, ivalue) == -1) + return -1; return 0; } |