diff options
author | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-05-24 06:52:58 +0000 |
---|---|---|
committer | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-05-24 06:52:58 +0000 |
commit | f1fa6f9a847eb98080fd1b71db88c9d222e5cdf7 (patch) | |
tree | 8118291a3ce6dc3069cdca256aa4df24e886296e /performance-tests | |
parent | 957ffd5092d2a8998d74679e45737cc45d223593 (diff) | |
download | ATCD-f1fa6f9a847eb98080fd1b71db88c9d222e5cdf7.tar.gz |
Fixed a bug in do_testing: was concatenating onto a string constant.
Reported by Sandro Doro.
Diffstat (limited to 'performance-tests')
-rw-r--r-- | performance-tests/Misc/test_naming.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/performance-tests/Misc/test_naming.cpp b/performance-tests/Misc/test_naming.cpp index ea2b00c1124..6c32fa71dbf 100644 --- a/performance-tests/Misc/test_naming.cpp +++ b/performance-tests/Misc/test_naming.cpp @@ -131,8 +131,11 @@ void do_testing (int argc, char *argv[], int light) } else // Use NO-SYNC { - name_options->database (ACE_OS::strcat ("light", ACE::basename (name_options->process_name (), - ACE_DIRECTORY_SEPARATOR_CHAR))); + const char *p = ACE::basename (name_options->process_name (), + ACE_DIRECTORY_SEPARATOR_CHAR); + char s[ACE_OS::strlen ("light") + ACE_OS::strlen (p) + 1]; + ACE_OS::sprintf (s, "light%s", p); + name_options->database (s); ns_context.open (ACE_Naming_Context::PROC_LOCAL, 1); } |