diff options
Diffstat (limited to 'tests/test_config.h')
-rw-r--r-- | tests/test_config.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/test_config.h b/tests/test_config.h index 2c961ce5517..3effdb8f81d 100644 --- a/tests/test_config.h +++ b/tests/test_config.h @@ -246,7 +246,7 @@ ACE_Test_Output::set_output (const ASYS_TCHAR *filename, int append) { ASYS_TCHAR temp[MAXPATHLEN]; // Ignore the error value since the directory may already exist. - ASYS_TCHAR *test_dir; + LPCTSTR test_dir; #if !defined (ACE_HAS_WINCE) test_dir = ACE_OS::getenv ("ACE_TEST_DIR"); @@ -255,8 +255,6 @@ ACE_Test_Output::set_output (const ASYS_TCHAR *filename, int append) #endif /* ACE_HAS_WINCE */ test_dir = ASYS_TEXT (""); - - ACE_OS::sprintf (temp, ASYS_TEXT ("%s%s%s%s"), test_dir, @@ -268,8 +266,8 @@ ACE_Test_Output::set_output (const ASYS_TCHAR *filename, int append) // This is the only way I could figure out to avoid a console warning // about opening an existing file (w/o O_CREAT), or attempting to unlink // a non-existant one. - int fd; - if ((fd = ACE_OS::open (temp, O_WRONLY | O_CREAT, 0x644)) != ERROR) + int fd = ACE_OS::open (temp, O_WRONLY | O_CREAT, 0x644); + if (fd != ERROR) { ACE_OS::close (fd); ACE_OS::unlink (temp); |