summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-11-10 13:24:37 +0100
committerGitHub <noreply@github.com>2021-11-10 13:24:37 +0100
commit069d2366ec47e59371fa92d70f5e74dcb003971f (patch)
tree94880da103f46b7fb3e9f7361aa6c15f026007fe
parentac7821e5587d7cba69e96d81e68d311b9f846302 (diff)
parent310acc88afeaf696a27c7393540a24e6489ca061 (diff)
downloadATCD-069d2366ec47e59371fa92d70f5e74dcb003971f.tar.gz
Merge pull request #1721 from jwillemsen/jwi-constchanges
Const/layout changes
-rw-r--r--ACE/ace/OS_NS_stdlib.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/ACE/ace/OS_NS_stdlib.cpp b/ACE/ace/OS_NS_stdlib.cpp
index 17cba804867..7caa1a5058d 100644
--- a/ACE/ace/OS_NS_stdlib.cpp
+++ b/ACE/ace/OS_NS_stdlib.cpp
@@ -107,7 +107,6 @@ ACE_OS::getenvstrings ()
// environment variables of form $VAR_NAME. Note that the pointer is
// allocated with <ACE_OS::malloc> and must be freed by
// <ACE_OS::free>.
-
ACE_TCHAR *
ACE_OS::strenvdup (const ACE_TCHAR *str)
{
@@ -152,7 +151,7 @@ ACE_OS::strenvdup (const ACE_TCHAR *str)
}
}
ACE_TCHAR * p = buf_p;
- size_t len = start - str;
+ size_t const len = start - str;
ACE_OS::strncpy (p, str, len);
p += len;
if (temp != 0)
@@ -185,7 +184,6 @@ ACE_OS::itoa_emulation (int value, char *string, int radix)
char *b = string;
// Short circuit if 0
-
if (value == 0)
{
string[0] = '0';
@@ -195,7 +193,6 @@ ACE_OS::itoa_emulation (int value, char *string, int radix)
// If negative and base 10, print a - and then do the
// number.
-
if (value < 0 && radix == 10)
{
string[0] = '-';
@@ -205,10 +202,9 @@ ACE_OS::itoa_emulation (int value, char *string, int radix)
}
// Convert to base <radix>, but in reverse order
-
while (value != 0)
{
- int mod = value % radix;
+ int const mod = value % radix;
value = value / radix;
*e++ = (mod < 10) ? '0' + mod : 'a' + mod - 10;