From 310acc88afeaf696a27c7393540a24e6489ca061 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 10 Nov 2021 10:51:37 +0100 Subject: Const/layout changes * ACE/ace/OS_NS_stdlib.cpp: --- ACE/ace/OS_NS_stdlib.cpp | 8 ++------ 1 file 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 and must be freed by // . - 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 , 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; -- cgit v1.2.1