diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-10-12 23:36:16 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-10-12 23:36:16 +0000 |
commit | fb2197951d6b2df4e0f9c1182b87c702be107255 (patch) | |
tree | 57be745e8525be2b6ce98acad3333c6bff187433 /ace/Service_Repository.cpp | |
parent | 1588d29169edb6b8a0ba0a1c213c185b2a8ea775 (diff) | |
download | ATCD-fb2197951d6b2df4e0f9c1182b87c702be107255.tar.gz |
.
Diffstat (limited to 'ace/Service_Repository.cpp')
-rw-r--r-- | ace/Service_Repository.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp index 2e6d8040d86..60ba59d3a6b 100644 --- a/ace/Service_Repository.cpp +++ b/ace/Service_Repository.cpp @@ -241,12 +241,14 @@ ACE_Service_Repository::insert (const ACE_Service_Type *sr) ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1)); int i; + // Check to see if this is a duplicate. for (i = 0; i < this->current_size_; i++) if (ACE_OS::strcmp (sr->name (), this->service_vector_[i]->name ()) == 0) break; - if (i < this->current_size_) // Replacing an existing entry + // Replacing an existing entry + if (i < this->current_size_) { // Check for self-assignment... if (sr == this->service_vector_[i]) @@ -257,7 +259,8 @@ ACE_Service_Repository::insert (const ACE_Service_Type *sr) this->service_vector_[i] = sr; return 0; } - else if (i < this->total_size_) // Adding a new entry. + // Adding a new entry. + else if (i < this->total_size_) { this->service_vector_[i] = sr; this->current_size_++; |