summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-11-10 10:51:37 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-11-10 10:51:37 +0100
commit310acc88afeaf696a27c7393540a24e6489ca061 (patch)
tree692991382592582241d04953f92cd6938817a111
parent4f43ab1824a8d6abe0a90129fb549b0c131e190c (diff)
downloadATCD-310acc88afeaf696a27c7393540a24e6489ca061.tar.gz
Const/layout changes
* ACE/ace/OS_NS_stdlib.cpp:
-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;