diff options
author | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-12-09 12:41:55 +0000 |
---|---|---|
committer | bala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-12-09 12:41:55 +0000 |
commit | 5b7ad792326a7660b50c85d238d3313c2f8bd100 (patch) | |
tree | 3befa771df138e824ad9607351ba46eb56dfad55 | |
parent | a189112f616bb6ba8a8b82b3d88071977c8aca4d (diff) | |
download | ATCD-5b7ad792326a7660b50c85d238d3313c2f8bd100.tar.gz |
ChangeLogTag: Mon Dec 9 07:41:39 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 6 | ||||
-rw-r--r-- | ace/OS_String.cpp | 20 | ||||
-rw-r--r-- | tests/OS_Test.cpp | 2 |
4 files changed, 23 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog index 3ef9d02a41c..2818ea9e339 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Dec 9 07:41:39 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + * tests/OS_Test.cpp: + * ace/OS_String.cpp (strsncpy): Fixed a cut and paste error. + + Mon Dec 9 00:09:55 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> * ace/INET_Addr.cpp (get_host_addr): Changed the usage of strncpy diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 3ef9d02a41c..2818ea9e339 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,9 @@ +Mon Dec 9 07:41:39 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + * tests/OS_Test.cpp: + * ace/OS_String.cpp (strsncpy): Fixed a cut and paste error. + + Mon Dec 9 00:09:55 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> * ace/INET_Addr.cpp (get_host_addr): Changed the usage of strncpy diff --git a/ace/OS_String.cpp b/ace/OS_String.cpp index 22c12346778..cb6e8e03d0b 100644 --- a/ace/OS_String.cpp +++ b/ace/OS_String.cpp @@ -1037,11 +1037,11 @@ ACE_OS_String::strsncpy (char *dst, const char *src, size_t maxlen) if (rsrc != 0) strncat (rdst, rsrc, --rmaxlen); } - } - else - { - rdst += (rmaxlen - 1); - *rdst = '\0'; + else + { + rdst += (rmaxlen - 1); + *rdst = '\0'; + } } return dst; } @@ -1061,11 +1061,11 @@ ACE_OS_String::strsncpy (ACE_WCHAR_T *dst, const ACE_WCHAR_T *src, size_t maxlen if (rsrc != 0) strncat (rdst, rsrc, --rmaxlen); } - } - else - { - rdst += (rmaxlen - 1); - *rdst = ACE_TEXT_WIDE ('\0'); + else + { + rdst += (rmaxlen - 1); + *rdst = ACE_TEXT_WIDE ('\0'); + } } return dst; } diff --git a/tests/OS_Test.cpp b/tests/OS_Test.cpp index 9ac94fec5f6..f7dea2a5d56 100644 --- a/tests/OS_Test.cpp +++ b/tests/OS_Test.cpp @@ -604,7 +604,7 @@ string_strsncpy_test (void) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strsncpy (wchar_t version)\n"))); - wchar_t strsncpy1[] ACE_TEXT_WIDE = ("abcdefghijklmnopqrstuvwxyzabc"); + wchar_t strsncpy1[] = ACE_TEXT_WIDE ("abcdefghijklmnopqrstuvwxyzabc"); wchar_t strsncpy2[36]; ACE_ASSERT |