diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-09-09 13:22:59 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-09-09 13:22:59 +0200 |
commit | b54bbdb8179ddfa5e66d1430c81998bffdc5ef95 (patch) | |
tree | a0415f6d8bb881363673dc03f070027453d9e78c /ACE/ace/OS_NS_string.cpp | |
parent | 74f88d5bec32a96be6a8755d575615521e197286 (diff) | |
download | ATCD-b54bbdb8179ddfa5e66d1430c81998bffdc5ef95.tar.gz |
Use strsncpy as that will return a zero terminated strict, fixes gcc warnings
:
* ACE/ace/OS_NS_string.cpp:
* ACE/ace/SOCK_Dgram.cpp:
Diffstat (limited to 'ACE/ace/OS_NS_string.cpp')
-rw-r--r-- | ACE/ace/OS_NS_string.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ACE/ace/OS_NS_string.cpp b/ACE/ace/OS_NS_string.cpp index cbeda603bbf..223d753589a 100644 --- a/ACE/ace/OS_NS_string.cpp +++ b/ACE/ace/OS_NS_string.cpp @@ -83,9 +83,9 @@ ACE_OS::strerror (int errnum) if (ACE::is_sock_error (errnum)) { const ACE_TCHAR *errortext = ACE::sock_error (errnum); - ACE_OS::strncpy (ret_errortext, - ACE_TEXT_ALWAYS_CHAR (errortext), - sizeof (ret_errortext)); + ACE_OS::strsncpy (ret_errortext, + ACE_TEXT_ALWAYS_CHAR (errortext), + sizeof (ret_errortext)); return ret_errortext; } #if defined (ACE_LACKS_STRERROR) |