summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-04-07 20:55:33 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-04-07 20:55:33 +0000
commit8731c7414fa5a54af2230f974e6198d2e9f2b42d (patch)
tree2b99e48864e3206958a502c68c89dcd1d30503d4
parent23e9c39bab498d0d6bc45908e4a41fb235818fd8 (diff)
downloadATCD-8731c7414fa5a54af2230f974e6198d2e9f2b42d.tar.gz
Implemented another way to check for taking too many cans out.
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp
index d4fb0467dd4..0df205d1dc7 100644
--- a/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp
+++ b/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp
@@ -60,12 +60,11 @@ Nestea_i::crush (CORBA::Long cans,
if (TAO_debug_level)
ACE_DEBUG ((LM_DEBUG, "Nestea_i::crush %d cans\n", cans));
- this->cans_ -= cans;
-
- // Don't go below 0.
- if (this->cans_ < 0)
+ if (cans > this->cans_)
this->cans_ = 0;
-
+ else
+ this->cans_ -= cans;
+
if (this->shutdown_ != 0)
TAO_ORB_Core_instance ()->orb ()->shutdown ();