summaryrefslogtreecommitdiff
path: root/tests/Upgradable_RW_Test.cpp
diff options
context:
space:
mode:
authormk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-26 15:31:50 +0000
committermk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-26 15:31:50 +0000
commit3b446bfdc5dd3432c640f0292d124bc328674922 (patch)
tree9e3b7e4b7b77529d00e7d2d3aa30443ee75d8bab /tests/Upgradable_RW_Test.cpp
parent62905c61e42ab54038984db8c6b1c04e9f881078 (diff)
downloadATCD-3b446bfdc5dd3432c640f0292d124bc328674922.tar.gz
Switched from itoa to sprintf
Diffstat (limited to 'tests/Upgradable_RW_Test.cpp')
-rw-r--r--tests/Upgradable_RW_Test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/Upgradable_RW_Test.cpp b/tests/Upgradable_RW_Test.cpp
index 83c689baeb8..4489c29ae56 100644
--- a/tests/Upgradable_RW_Test.cpp
+++ b/tests/Upgradable_RW_Test.cpp
@@ -41,6 +41,8 @@ static size_t n_iterations = 50;
static size_t n_iterations = 50;
#endif /* ACE_HAS_WINCE */
+#define MAX_STRING_SIZE 200
+
// Default number of loops.
static size_t n_loops = 100;
@@ -296,15 +298,13 @@ init (u_int kind)
case 0:
// The space will be reused several times, We can do this
// because the map copies the strings
- // @@ Michael, can you please use a symbolic constant here,
- // rather than a magic number like 100.
- char entry[100];
+ char entry[MAX_STRING_SIZE];
ACE_CString cString1;
ACE_CString cString2;
for (u_int i = 0; i < n_entries; i++)
{
- itoa (i,entry,10);
+ ACE_OS::sprintf(entry,"%d",i);
cString1.set (/*entry*/"100");
cString2.set (ACE_OS::strcat (entry,"X"));
hash_Map_ptr->bind (cString1, cString2);